I just flashed a new s31 smart plug - something I’ve done a dozen times before. Copy the YAML file, find-replace change the name of the device, installed the firmware, put it together, plug it in.
But this time its not being detected in HA?
I can see it in ESPHome, I can view its logs in ESPHome, it says its sending, I’ve restarted HA, I’ve restarted ESPHome, I can see (and ping) it by DNS name…I’m not sure where else to go?
What would cause a new plug to not register with HA but show everywhere else? Did something change from how it used to detect new devices?
I don’t use mDNS because its never worked reliably across VLANs, but I have the dns suffix specified in the config and all the others work fine with the DNS name…but this one looks like it is working both ways from the HA server
[core-ssh esphome]$ ping s31_snake_light_2.local
PING s31_snake_light_2.local (192.168.3.145): 56 data bytes
64 bytes from 192.168.3.145: seq=0 ttl=254 time=2.803 ms
64 bytes from 192.168.3.145: seq=1 ttl=254 time=4.845 ms
64 bytes from 192.168.3.145: seq=2 ttl=254 time=2.647 ms
64 bytes from 192.168.3.145: seq=3 ttl=254 time=2.340 ms
64 bytes from 192.168.3.145: seq=4 ttl=254 time=2.509 ms
64 bytes from 192.168.3.145: seq=5 ttl=254 time=2.650 ms
^C
--- s31_snake_light_2.local ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 2.340/2.965/4.845 ms
[core-ssh esphome]$ ping s31_snake_light_2.apt
PING s31_snake_light_2.apt (192.168.3.145): 56 data bytes
64 bytes from 192.168.3.145: seq=0 ttl=254 time=11.960 ms
64 bytes from 192.168.3.145: seq=1 ttl=254 time=2.481 ms
64 bytes from 192.168.3.145: seq=2 ttl=254 time=2.452 ms
64 bytes from 192.168.3.145: seq=3 ttl=254 time=7.281 ms
64 bytes from 192.168.3.145: seq=4 ttl=254 time=7.501 ms
64 bytes from 192.168.3.145: seq=5 ttl=254 time=2.212 ms
^C
--- s31_snake_light_2.apt ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 2.212/5.647/11.960 ms
[core-ssh esphome]$
So did the auto discovery in ha to add the new esphome nodes ever worked then? I think it solely utilizes mDNS and if that doesn’t do you need to add the device yourself by it’s IP (normal hostnames are not allowed) and that’s somewhat a PITA together with DHCP because once a device gets a new IP for some reason it needs to be added again to ha
Yeah, mDNS seems to randomly start/stop working for reasons I’ve never figured out why.
I’ve also had the opposite in the past where the HA shows the plugs and ESPHome says they are all offline inexplicably (but didn’t care because it all worked fine that way).
Seems it now is suddenly finding the plug after adding that as an integration, that’s rather confusing with the UI that shows it as 1 but its many? Anyway it shows and responds now (and I was able to use hostname.dns_suffix so DHCP won’t break it later)
I am just curious, personally never used ESPHome, but from what I remember, isn’t it like a Tasmota alternative? I know in order for devices to show from Tasmota you need to insert the 19 command into the command line. Does ESPHome not use something similar?
The part I’m curious about is the advantage of ESPHome over Tasmota, used Tasmota for years with no issues. I could just be completely wrong about them being alts of each other.
Honestly I don’t know the differences between ESPHome and Tasmota but they’re both alternative firmware for the cheap WiFi based devices…I went with ESPHome and Sonoff S31 plugs because I had a friend using HA and could help me figure out how to get it working, and it all “just worked” like magic after flashing the firmware onto it.
This is the first time I have ever experienced this issue where it didn’t “just work” out of the box immediately.
Is ESPHome based on MQTT or another protocol? I’m guessing that may be the major difference after you had to choose between hostname and mDNS. Tasmota, teach the device the topic and login via MQTT, tell it to broadcast and like you said “It Just Works”.
Lot’s of the advantages you will get with the native api (but it still supports mqtt)
Advantages over MQTT
The ESPHome native API has many advantages over using MQTT for communication with Home Automation software (currently only Home Assistant). But MQTT is a great protocol and will never be removed. Features of native API (vs. MQTT):
Much more efficient: ESPHome encodes all messages in a highly optimized format with protocol buffers - for example binary sensor state messages are about 1/10 of the size.
One-click configuration: ESPHome just needs one click to set up in Home Assistant - no more messing around with retained MQTT discovery messages and alike.
One less single point of failure: In the ESPHome native API each ESP is its own server. With MQTT, when the broker shuts off nothing can communicate anymore.
Stability: Since ESPHome has far more control over the protocol than with MQTT, it’s really easy for us to roll out stability improvements.
Low Latency: The native API is optimized for very low latency, usually this is only a couple of milliseconds and far less than can be noticed by the eye.
For the native api that’s not necessary and also there is no (extra) point of failure (or “weak link”) needed like a mqtt broker
Sounds like me clicking the update-all button and having a cold beer while all of my ~95 esphome devices get their over-the-air update
Bruh, do I need to switch my Tasmos to ESPH? My garage door opener could be faster. I guess the important question here is do they by any chance have an OTA Flash like Tasmota used to? [Obviously near impossible to find eq that works with the OTA Tas now.]