-
Notifications
You must be signed in to change notification settings - Fork 233
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
Accessory not responding after some time #132
Comments
There are people reporting that problem but I can not reproduce it on any of my devices (I use NodeMCU devices from HiLetgo and Makerfocus and a Sonoff Dual R2). If you could collect and post debug logs (with HOMEKIT_DEBUG=1) of devices when they become unavailable that could help nailing that issue. |
Hello, Below the debug logs of my accessory device. I would expect that after "Closing client connection" message, a Home app restart resumes the connection but it doesn't. I also disabled any other tasks to exclude race conditions or memory problems. see log below: ets Jun 8 2016 00:22:57 rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) I (3590) event: sta ip: 192.168.0.11, mask: 255.255.255.0, gw: 192.168.0.1
|
Hi, the same for me, but sorry I have no log... |
Hello, Just a short update... |
In my experience, it seems that only on ESP32 it fails, the same (almost...) code for homekit project under ESP8266 implmentation doesn't suffer of this. |
I have Wemos D1 mini failing as well. Has anybody found any solution? |
Could you please provide some instructions how did you do that? I would like to give it a try. Thanks |
Just clone esp-idf from release v3.2 branch here: |
I have the same issue: ESP32, homekit 'not responding' after a few hours. |
I found the issue regarding my case related to these disconnections: Now my question is: is it ok to call again homekit_server_init(...) when Wifi reconnects? Would it create memory leaks due to already allocated structures ? |
Here's a log of the issue with homekit debug info (ESP-IDF v3.2, ESP32 chip, several apple devices). At the end of the log, at least 2 apple devices were showing the accessory as "not responding". Refreshing the Home app (bringing it to the background and foreground) didn't trigger any new log output. I don't see anything suspicious on the log, except for the connections being closed. It seems like the issue is at another layer (mDNS?)
|
Same issue here. BUT: simple LED example has no connection problems ... |
I have the exact same issue using the Temp Sensor example with a ESP8266-12E and DHT22. Even with these problems, the work that has been done here is excellent. Is anyone aware of any other diy HomeKit development environments that we can test against? |
Sure thing this is an excellent work. In regards to your questions, have a look in this also excellent repo>> https://github.com/RavenSystem/esp-homekit-devices There is also a similar issue discussed here: RavenSystem/esp-homekit-devices#130 I don't know if this issue is caused by the code being not very well optimized or because of another layer not performing as expected (i.e. TCP, mDNSs etc) or even because of bad wifi environment or settings. |
There is also this repository, I didn't test it deeply |
Hello,
First of all, thank you to all contributors for sharing this library.
my setup:
latest version of homekit and dependinces cloned
M5Stack board / ESP32
iPhone X
tried two different setups: thermostat and temperature sensor.
I'm able to establish the pairing and install the accessory in my Home application, in a few minutes the accessory is not responding. After accessory restart all works fine for a few more minutes.
My implementation is similar with the one in the temperature sensor example, see below:
homekit_characteristic_t temperature = HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0);
homekit_characteristic_t humidity = HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0);
void thermostat_identify(homekit_value_t _value) {
ESP_LOGI("HOMEKIT","Thermostat identify");
}
homekit_accessory_t accessories[] = {
HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t[]) {
HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "Thermo"),
HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Mir"),
HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "001"),
HOMEKIT_CHARACTERISTIC(MODEL, "MyThermo"),
HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.1"),
HOMEKIT_CHARACTERISTIC(IDENTIFY, thermostat_identify),
NULL
}),
HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),
&temperature,
NULL
}),
HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),
&humidity,
NULL
}),
NULL
}),
NULL
};
homekit_server_config_t homekit_config = {
.accessories = accessories,
.password = "111-11-111"
};
homekit_config is sent as parameter to the homekit_server_init function called in SYSTEM_EVENT_STA_GOT_IP event. temperature and humidity characteristics are updates every 30s in a different thread.
I wonder what am I doing wrong?
The text was updated successfully, but these errors were encountered: