Skip to content
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

Open
prolixmusic opened this issue Mar 1, 2024 · 51 comments
Open

Homespan Device unresponsive in Homekit. #791

prolixmusic opened this issue Mar 1, 2024 · 51 comments

Comments

@prolixmusic
Copy link

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.

@HomeSpan
Copy link
Owner

HomeSpan commented Mar 1, 2024

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.

@prolixmusic
Copy link
Author

prolixmusic commented Mar 1, 2024 via email

@frankonski
Copy link
Contributor

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.

@prolixmusic
Copy link
Author

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??

@HomeSpan
Copy link
Owner

HomeSpan commented Mar 8, 2024

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?

@prolixmusic
Copy link
Author

prolixmusic commented Mar 8, 2024 via email

@HomeSpan
Copy link
Owner

HomeSpan commented Mar 8, 2024

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.

@prolixmusic
Copy link
Author

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)
MDNS.setInstanceName(displayName); // set server display name
MDNS.addService("_hap","_tcp",tcpPortNum); // advertise HAP service on specified port

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??

@HomeSpan
Copy link
Owner

HomeSpan commented Mar 9, 2024

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.

@prolixmusic
Copy link
Author

prolixmusic commented Mar 9, 2024 via email

@HomeSpan
Copy link
Owner

HomeSpan commented Mar 9, 2024

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.

@prolixmusic
Copy link
Author

prolixmusic commented Mar 9, 2024 via email

@HomeSpan
Copy link
Owner

HomeSpan commented Mar 9, 2024

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 😄.

@prolixmusic
Copy link
Author

prolixmusic commented Mar 10, 2024 via email

@prolixmusic
Copy link
Author

prolixmusic commented Mar 10, 2024

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?

@HomeSpan
Copy link
Owner

The Arduino-ESP32 library already has the vTaskDelay() built into main loop() function so should be okay. Can you post a copy of your full sketch?

@prolixmusic
Copy link
Author

prolixmusic commented Mar 10, 2024

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..

@HomeSpan
Copy link
Owner

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.

@prolixmusic
Copy link
Author

prolixmusic commented Mar 10, 2024

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!

@prolixmusic
Copy link
Author

BTW here are some of the many mDNS responses from the ESP32. Does the fact that they do not all contain the same data point to anything?

Screenshot 2024-03-10 193908

@HomeSpan
Copy link
Owner

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 setVal(). These should be very sporadic and only occur when there is an actual state change that needs to be reported. If the garage door is opening, you should set currentState to OPENING only once. Flooding the network with continuous setVal() updates can certainly cause connectivity issues.

You should definitely enable the HomeSpan Web Log (simply add homeSpan.enableWebLog() to your sketch) and check if you can reach it from the browser with its IP address while the device appears to be working, and then again when your diagnostics show there is a problem.

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.
Note if you can reach the weblog that does not mean it's definitely an MDNS problem, but it is more likely.

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.

@HomeSpan
Copy link
Owner

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.

@prolixmusic
Copy link
Author

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..

@HomeSpan
Copy link
Owner

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.

@prolixmusic
Copy link
Author

prolixmusic commented Mar 11, 2024

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.

@prolixmusic
Copy link
Author

BTW on mDNS i found the Wikipedia page to be quite helpful for the basics ...

So here you can see my Homekit Hub asking QUESTIONING (QM) Spaceship Dock, and Spaceship Dock responding with a partial message. You can tell by the 0x**** sequence number that Spaceship Dock is responding to a specific request versus something that is global
Screenshot 2024-03-10 201250

Interestingly, here it respond to the same question with even more data. Why is one concatenated??
Screenshot 2024-03-10 201506

I have times when the response to the same message is completely empty too... This makes no sense to me.
Screenshot 2024-03-10 202843

I am pretty sure that responses with sequence number 0x0000 are responses to a more generalized question for all devices to post data. That being the case, I think those packets should always contain the PTR, SRV and TXT fields.

@prolixmusic
Copy link
Author

prolixmusic commented Mar 13, 2024

Tried posting this via email, the other day, but the image didn't post... Anyway, these are ping results for homespan... the cadence is interesting and not what I'd expect.
Ping Statistics
These are the results for my homeSpan sketch with no delays. I then tried adding an additional vTaskDelay(5) before the homeSpan.poll() routine and did see a decrease in roundtrip time of around 20%, but the same sawtooth cadence coupled with trend for roundrtip times to increase over time. I was hoping that I might see something more consistent like sub 10 ms round trip times, but unfortunately that was not the case.

@Nezaemmy
Copy link

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();
}
}

@prolixmusic
Copy link
Author

prolixmusic commented Mar 19, 2024 via email

@frankonski
Copy link
Contributor

I just ran into something similar today. My esp32-on-breadboard dev setup has two "power hardware configuration".

  1. Getting 12v from alarm panel system > 5v regulator (with heatsink) & capacitor for stability > 5v PIN of the esp32 dev board. No USB connection to dev board. I have seen this setup stable, up and running for 2+ weeks.
  2. Getting power via USB to esp32 dev board (and I disconnect that 12v power source)

When I run via USB, it is normally to get access to serial output.
This morning, my HomeSpan accessories were showing as "Not Responding", and I was in that 2nd / USB powered setup. I could VNC into the laptop which as the dev esp32 board connected, with PIO permanently in serial monitor mode.

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...

@frankonski
Copy link
Contributor

.. 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...

@prolixmusic
Copy link
Author

prolixmusic commented Mar 29, 2024 via email

@HomeSpan
Copy link
Owner

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:

64 bytes from 192.168.1.11: icmp_seq=323 ttl=255 time=199.605 ms
64 bytes from 192.168.1.11: icmp_seq=324 ttl=255 time=232.263 ms
64 bytes from 192.168.1.11: icmp_seq=325 ttl=255 time=182.654 ms
64 bytes from 192.168.1.11: icmp_seq=326 ttl=255 time=296.353 ms
64 bytes from 192.168.1.11: icmp_seq=327 ttl=255 time=78.652 ms
64 bytes from 192.168.1.11: icmp_seq=328 ttl=255 time=50.929 ms
64 bytes from 192.168.1.11: icmp_seq=329 ttl=255 time=265.951 ms
64 bytes from 192.168.1.11: icmp_seq=330 ttl=255 time=339.872 ms
64 bytes from 192.168.1.11: icmp_seq=331 ttl=255 time=269.596 ms
64 bytes from 192.168.1.11: icmp_seq=332 ttl=255 time=143.144 ms

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:


#include <WiFi.h>

const char* ssid     = "yourSSID";
const char* password = "yourPassword";

void setup()
{

    delay(10);


    WiFi.begin(ssid, password);

    while (WiFi.status() != WL_CONNECTED) {
        delay(500);
    }

}

void loop(){

}

Ping results are the same. Whatever the reason for this pattern, it's unrelated to the HomeSpan library.

@prolixmusic
Copy link
Author

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.

@HomeSpan
Copy link
Owner

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.

@prolixmusic
Copy link
Author

prolixmusic commented Mar 29, 2024 via email

@ronny-antoon
Copy link

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

@prolixmusic
Copy link
Author

prolixmusic commented Apr 13, 2024 via email

@frankonski
Copy link
Contributor

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

@ronny-antoon
Copy link

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?

@prolixmusic
Copy link
Author

prolixmusic commented Apr 21, 2024 via email

@frankonski
Copy link
Contributor

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…

@HomeSpan
Copy link
Owner

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.

@ronny-antoon
Copy link

@HomeSpan Thank you a lot. you had made a good community with a good open source code. Good Job

@frankonski
Copy link
Contributor

frankonski commented Apr 21, 2024

It is now happening again, live when I am working on it.
HomeSpan stops responding to serial commands as well, /status built-in URL is not responding. OTA not responding either. The board is responding to pings, and I also know that the main loop is working as the other library I use keeps on logging events in the serial console.

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 scratched my comment above. All this was due to a separate thread I was starting which never yielded / called usleep() to hand over to the main thread HomeSpan runs in causing all of HomeSpan to not be responsive.

@frankonski
Copy link
Contributor

I found other while(1) preceded by a LOG0 rather than Serial.print(). I will be updating my PR #823 soon with these extra logging. The issue may hide there.

@dsbeach
Copy link

dsbeach commented Apr 21, 2024

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.

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

@HomeSpan
Copy link
Owner

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:

new SpanUserCommand('D', " - disconnect WiFi", [](const char *buf){WiFi.disconnect();})

Then, when the device goes into No Response mode, type @D into the CLI.

@eilidan
Copy link

eilidan commented Apr 22, 2024

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!!!

@eilidan
Copy link

eilidan commented Apr 22, 2024

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.

@HomeSpan
Copy link
Owner

Sorry, HomeKit device must be on the same WiFi network as your Home Hub in order to operate correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants