Nowadays, a lot of IOT devices are working with the help of some servers based in China, USA, … Hopefully some Open Source firmware are available to free your IOTs to manage them fully and decide to which server they will connect.
One very interesting device is Sonoff TH 10 which includes a 10A switch, a temperature sensor and a humidity sensor.
This simple article explains how to :
- flash Tasmota Open Source firmware on a Sonoff TH10 wifi device
- configure the device with Tasmota firmware to connect to a Mosquitto MQTT broker
- setup an OpenHab server to manage a VMC based on this device, where humidity level manages the switch state.
To flash an alternative firmware on a Sonoff device, you will need a soldering iron, a USB to Serial adapter and a Linux computer.
This process has been tested with a basic FTDI USB adapter on a Ubuntu 18.04 LTS computer, but it should work on most USB to serial adapters and on any modern Linux distribution.