I’ve got a couple Sonoff S31s I recently switched over to ESPHome. I am using the API instead of MQTT, however it randomly (and frequently) drops the API connection for about one second once or twice an hour. When the device loses the API connection, it powers off. This results in my S31 being power cycled a couple of times an hour.
[12:01:59][D][sensor.cse7766:147]: Got voltage=122.9V current=0.2A power=15.5W
[12:02:04][D][sensor.cse7766:147]: Got voltage=122.9V current=0.2A power=15.6W
[12:02:09][D][sensor.cse7766:147]: Got voltage=122.9V current=0.2A power=15.5W
WARNING Disconnected from API.
INFO Connecting to 192.168.10.217:6053 (192.168.10.217)
WARNING Couldn’t connect to API (Error connecting to 192.168.10.217: timed out). Trying to reconnect in 1 seconds
WARNING Disconnected from API.
INFO Connecting to 192.168.10.217:6053 (192.168.10.217)
INFO Successfully connected to 192.168.10.217
[12:02:27][D][sensor.cse7766:147]: Got voltage=159.0V current=0.3A power=20.1W
[12:02:32][D][sensor.cse7766:147]: Got voltage=122.9V current=0.2A power=15.6W
[12:02:37][D][sensor.cse7766:147]: Got voltage=125.4V current=0.2A power=15.9W
[12:02:42][D][sensor.cse7766:147]: Got voltage=123.4V current=0.2A power=15.6W
Has anyone else seen this behavior? If there is a way to keep the relay in its current state on reboot, that would also probably fix the problem.