ITEAD Smart Home Products
https://www.itead.cc/wiki/Sonoff_Smart_Home_Solution
These very cheap modules come with their special smartphone app but are all actually based on the famous ESP8266. It didn’t take long till the tinkerer community got a hold of that and started hacking. After opening up the cases, all you need to do is solder a few header pins and connect your FTDI breakout programmer. Alternative firmwares are ready to provide nice MQTT based Wifi SmartHome endpoints without the need to either pay a lot of money, resort to special or propitiatory communication links or build open hardware from scratch.
What you’ll need
- Itead modules, e.g. Sonoff, S20 Smart Socket-EU/US/UK, Sonoff Pow - 5-12€
- FTDI USB to TTL Serial Adapter (3.3V!) - 5€
- Alternative Firmware: arendst/Sonoff-MQTT-OTA-Arduino (outdated)
Successor: arendst/Sonoff-Tasmota
Active development, new devices supported quickly, check release notes
Firmware Flashing and Usage
I hate to repeat information That’s why I added all instructions needed to get the Sonoff-Tasmota firmware onto your Sonoff modules and into your network in the project wiki, please check there for details:
The process is quite easy:
- Order whichever modules you want to use (obviously, check compatibility)
- Access the on-board serial interface (check the wiki Hardware section)
- Flash Sonoff-Tasmota via PlatformIO
- Connect to AC power
- Configure Wifi by using one of the provided configuration modes: Button Usage
- Connect to the device webpage
- Select the correct Sonoff module type from the configuration frontend
- Configure the MQTT broker connection, choose a unique topic, e.g. “sonoff-A00F9D”
- Test communication with the MQTT client of your choice (e.g. mqtt-spy)
- Integrate with openHAB!
openHAB Integration
The Sonoff modules with the Tasmota firmware will connect to your local Wifi and MQTT broker. If you do not already utilize an MQTT broker or are unaware of “MQTT”, please read up on that now.
The usage with openHAB is straight forward. Activate the MQTT binding and configure the connection details to your MQTT broker as described here, then define appropriate items linked to your desired MQTT topics (depends on module type). Examples:
sonoff.items:
//Sonoff Basic / Sonoff S20 Smart Socket
Switch LivingRoom_Corner_Light "Indirect Corner Light" <light> (LR,gLight)
{ mqtt=">[broker:cmnd/sonoff-A00F9D/power:command:*:default],
<[broker:stat/sonoff-A00F9D/POWER:state:default]" }
//... please visit wiki for more ...
More examples for different Sonoff modules can be found at https://github.com/arendst/Sonoff-Tasmota/wiki/openHAB
Flashing in Progress
Flashing without soldering, using Pogo Pins (P75-LM2 / P75-LM2 or P75-T2):