New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homespan Device unresponsive in Homekit. #791
Comments
These types of connectivity issues are both frustrating as well as difficult to solve, especially if everything is working fine and then just stops. I assume you tried simply rebooting the ESP32 - if not, that's the first step. If you don't have weblog enabled, add it to your sketch so you can readily check that the ESP32 is still on the network. The weblog will also provide info on how often it loses and re-connects to WiFi. When accessing the weblog, try using both the hostname as well as the IP address. If the IP address is responsive but the hostname is not, this suggests an MDNS issue with how your router may be handling those requests. Are you using a Mesh network or just a single AP? Mesh networks can often dynamically reconfigure themselves, sometimes to the detriment of a specific device. Also, WiFi can be very sensitive to the local environment - a neighbor may have changed their own WiFi, which could degrade the performance of your system is channels overlap. If your router has an automatic channel optimizer, try running that. If that doesn't work, try rebooting the router as well. One final diagnostic is to check if the issue is related to HomeSpan. You can check this by uploading one of the ESP32 WebServer examples that use MDNS. If that sketch is showing laggy response, then the problem is likely a WiFi access issue. As a temporary check, you can try moving the board to another location and see if things work any better. |
I have not tried rebooting yet. Of course, that will work. I have a single AP for WiFi that is on the same floor as the garage and literally 10ft from the esp32. The esp32 is online but is not broadcasting mDNS any more. Is there a way to monitor the status of the mDNS service and reboot the ESP if the service stops running? Sent from my iPhoneOn Feb 29, 2024, at 10:46 PM, HomeSpan ***@***.***> wrote:
These types of connectivity issues are both frustrating as well as difficult to solve, especially if everything is working fine and then just stops.
I assume you tried simply rebooting the ESP32 - if not, that's the first step. If you don't have weblog enabled, add it to your sketch so you can readily check that the ESP32 is still on the network. The weblog will also provide info on how often it loses and re-connects to WiFi.
When accessing the weblog, try using both the hostname as well as the IP address. If the IP address is responsive but the hostname is not, this suggests an MDNS issue with how your router may be handling those requests.
Are you using a Mesh network or just a single AP? Mesh networks can often dynamically reconfigure themselves, sometimes to the detriment of a specific device. Also, WiFi can be very sensitive to the local environment - a neighbor may have changed their own WiFi, which could degrade the performance of your system is channels overlap.
If your router has an automatic channel optimizer, try running that. If that doesn't work, try rebooting the router as well.
One final diagnostic is to check if the issue is related to HomeSpan. You can check this by uploading one of the ESP32 WebServer examples that use MDNS. If that sketch is showing laggy response, then the problem is likely a WiFi access issue. As a temporary check, you can try moving the board to another location and see if things work any better.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I have seen the “No response” happen when the Home app receives incorrect json status data from HomeSpan (that is when I was trying to add extra functionality..). Review all your “setVal()” methods and ensure the values passed are valid and accepted ones for the characteristic. If you have weblogs enabled you could also see something there. |
So I did some debugging with Wireshark. There is definitely something awry with homespans MDNS. When you reset homespand, it posts half a dozen MDNS messages that look similar to those that are routinely posted by my Lyric... 622 29.785617 192.168.0.156 224.0.0.251 MDNS 219 Standard query 0x0000 ANY Spaceship Dock._hap._tcp.local, "QM" question ANY HomeSpan-07A74546A0D8.local, "QM" question ANY HomeSpan-07A74546A0D8.local, "QM" question SRV 0 0 80 HomeSpan-07A74546A0D8.local A 192.168.0.156 After that, the only time it posts any MDNS messages is if I run the Discovery App on my phone which queries bonjour devices... The first time you run the app after a reboot you get a similar message to the one originally posted. On subsequent attempts at running the discovery app, it posts an MDNS message that is pretty much empty. 789 35.319705 192.168.0.156 224.0.0.251 MDNS 97 Standard query response 0x0000 A, cache flush 192.168.0.156 Then, after a day or 2 it disappears altogether. This seems to be an issue with MDNS... Thoughts?? |
Various users have reported similar issues with MDNS. It is unknown whether this is a problem with the ESP32 MDNS library itself, the way that some routers handle MDNS traffic, or a combination of both. This issue apparently extends beyond HomeSpan to commercial devices as well, and it seems very idiosyncratic and specific to the WiFi router used, especially if it's a mesh network. I used a Linksys Velop mesh for a few years and everything worked fine. Then after a variety of firmware updates to the Linksys router, things started to decay - both for my HomeSpan devices as well as any commercial HomeKit devices that relied on WiFi. After a while I tossed the Linksys Velop and replaced with a Netgear Orbi mesh and everything worked immediately (and has been for about 2 years). As you can see from the Issues list, I've worked with other users reporting similar problems on different ways of debugging, restarting MDNS, etc., but unfortunately we were not able to to find a general solution. One thing you may want to test is whether a non-HomeSpan sketch has the same issues. The Arduino IDE contains a number of ESP32 examples, including a few for ESPmDNS you can try as a baseline. What WiFi router system are you using? Also, have you tried rebooting the router? |
I have a TPLink router and a ubiquiti access point. Of course the router is responsible for DNS within the lan, but mDNS is supposed to independent of that. I have a ton of devices on my network that use bonjour (mDNS) and, can see all of them responding… the other HAP device on my network is a LYRIC thermostat - It has been running flawlessly for 5+ years. Its mDNS data packet is similar in format to Homespans original packet. It feels like something is overwriting/ corrupting the mDNS data in RAM — ie a firmware problem… I just can’t see why my router or AP would selectively strip the data from homespan… particularly when other HAP devices are unaffectedSent from my iPhoneOn Mar 7, 2024, at 11:22 PM, HomeSpan ***@***.***> wrote:
Various users have reported similar issues with MDNS. It is unknown whether this is a problem with the ESP32 MDNS library itself, the way that some routers handle MDNS traffic, or a combination of both. This issue apparently extends beyond HomeSpan to commercial devices as well, and it seems very idiosyncratic and specific to the WiFi router used, especially if it's a mesh network.
I used a Linksys Velop mesh for a few years and everything worked fine. Then after a variety of firmware updates to the Linksys router, things started to decay - both for my HomeSpan devices as well as any commercial HomeKit devices that relied on WiFi. After a while I tossed the Linksys Velop and replaced with a Netgear Orbi mesh and everything worked immediately (and has been for about 2 years).
As you can see from the Issues list, I've worked with other users reporting similar problems on different ways of debugging, restarting MDNS, etc., but unfortunately we were not able to to find a general solution.
One thing you may want to test is whether a non-HomeSpan sketch has the same issues. The Arduino IDE contains a number of ESP32 examples, including a few for ESPmDNS you can try as a baseline.
What WiFi router system are you using? Also, have you tried rebooting the router?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
MDNS messages can be provided in different ways, and timing can be different - there does not seem to be a standard and sometimes certain devices fail and others do not. Have you tried testing with the Espressif ESPmDNS example? Also, see https://community.tp-link.com/en/business/forum/topic/606830 for reports of similar problems with commercial devices. |
So I have a question/observation... I looked at HomeSpan.cpp and see the following statements pertaining to MDNS: MDNS.begin(hostName); // set server host name (.local implied) When I looked at the ESP examples, they only use MDNS.begin and MDNS..addservice.. They don't use MDNS,setInstanceName Just wondering if this has anything to do with the issues I am seeing?? |
The instanceName is used to set a user-friendly display name in the MDNS record. If you poll all your MDNS devices you'll see that they often have a user-friendly name that is different from the hostname. If you have not yet rebooted your router, I highly recommend trying this before proceeding much further, given that you indicated the ESP32 had wildly varying response times. Also, check if your router has any setting related to MDNS, or any type of filtering, and disable them all. These are known to cause MDNS fails with certain devices. |
I will take another look at the router…although it doesn’t seem to be blocking MDNS for anything else on the network. I also looked at other MDNS libraries. After the router I try another library. Sent from my iPhoneOn Mar 8, 2024, at 10:00 PM, HomeSpan ***@***.***> wrote:
The instanceName is used to set a user-friendly display name in the MDNS record. If you poll all your MDNS devices you'll see that they often have a user-friendly name that is different from the hostname.
If you have not yet rebooted your router, I highly recommend trying this before proceeding much further, given that you indicated the ESP32 had wildly varying response times. Also, check if your router has any setting related to MDNS, or any type of filtering, and disable them all. These are known to cause MDNS fails with certain devices.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
If you Google Ubiquiti and MDNS you'll find a lot of message board reporting similar issues as you have described, along with various potential fixes. |
I am pretty sure my AP is not an issue. I have many bonjour devices throughout my home and they are all accessible and all work on my network via the ubiquiti AP. Also when I scan my network, again via WiFi, I get a list of devices with their capabilities… homespan only shows up as pingable, where as many others show up as bonjour capable. I think there has to be something awry with the mDNS on homespan. After its initial broadcast it then only responds with empty messages. All the details are missing. Sent from my iPhoneOn Mar 8, 2024, at 10:36 PM, HomeSpan ***@***.***> wrote:
If you Google Ubiquiti and MDNS you'll find a lot of message board reporting similar issues as you have described, along with various potential fixes.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Okay. Please let me know how the debugging goes and if you find anything. I would love to be able to resolve this but it's very hard for me to debug since I can't reproduce the error on my end. And I'm trying to avoid writing my own MDNS handler 😄. |
This is for sure a little odd. 11am this morning it cold no longer be found. I reset it and have had wireshark watching the MDNS traffic all day. So far, with the exception of one malformed message it seems to be behaving. When it’s running properly, my lan diagnostics app shows that it responds to http, bonjour and ping. When it starts misbehaving, http and bonjour are no longer available, despite the fact that the sketch continues to respond properly to hardwired inputs. Sent from my iPhoneOn Mar 9, 2024, at 10:02 AM, HomeSpan ***@***.***> wrote:
Okay. Please let me know how the debugging goes and if you find anything. I would love to be able to resolve this but it's very hard for me to debug since I can't reproduce the error on my end. And I'm trying to avoid writing my own MDNS handler 😄.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
According to Espressifs mDNS documention, by default mDNS is confirgured as a low priority task. Espressif also has recommendations for optimizing application performance. One statement jumped out at me... "It is also necessary to ensure that tasks yield CPU (by calling vTaskDelay(), sleep(), or by blocking on semaphores, queues, task notifications, etc) in order to not starve lower-priority tasks and cause problems for the overall system" So here's a question, are we staring lower priority tasks like mDNS? BTW its still running today, although, I have noticed that that my homespan device receives queries from the My home hub at a much lower cadence than other devices -- Is this a function on the TTL value in the response record? Thoughts? |
The Arduino-ESP32 library already has the |
GarageDoor_copy_20240211193856.zip Here is my garage door implementation... I built a custom board for a Hiletgo ESP-WROOM-32 development board... I use normally closed door contacts that push the input high, that way is a contact opens, or a wire is broken, or a wire is shorted to ground, it fails safe as opposed to overriding the the switch. My loop should iterate quickly as there are no delay calls. I have a filter routine to debounce switches and reject coupled noise that uses an event up-down counter as opposed to a delay. I use the current->getVal() and current->setVal() as the state both for HomesKit and my state machine. I use target->setVal() to set a new target value in Homekit when the door button on the wall is pressed. This simplifies the state machine and makes sure that homekit reflects the current targeted state. This will only get called once when the hardwired door button is pressed, so there should be negligible network traffic as a result. Anyway this was my first foray into sketching in the Arduino Environment, and first project time ESP32. I spend most of my life building networked mixed signal embedded systems with PIC's, AVR's, etc.. |
Above you mention that when you lose the MDNS, you also note that the device no longer responds to http. How are you testing this - by using the IP address or by using the hostname? If you enable the web log in your sketch you should be able to access it and get log output even if MDNS fails as long as you use the IP address. If that does not work, then the issue is more than MDNS. |
I have been testing using netAnalyzer on my iPhone to examine basic capabilities of devices on my local subnet. It scans IP addresses on the subnet and reports on whether an IP is pingable, has website and bonjour capability, amongst other things. . When the ESP stops responding, the app reports that the ESP's IP is ONLY pingable. So this might be comical, but as I said before, my sketch doesn't use delays, so it execution of the loop should be really fast... My assumption was that a delay in Arduino would be blocking and therefore detrimental to the RTOS, but in another forum someone noted that the Arduino implementation of delay for ESP actually uses vTaskDelay() under the hood and is therefore non-blocking. Now I am wondering if my lack of delays may actually be starving the underlying stack tasks of processor time. BTW, thanks for supporting my troubleshooting... This has been really useful! |
You should never need to add a delay in a HomeSpan sketch. It uses the Arduino-ESP32 library that includes the required delay. Likewise, you should never run a task that blocks the loop from executing. For example, if you are running a motor for 30 seconds, that needs to occur without blocking. One other thing to check are your calls to You should definitely enable the HomeSpan Web Log (simply add If you can't reach the device via the weblog using its IP address then the issue is 99% NOT related to MDNS. The weblog doesn't have anything to do with MDNS, and if you use the IP address to connect, your router will not need MDNS either. If possible, try to run your sketch while the device is connected to your computer - you may be able to use the Serial Monitor to get a better idea of what's going on. |
Re the MDNS logs, these look about the same as those on my own devices. MDNS is quite complex and I've never really digested all the message types and how/when they should be broadcast. |
Yes there are no delays... Everything happens in a state machine. I use target->timeVal() for door and light timing. As far as I am aware that should not be making network calls to homekit. Then I use target->getVal() to see what the current target is. The only time I use target->setVal() is when the physical door button is pressed --- on a weekday, this is twice a day! Then I use current->setval() to set the current state. This is the same state that the state machine in my loop uses. I read the value with current->getVal() each time the loop runs. I use current->setVal only when a state changes... So during a normal opening, the state starts out as closed, changes once to opening, then once the door is open changes to opened. There are no blocking statement in the loop... no while statements! Anyway, it should be really fast (it is very responsive), none blocking, and have low network overhead. Having found out that the Arduino ESP implementation of delay() actually uses vTaskDelay() under the hood, which is none blocking and should yield to other tasks, I wonder if the fact that I don't have any delays is starving the stack.. |
You do not need to add any delays. I have no delays in any of my sketches. No one has any delays in any of their sketches. Using delay in your sketch should be avoided at all costs except under limited circumstances where it is okay to block the operation of the main HomeSpan polling function. |
Yes, BUT delay in ESP is apparently non-blocking as in, it yields the OS to other task. I get it, it sounds counterintuitive, but I see in the mDNS code that mDNS has a very low priority by default, and therefore may be less responsive than it ought to be... That being the case adding a delay() (which under the hood is a vTaskDelay())may actually help with the responsiveness of the stack. BTW I see that homespan.h has vTaskDelay(5) in the autoPoll routine... one wonders if doubling this would improve the perfomance of the stack. |
Hi, I had this issue in the past, When the WiFi RSSI went in the range between -90 and -94 the WiFi module of esp32 hanging, even if RSSI became better the esp module can't reconnect again until you restart the esp 32 module. I didn't know if it was the esp 32 or the access point I had that caused the signal to go in that range. to resolve the issue I add in void loop() void loop(){ |
Interesting. I should have really good signal - the distance between the AP and the ESP is around 3m (10ft) which is close. IMO the cadence of the ping responses is very concerning. When I see a repetitive sawtooth of pings, it makes me believe that my sample rate is close to an even multiple of the loop rate. Moreover, the fact that the longest pings are approaching 200ms (outliers excluded) It also makes me believe that the poll() loop is taking around 200ms to execute. Idk if this is the case truly the case, but if it is, then I suspect it is starving the Ethernet Stack of processor time. When I get a chance I may look a little more deeply at the homespan code to see what’s happening. I may also add a long-press feature to my wall button, to force a hw reset if things go south. That way I won’t have to take the ladder out to reset the esp when it stops responding. Sent from my iPhoneOn Mar 18, 2024, at 7:36 AM, Nezaemmy ***@***.***> wrote:
Hi, I had this issue in the past, When the WiFi RSSI went in the range between -90 and -94 the WiFi module of esp32 hanging, even if RSSI became better the esp module can't reconnect again until you restart the esp 32 module. I didn't know if it was the esp 32 or the access point I had that caused the signal to go in that range. to resolve the issue I add in void loop()
void loop(){
homeSpan.poll();
if( WiFi.isConnected() && WiFi.RSSI()<-90)
{
WiFi.disconnect();
}
}
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I just ran into something similar today. My esp32-on-breadboard dev setup has two "power hardware configuration".
When I run via USB, it is normally to get access to serial output. There were no errors in the console. Hit Enter, HomeSpan displayed its standard DB info, and the accessories in the Home app became responsive. The last log in the serial console was ~24 hours ago, which isn't normal, as I know there should have been plenty of more serial lines printed (by a different library). To me it looks like the board must have gone in low power mode of some sort. .. another strange (possibly unrelated) thing, is that I use a callback when NTP time is updated, which happens every 4 hours. I print the time received from the callback, compare with the time of my system, and adjust the time of my system accordingly. But this last time entry logged, the NTP time received from the NTP server was 1.5 hour off... That is not normal either... |
.. and now, it lost WiFi, status led keeps flashing once per second, and serial does not reponds to any commands. I checked the power state of the device and USB hub, it is in D0 (full power). Not sure what's going on... |
I haven’t had a chance to look at the library in more depth yet. I did however, check the round trip ping times of a board that I designed and wrote the firmware for. My hardware (running a pic18f97j60 8 bit processor) consistently returns pings with 4ms round trip times. This is how it ought to be. The results with homespan are wildly different, hence I get the feeling that the homespan library is taking is starving the Ethernet stack. My ESP homespan project has been running now for a couple of weeks, after previously suffering from three of four failures back to back. That said, I still think the pings are very telling… when I get the chance I may see if I can split the library into smaller sub tasks , interspersed with stack calls. I am pretty sure that allowing the stack to be more responsive will make the library more robust. Sent from my iPhone. On Mar 28, 2024, at 11:17 AM, frankonski ***@***.***> wrote:
.. and now, it lost WiFi, status led keeps flashing once per second, and serial does not reponds to any commands. I checked the power state of the device and USB hub, it is in D0 (full power).
Not sure what's going on...
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
No need to guess - you can run any of the WiFi examples that Espressif provides. I just tried the SimpleWiFiServer example and the results of a ping yield the same pattern as HomeSpan:
As an additional check, I deleted all the server code from the SimpleWiFiServer example to create a sketch that does nothing but establishes a WiFi connection:
Ping results are the same. Whatever the reason for this pattern, it's unrelated to the HomeSpan library. |
This is both interesting concerning... Glad to here it's not homespan causing this, but regardless I suspect this may well have some impact on performance and the inexplicable failures some of us seem to be plagued with. I wonder how ESP code compiled outside the Arduino environment performs? I will email Espressif to what they have to say about round trip ping performance graphs I posted previously. |
That's a good idea. You may want to start with the folks developing the Arduino-ESP32 library since they seem to be separate from those that develop the core IDF. |
Of course mine went unresponsive today. LolSent from my iPhoneOn Mar 29, 2024, at 11:38 AM, HomeSpan ***@***.***> wrote:
That's a good idea. You may want to start with the folks developing the Arduino-ESP32 library since they seem to be separate from those that develop the core IDF.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I have an Idea for the WiFi problems, I think its all about Signal Power and hardware issues. ` void setup()
` in this code the esp32 forced to connect to the best Access Point Signal Power |
Sorry, I have been really busy at work and haven’t had a chance to dig deeper into this. That said l have a class that I wrote to debounce inputs. It’s called once per loop and increments or decrements a count based on the status of the input… my guesstimation based on the response time to key presses and the count threshold in my decounce routine, is that that the loop is being serviced somewhere around 10,000 times a second or 100us intervals. Whereas, based on WiFi pings, it seems like the tcpip stack is being serviced at a cadence of less than 50 times a second, which in my opinion is problematic.I don’t have anything with erratic pings like that in my home… someone else did a WiFi only test of the ESP and got similar results. One wonders what priority is given to the tcpip stack task in RTOS. I would like to see consistent sub-6ms pings which would mean servicing tcpip stack tasks much more frequently. I build a lot of embedded systems using small microprocessors - usually with far less capability than the ESP. Nearly everything I build is Ethernet based. My boards are consistently sub 3ms ping hardwired and, on a recent test on my home network, sub-5ms when bridged via wifi to the network. Long story short, IMO the WiFi needs to be more agile than it is, which I think means increasing its task priority in the RTOS.Sent from my iPhoneOn Apr 13, 2024, at 5:56 AM, Ronny M. Antoon ***@***.***> wrote:
I have an Idea for the WiFi problems, I think its all about Signal Power and hardware issues.
i have a Mesh Network, and the esp32 connecting to the Wrong Access Point always. i don't know why. so i tried to force the esp32 to connect to the best Access point with the best signal, by the driver codes didn't achieved it., so i made a snap code to force it by MAC Address of the Access Point.
`
#include <Arduino.h>
#include "WiFi.h"
void setup()
{
Serial.begin(115200);
// Set WiFi to station mode and disconnect from an AP if it was previously connected.
delay(100);
WiFi.disconnect(true, true);
WiFi.mode(wifi_mode_t::WIFI_MODE_STA);
WiFi.scanNetworks(false, false, false, 300, 0, "WIFI SSID", NULL);
WiFi.begin(WiFi.SSID(0), "WiFi Password", 0, WiFi.BSSID(0), true);
Serial.print("Connecting ");
int i = 0;
while ((WiFi.status() != WL_CONNECTED) && (i < 15 * 2))
{
delay(500);
Serial.print(".");
i++;
}
Serial.println("!");
}
`
in this code the esp32 forced to connect to the best Access Point Signal Power
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Home app is now also currently in this "No response" state. However:
|
Still the same issue, that's really annoying and i had tried every thing i know. Can you help me do that? |
Same here. In my case it crashed Twice in 24Hours after working for weeks. I did notice yesterday it took 10 or so seconds to respond to the garage door request to close. Then when I got home 3 hours later it was non-responsive in the app and had to be reset again. Sent from my iPhoneOn Apr 21, 2024, at 3:12 AM, Ronny M. Antoon ***@***.***> wrote:
Home app is now also currently in this "No response" state. However:
Wifi still works
weblogs (built-in, not my TLS web server version) working fine
Serial is responding to CLI commands
Printing json database shows no error in the json format
No memory error
Still the same issue, that's really annoying and i had tried every thing i know.
@HomeSpan Can you help me by making a HomeSpan Restart Function.
I have my program running together with the HomeSpan, and i want to make a function that when i click my button it will make a restart for the homespan alone without my program restart.
i want the restart to include restarting - MDNS - hapServer - WIFI
Can you help me do that?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
It hasn’t occurred since I made my previous post. What I need to check if it happens again is to which controller it is connected to (older AppleTV or new one) and try to remember which of these two AppleTV I used last… because ultimately, Home app. or Eve now connects to the controller, not to HomeSpan… |
I'll double-check, but I think since iOS17 requires a Home Hub, there will always be at least one active socket connection between HomeKit via the Home Hub) and a HomeSpan device (I need to see if this applies even if there are no Characteristics with notification permission). Assuming that's the case, I can add some (optional) logic to HomeSpan that checks to ensure there is always at least one active socket connection when WiFi is up, and if it finds there are NO active connections, it will close the WiFi connection and re-connect in a way that re-initialized MDNS. Though not elegant, this may be a viable workaround given that the source of the problem is unknown, but we know things get (temporarily) resolved if the device reboots. Given that this issue effects only a very small number of HomeSpan users, and it is intermittent (or rare, as @frankonski noted above) I continue to believe the primary cause is an incompatibility between the way MDNS messages are handled by the ESP32 and the way certain routers work under certain circumstances (ranging from WiFi signal, to drop-outs, to pass-through of MDNS messages, etc.). Regardless of the cause, hopefully the proposed workaround will address the issue. |
@HomeSpan Thank you a lot. you had made a good community with a good open source code. Good Job |
It is now happening again, live when I am working on it. Going in Home app, I can see that it is connected to my new AppleTV, which narrows down the possibility of an issue when my old AppleTV get sets as the controller. update |
I found other |
Intermittent, but perhaps not that rare. I have several homespan devices that randomly exhibit this behavior. It ‘feels’ like it is associated with WiFi outages, but I’ve been unable to identify a predictable behavior. David |
As an initial test, let's see what happens if we force a disconnect and reconnect of WiFi when the device goes into No Response mode. You can do this by adding a custom CLI command follows:
Then, when the device goes into No Response mode, type |
I am a student from China and I want to make a temperature and humidity meter. I replaced the simulated temperature changes with code that reads the actual sensor values in example program 12. However, after uploading the program, the device shows no response in the home app. Even the original program of example 12 is unresponsive after being uploaded. Can you tell me where the problem is?Thanks!!! |
Sorry for the inconvenience, but I added the Apple TV to my home, but the Apple TV and ESP32 are not connected to the same WIFI, and the iPhone and ESP32 are connected to the same WIFI, which causes the ESP32 to be able to pair with the phone but not receive data. Because the home hub is not on the LAN. |
Sorry, HomeKit device must be on the same WiFi network as your Home Hub in order to operate correctly. |
I built an ESP32 based garage door operator. This afternoon (after 10 days of running flawlessly) it lost homekit connectivity. My Home reports 'no response' for the garage door, whereas everything else (thermostat, door locks, etc.) are fine. I pinged my garage door opener, and it responded, but with wildly varying round-trip times. That's a little concerning given that it's less than 10ft from my access point. Never the less, it is on the network.
In my sketch, everything happens in void loop() in DEV_Garagedoor.h, which I presume is called by homespan. Anyway, each time that is called, I check timeouts for the light and the door, check for inputs from hardwired buttons for the door and light, and run a state for managing the open/closes cycles.
Interestingly, despite, my iPhone reporting 'no response' from the garage door, the controller still responds properly to the hardwired inputs - opens and closes to door, turns the lights on and off, etc. which means that the sketch is still running.
So, it's on the network, and the sketch is running... does anyone have any idea what might be causing this? Is there a homespan method that I would allow me to reset the controller in the event it loses connection with My Home?
Any suggestion would be appreciated.
The text was updated successfully, but these errors were encountered: