Flash Tasmota firmware Over The Air on Tuya Wifi switches

dropcap emylo

Nowadays, you get very cheap wifi switches based on ESP8266/85 and Tuya IOT services. As Tuya company offers very cheap smart home solution branding, you'll find a huge number of branded switches based on their service.

Only problem with these devices is that they are working with some China based servers. So every time you want to switch-on your light with such a switch, your command need to go to China and come back. In case your internet is down or their server is having trouble (which happens too often) … no light !

This is not exactly what you can call freedom. Hopefully some Open Source firmware like Tasmota are available to liberate your Tuya based IOTs. Once flashed with this firmware, your devices can be configured to connect to any local MQTT broker or Home automation server.

Tuya Convert project is allowing you to flash an alternative firmware over The Air thanks to VTRUST hack.

This article explains step by step procedure to flash a Tasmota firmware OTA on most ESP8266/85 Tuya based wifi switches. It typically needs a Raspberry Pi with a Wifi adapter and a Linux computer. Your Wifi adapter should be able to enter in AP mode (which is the case with most recent models).

It has been tested with a Ubuntu 18.04 LTS workstation, an old Raspberry Pi B+ and a D-Link DWA-131 Wifi USB key. TP-Link TL-WN727N has also been used succesfully.

Read more: Flash Tasmota firmware Over The Air on Tuya Wifi switches

Sonoff TH10 - Hygro-controled VMC with Tasmota, MQTT and OpenHab

dropcap sonoff th10

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.

Tasmota is one of these Open Source firmwares built to handle lots of IOTs based on ESP8266 chipset, like Sonoff devices.

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 :

  1. flash Tasmota Open Source firmware on a Sonoff TH10 wifi device
  2. configure the device with Tasmota firmware to connect to a Mosquitto MQTT broker
  3. 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.

Read more: Sonoff TH10 - Hygro-controled VMC with Tasmota, MQTT and OpenHab

Heatzy - Manage your Heatzy Pilote devices under Linux

dropcap linux heatzy

Heatzy is a french startup which manufactures some nice IOT devices. I recently got some Heatzy pilote wifi devices that you connect to any electrical heater thru a French technology called 'fil pilote'. Once connected to your wifi network, these devices allow you to control your electrical heaters over internet from any smartphone (IOS or Android) with their proprietary app.

A nice thing about Heatzy is that they lately made their devices manageable thru some public API called Gizwits Open API.

Based on these API, I decided to write two Linux tools to control these devices :

  • a small bash script to control Heatzy pilote devices from command line
  • a simple GUI to illustrate usage of this script

Why a bash script ? First because bash programming is fun. Next, and most important, because a bash script can be used by any type of application : a GUI, a cron task, a web server, a domotic solution, … This opens some simple yet powerful interconnection capabilities.

At the time of this article, you find 2 generations of devices :

  • Heatzy (generation 1)
  • Pilote2 (generation 2)

 This article explains the main principles and usages of a bash script in charge of the complete management of Heatzy pilote devices (generation 1 & 2).

It has been tested with Debian and Ubuntu workstations.

Read more: Heatzy - Manage your Heatzy Pilote devices under Linux

Heatzy - Setup a Heatzy Pilote to MQTT Gateway under Linux

dropcap linux heatzy

One year back, I started to use some Heatzy pilote devices. Heatzy is a french startup which manufactures IOT devices.

Heatzy pilote devices are connected to your wifi network and allow you to control your electrical heaters over internet from any smartphone (IOS or Android) with Heatzy proprietary app.

A nice thing about Heatzy is that they also publish some API called Gizwits Open API to manage their devices.

I've written a first article explaining how to manage your Heatzy devices from Command line under Linux.

To open wider management possibilities, I decided to write a simple Heatzy to MQTT Gateway. This gateway goal is to allow you to set and to get your Heatzy pilote state thru a simple MQTT broker like Mosquitto. It is a complete bridge between Heatzy server and your MQTT clients.

It should greatly simplify the declaration of your Heatzy pilote devices in most home automation software solutions (OpenHab, Domoticz, Jeedom, …).

This article explains how to setup a Heatzy to MQTT gateway for Heatzy Pilote devices generation 1 and 2.
Gateway will work as a systemd service.

Article also provides an integration example in OpenHab home automation software.

It has been developped under Debian 9.0 but it should work on most modern Linux distros.

Read more: Heatzy - Setup a Heatzy Pilote to MQTT Gateway under Linux

Domoticz - Handle your exhaust speed according to humidity level

dropcap domoticz

Nowadays, a Mechanical Controlled Ventilation (VMC in French) is a de-facto equipment in a bathroom.

Most of these Controlled Ventilation can run in two different speeds : low speed and high speed. VMC runs low speed any time and can be switched to high speed with a manual switch.

Thanks to home automation, it is now possible to automatically manage your Controlled Ventilation speed according to humidity level in the room.

This article explains how to automatically manage a Controlled Ventilation speed according to humidity level in a bathroom with the help of :

  • a wireless humidity sensor
  • a wireless switch
  • a wireless gateway
  • Domoticz, a very nice Open Source Home Automation Software

This setup has been tested on a Debian 8 Jessie server with a RfxTrx433 gateway, an Oregon Scientific THGR 122 Temperature/Humidity sensor and a DiO 54755 switch. All RF devices are working on 433 MHz frequency. But any other similar setup and devices should work as long as they are compatible with Domotiz.

Read more: Domoticz - Handle your exhaust speed according to humidity level