@nielspiersma what do you think about a possibility to write OBK settings directly to binary file, but on Windows (or Linux), before flashing?
@p.kaczmarek2, we did that in the past with tasmota, but in the end, we concluded that we wanted to use a more standardized approach. I have over 100 ESP82xx in my home now, and every switch is Tasmotized (or BeKenized). And the simple nature of things is that stuff breaks. And it always breaks when you don't want or need it broken. That's why we now have the following approach. The switch is dumb and HomeAssistant controls, so I want to do as little as possible on it and have HomeAssistant control it.
So we flash the chip and only provision the minimal configuration. Then we connect it to HomeAssistant and inject (via MQTT cmnds) all required configuration settings. So, in the beginning, all devices are equal. Once booted, they get their respective settings. If they break, I can quickly swap them without remembering any specific device-related settings.
So the only values I would like to write to OBK initial flash would be wifi and MQTT login. That would save the step in AP mode. And have it report directly to HA, ready to receive the configuration. We provision via "script" or "automation' using MQTT publish from there.
We put a lot of trust into HA; that's why I also was looking for detaching the buttons. We want HA (via MQTT) to toggle the switch.
Are you flashing by wire or by OTA hack?
@p.kaczmarek2, both, but I prefer using the OTA hack, as it doesn't require physically opening/damaging the devices. So my approach currently consists of the following; can I open the device without damage? If so, open the device, study it, remove labels, and track the electronics. Add it to Tuya Cloud and recover MCU version number. And finally do cloud-cutter. (post a tear down).
I investigated, desoldered the tuya board, and downloaded the pristine firmware for cracking. Still, almost all firmware is uploaded now, so there is no real need now.
But soldering is still on the board.
Btw new UART flashing tool is on the way to release: