I can’t seem to understand why the ESPHome device I is listed in my routers wifi connections but ESPHome sees it as offline. The only way to fix it is to reboot the router but this happens everytime the ESP device loses power.
Is there a way to fix this?
In the EspHome addon log it shows: edit?configuration=sprinkler_system.yaml (0.0.0.0) seems as if the IP is messed…
Device code:
esphome:
name: sprinkler_system
platform: ESP8266
board: nodemcuv2
includes:
- shift_register_switch.h
libraries:
- [email protected]
wifi:
ssid: "wifi_spot"
password: "password"
switch:
- platform: custom
lambda: |-
std::vector<switch_::Switch *> switches;
for(int i = 0; i < 8; i++) {
auto zone_switch = new ShiftRegisterSwitch(i);
App.register_component(zone_switch);
switches.push_back(zone_switch);
}
return switches;
switches:
- name: "Sprinkler Zone 1"
inverted: yes
- name: "Sprinkler Zone 2"
inverted: yes
- name: "Sprinkler Zone 3"
inverted: yes
- name: "Sprinkler Zone 4"
inverted: yes
- name: "Sprinkler Zone 5"
inverted: yes
- name: "Sprinkler Zone 6"
inverted: yes
- name: "Sprinkler Zone 7"
inverted: yes
- name: "Sprinkler Zone 8"
inverted: yes
status_led:
pin: 16
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
text_sensor:
- platform: version
name: esphome_sprinkler_system_esphome_version
Try using a static IP in your configuration. You could also try pinging “sprinkler_system.local” to see if mDNS is working properly. mDNS is how esphome determines if devices are on/offline, be default.
And if the suggestion from iridris isn’t working, you can set the option status_use_ping in the settings of your ESPHome installation (howeve you installed it). This changes the way ESPHome is looking for your device (with IP and not mDNS).
I know this thread is old, but if someone encounters this problem do the following:
-assign a static IP address to the ESP Device then define its address in the config
-remove the line „name_add_mac_suffix” from the config
Since you sound really confident about the valid solutions, can you tell me why my online device is still showing offline?
I have status_use_ping: true, and the status detection in esphome dashboard worked fine until I added a second device. Connection to device works fine, including viewing the logs wirelessly (from the esphome dashboard, ironically). I have since removed one of the devices, but nothing changed.
Both devices were unique in every aspect, IP, hostname, api key and ota password, so I’m just clueless.
There is also another issue, where it shows the update button (and HA notification) when the device has an esp firmware update available, but it doesn’t go away after pushing the update to the device. So, I’m wondering if there are some general issues in the whole device status thing in esphome.
I am neither confident nor knowledgeable but I have had everything go wrong at one time or another… so far I have found a fix for everything … however I usually sleep on the problem… do some more reading and find a solution on here somewhere!! For the nodes which showed as offline… I think I didn’t pursue it but eventually a new flash, firmware update and reboot sorted it… and worse case was a complete nuke of the dashboard and folders. A post of your yaml might be a good place to start.
Clearly there is, because ESPHome devices do not work like any other device. They’re not cable of stable MDNS and according to forum, require static IPs, which is a silly to suggest.
I forgot to get back to this, because I eventually switched from home assistant OS to core + esphome and the issues just went away. Same configs and all, so my guess now is that it had something to do with containers. And yes, they had (and have) static IPs