Sonoff basic is a cheap solution to control over wifi a rele’ to turn on and off appliances, such as light or other devices.
I don’t like vendored solutions, so I will try to brick my Sonoff basic device while installing Tasmota.
Docs are pretty good and can be found at https://tasmota.github.io/docs/
There is also an hardware reference for many devices at https://templates.blakadder.com/sonoff_basic.html
To get started you need a FTDI programmer, can be found on Amazon for around 5 Euros.
The connection must be like this
Ensure you press the button 2sec when plugging the FTDI. If the Sonoff blinks means it is not in programming mode. Repeat every time you need to read/write to the device.
I followed the official guide at https://tasmota.github.io/docs/#/installation/Flashing
The tasmota binary is available on github
- Backup the current image
./venv/bin/esptool.py --port /dev/ttyUSB0 read_flash 0x00000 0x100000 fwbackup.bin
- Write the new firmware
Next step is to connect a wire and search for a network called
tasmota-* where you can configure a wifi connection.
Once done, search for your device (I found it in the router connected peers) and access it by its IP.