Apparently the Sonoff THR316(D) has a problem with boot loops under ESPHome firmware. One of the solutions seems to be a minimal configuration with OTA included. The idea is to then upload the intended configuration via OTA with the device powered up on AC power.
My problem is that, while I was able to configure the device and upload the binary via USB and the OTA SSID is visible, the programmed password is being rejected. There are some posts about this problem suggesting that including the ID: !expand construct but I believe this may refer to earlier releases of HA. In any case I couldn’t get that to compile. Likely because I didn’t construct it properly.
I have used EspHome web interface to write the basic configuration but that apparently did not include OTA, as I didn’t see an associated SSI.
All attempts to make password changes have failed to allow login. Not sure where to go from here.
You will need to take it apart and serial flash it. This is not an easy task if you haven’t done this kind of thing before. Be aware that the you need to make sure to NOT plug it in to AC power. You will need to provide enough 3V3 power when you serial flash it. Many USB serial converters do NOT provide enough current to support Wi-Fi (which is why people seem to have so much trouble with these).
Flashing is not a problem. I have flashed it sooo many times. As I indicated, this minimal configuration with OTA, is working, as I see the instance on my network. The problem is that for some reason the password that is set in the configuration is being rejected.
There is speculation that insufficient power is the problem but this exercise with the minimal configuration with OTA has been used by others as a workaround.
How have you flashed it, if you can’t connect to it? Or are you saying you use serial flash for the minimal OTA and that part works and you have done that multiple times?
If it was mine, I would take it apart and use my separate 3V3 regulator to power it (it can supply 1A) and then serial flash the real application I want and read the logs from when it starts up. That is what I did/do on all my Sonoff devices.
I will try that, thanks.
Yes, I have flashed it multiple times via USB. Nothing untoward happening during the serial connection portion. I can see the device on my network but when asked for a password it rejects the password in the config file. I have tried the trick to change the password in the onboot: lambda routine but it still acts the same.