Open michaelboke opened 5 years ago
Does mDNS work correctly? Can you see accessory advertisement (dns-sd -B _hap._tcp local
on macOS)?
@maximkulkin I have a similar problem. I see that my esp8266 (Sonoff SV) is connected to the WiFi but is not visible with dns-sd -B _hap._tcp
.
In my case is not always ~2 minutes. Sometimes is one day. Sometimes is a few minutes. This is quite random. Is there a way to investigate that?
@nonameplum what do logs show?
@maximkulkin maybe it will be dumb question but is there a way to get logs while the device is connected to main power? Or I will need to implement some small storage based logging?
I personally debug connected to laptop, but I know people use logging over UDP
I have some similar experience with only one device (Wemos D1 mini) running this , though another 2 devices running the same firmware on a different network & house seem to be stable for months.
The device that seemed to be unresponsive nowadays was running error free for months using the same version of the above firmware.
In my case, If I reboot the esp8266 device it gets back online. Furthermore, if I turn on & off the router's Wifi it also brings back online the device.
Because this error may appear after days of operation, it's very difficult to have logs. Unless of course these logs can be stored locally or sent remotely (i.e. to a raspberry).
Thinking loudly, I was wondering, if at all is possible for the esp8266 device to be aware when itself becomes unavailable in the Home app? If the answer is yes, it could be possible to implement something to override the situation (force mDNS announcement or reboot) so that it can get back online to Home app.
I was thinking to ping the router from the device from time to time to check if the connection is really alive. Not sure if that will verify the mDNS issue...
I was thinking to ping the router from the device from time to time to check if the connection is really alive. Not sure if that will verify the mDNS issue...
Be sure to check the latest version of esp-wifi-config which includes a monitoring capability of the network status.
But I have observed a situation when the device was unreachable in Home app, but it was connected to the Wifi network.
But I have observed a situation when the device was unreachable in Home app, but it was connected to the Wifi network.
Exactly, I have that issue. I used wifi-config, and also implemented only that part of monitoring the network connection myself and it sounds like the wifi status is returning connected but the home app is losing connection to the device. I didn't have a chance yet to make some logging as I would need to have as @maximkulkin suggested UDP logging or storing the last couple of logs on the device.
Its weird, but HomeKit uses mDNS to check accessory online/offline status. Current responder implementation seems not stable.
When i connect the iphone with the esp8266 running (example led or sonoff). It will pair and let me control the led i configured as output. This will work for a few minutes and after that the accessory becomes unreachable. IOS also reports that the accessory does not responds.
I have to hard reset the device and repair as a new accessory to have it responsive for again for the time it lasts. I tested it with 2 different esp8266 modules with 4mb flash.
I suspect that it has something todo with a timeout or when the connection disconnect i cannot connect anymore to the accessory.
Log of the first connect and pairing. The connection works and i can switch the led on the esp8266 on and off for testing.
After the
closing client connection
the esp8266 becomes unreachable, even when i soft reset the device (power cycle). The device is not reachable anymore.The logs after the soft reset reset
I am a bit lost here where to start searching. Who can help me getting to the source of the problem here.