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

WLAN disconnect / reconnect #147

Open
thncode opened this issue Sep 12, 2021 · 2 comments
Open

WLAN disconnect / reconnect #147

thncode opened this issue Sep 12, 2021 · 2 comments

Comments

@thncode
Copy link

thncode commented Sep 12, 2021

I am using this great lib since quite a while successfully. Great work!!!
Now I wanted to make some of my appliances a bit more robust in terms of WLAN dependency. The appliance should work if there is no WLAN as well (of course without Homekit support during the outage). Starting without WLAN and connecting when it is available works great, but if the device is connecting to WLAN during the start phase, losing connection later and (successfully) reconnecting does not allow to reconnect to existing Homekit clients.

The log says

[ 174632] HomeKit: Starting server
[ 174636] HomeKit: Using existing accessory ID: FB:A0:23:18:B6:65
[ 174642] HomeKit: Found admin pairing with 03C48AC3-703E-40F8-BD39-392369FB4997, disabling pair setup
[ 174651] HomeKit: Configuring MDNS
[ 174656] HomeKit: MDNS restart: Glashaus, IP: 192.168.178.148
[ 174662] HomeKit: Init server over

but no reconnect...

Is there any reconnect / reset option or need for such situations?

@ruleechen
Copy link

ruleechen commented Oct 8, 2021

Perhaps the same scenario with this issue #139

@sonicpixel2020
Copy link

I added this to my loop:

`
uint32_t next_wifi_connect;

void loop() {

const uint32_t t1 = millis();
if (WiFi.status() != WL_CONNECTED)
{
if (t1 > next_wifi_connect)
{
// reconnect every 5 seconds
next_wifi_connect = t1 + 5 * 1000;
wifi_connect();
my_homekit_setup();
}
}
else
{
my_homekit_loop();
}
delay(10);
}`

paullj1 added a commit to paullj1/Arduino-HomeKit-ESP8266 that referenced this issue Feb 25, 2023
Izumiko pushed a commit to Izumiko/Arduino-HomeKit-ESP8266 that referenced this issue May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants