RavenSystem / esp-homekit-devices

Advanced firmware to add native Apple HomeKit and custom configurations, compatible with any SoC based on ESP32, ESP32-S, ESP32-C and ESP8266 series. (Shelly, Sonoff, Electrodragon, Tuya...)
Other
2.76k stars 361 forks source link

Critical !!! Wi-Fi resets after power failure #366

Closed St0nehead closed 5 years ago

St0nehead commented 5 years ago

Today, after power failure, all my RavenCore devices has been reset their WiFi settings. i'm reconfigured 10+ devices, to make all of them work again. FirmWare Version: 0.8.7

peros550 commented 5 years ago

I thing after a power failure I lost one device running custom firmware but based on the framework (esp-homeKit & esp-open-rtos) of this repo.

RavenSystem commented 5 years ago

Personally ,I have never had a similar issue.

St0nehead commented 5 years ago

Second power failure and same issue — all my Sonoff devices has been resetted. Please fix!

St0nehead commented 5 years ago

Still the same annoying bug — after each power failure, WiFi resets and Sonoff switches to AP mode (with 192.168.x.x ip address). Please fix! Really annoying problem!!! 🙏

peros550 commented 5 years ago

@RavenSystem are you planning to use esp-wifi-config latest version in your code? That code uses a more sophisticated approach with the AP creation.

RavenSystem commented 5 years ago

@peros550 no, because it enters into AP mode when wifi is lost, creating a security risk. I prefer my approach, that keep trying yo reconnect to known wifi and reannounces mDNS when success.

RavenSystem commented 5 years ago

@St0nehead sorry, but I am not be able to reproduce your issue.

St0nehead commented 5 years ago

1) Turn off your WiFi router. After 10-30 minutes, turn it on again. When Sonoff lost WiFi connection, it turns to AP mode. 2) Found temporary solution: After power failure, i wait router boot up. Then interrupt power on sonoff devices (but not WiFi router). Sonoff reboots and connects to WiFi.

peros550 commented 5 years ago

@peros550 no, because it enters into AP mode when wifi is lost, creating a security risk. I prefer my approach, that keep trying yo reconnect to known wifi and reannounces mDNS when success.

Hi Jose!

Why turning into AP mode is a security risk?

Kienz commented 4 years ago

@RavenSystem What happens to installed HAA devices if the WiFi router is powered off? Found these two sentences in the documentation (https://github.com/RavenSystem/esp-homekit-devices/wiki/Setup-Mode):

"If the configured WiFi network is unavailable then connect directly to a WiFi AP via the generated SSID e.g. HAA-XXXXXX (where XXXXXX are the last six characters f its Ethernet MAC address)."

"If the WiFi network becomes unreachable, the device will continually retry its connection until it becomes available again."

If it creates a WiFi AP the device could be taken over by any person in WiFi range of the IoT device. Correct? If yes, is this a security risk?

RavenSystem commented 4 years ago

If it creates a WiFi AP the device could be taken over by any person in WiFi range of the IoT device. Correct? If yes, is this a security risk?

Correct, but AP is created only in setup mode when WiFi is unreachable, never in normal mode.