konnected-io / konnected-security

Konnected connects wired sensors and switches to SmartThings, Home Assistant, Hubitat and OpenHAB
https://konnected.io
Apache License 2.0
416 stars 322 forks source link

Reconnect WiFi after connection is lost #146

Closed jpbede closed 2 years ago

jpbede commented 3 years ago

I've installed a Konnected board in a non frequent building. I've had the problem, that the board lost its WiFi connection, so i can't trigger an alarm and/or use the actuators. Only solution was to enter the building to force a reboot.

This PR listens for WiFi disconnects and reconnects if needed. With this fix flashed on my board, the board is reachable since a bunch of hours without a reboot. This PR may also fix some other WiFi related problems.