shelly to tasmota to esphome
ESPHome is a quite slick system for basically configuring IoT devices using yaml, which generates C++ along with tooling for building/flashing/updating devices. Not only does it support all sorts of homemade custom stuff, but it can be flashed on to a variety of commercial devices, many of which are just ESP32/ESP8266 dev boards in a moustache.
So, for instance, a new Shelly Plus Plug, which is a pretty small wifi-controllable mains plug and be re-flashed to be a pretty small wifi-controllable mains plug and bluetooth proxy for Home Assistant. It turns out that Shelly not only makes the devices re-flashable, but they make it extremely trivial - the default firmware will happily GET a firmware off the Internet, re-flash and reboot itself.
- (optional) assign a static IP to the device in your DHCP server so you don't lose it
- grab the right download link from https://github.com/tasmota/mgos32-to-tasmota32
- pop
http://shellyIP/ota?url=http://theURLyoujustcopiedin the url bar of your browser and hit enter, and it'll download and install the firmware and reboot - wait a minute or two
http://shellyIP/- you should see the Tasmota web interface- configure wifi and reboot
- get or write an ESPHome yaml config for the device - https://devices.esphome.io/ has many pre-canned ones, e.g. this for my Plus Plug S
- build an ESPHome binary from that with
esphome shelly_plus_plug_s.yaml buildor paste it in to the HA ESPHome add-on UI. Note: I'm pretty sure this must be built as a legacy firmware. - on
http://shellyIP/, "upload firmware" - done!
If you've configured it for HA, it'll show up as a newly detected device.