There are many WiFi controlled outlets, switches, and other gadgets out there on the market these days. These are great tools for smart home automation and are available for a reasonable price. These devices add smart convenience to our homes and the ability to do voice control of lights and other appliances just by asking Alexa or Google if you have a smart speaker. These devices are super easy to setup in just minutes, but with such simplicity comes the cost of privacy and more importantly, cyber security. After all, simplicity is nice…
Almost all of these WiFi smart devices get their smarts from a cloud server that is operated by the manufacturer. In most cases, the manufacturer is a Chinese company who produced your device and is powering the smarts for the appliance in your home. Some people might be ok with this, but I prefer that the Chinese do not have direct access to the control point for appliances in my home. Most people are unaware of the fact that the manufacturer has direct access and control of appliances in their home because they often lack the understanding of how these wireless switches operate – if they only knew. When you give a command to operate a WiFi switch or control, your command is received by the app made for the device, which communicates with the cloud server, and this server then sends a command to your wireless device which is always in contact with it. This method of control works great and is reliable, but because it is carried by a 3rd party channel, it is open for privacy invasion and potential misuse by the manufacturer or their employees. Even if not for nefarious reasons, what happens to the cloud server providing the control if the manufacturer goes out of business? Chances are, your smart switch would cease to be smart.

Fortunately, most (if not all) of these devices use the ubiquitous ESP8266 wireless chip and there are open source firmwares available for the taking, so that you can re-flash your wifi switch and link it directly to your automation hub, foregoing the foreign cloud, and the risks. Tasmota, which is available on github is one of the most popular aftermarket firmwares that you can download and compile with the free Arduino IDE software, then flash the compiled firmware into the ESP8266 chip on your device using an FTDI 3.3v USB to Serial converter. There are 4 connections to the chip that must be made; VCC (3.3 volts), TX, RX, and Ground. Once these connections are made, there is nothing stopping you from flashing your own firmware and liberating your WiFi switch from the clutches of the foreign server.

One such device of many I have reflashed is a 3 outlet outdoor WiFi switch where each outlet is individually controllable. Taking the unit apart involves removing 4 phillips screws and locating the ESP8266 and the 4 required connection points. In this article, I’ll document it. In this picture below, you can see these connections marked:

Once flashed and reassembled, you must then plug it in, and use a browser to browse to the IP address of the device on your network (consult your router’s tools for this). Once on the device’s tasmota page, you can then click CONFIGURATION, then CONFIGURE MODULE:

Then on the CONFIGURE MODULE page, set the following settings:

At this point, you could control the device directly using the web page on the switch itself. This isn’t very practical, so in my case, I use Domoticz as a home automation hub – it’s also open source and VERY flexible and powerful. To do that, we’ll need to create 3 dummy switches in Domoticz, and find out the IDX (the device ID) in the domoticz console, and then provide this IDX number to the Tasmota firmware now running on the switch. This will let Domoticz directly control the device.

Finally, we need to setup a messaging transport (I use MQTT, it’s easy to setup and it’s reliable and flexible and works with Domoticz:

At this point, you should now be able to control each outlet via the switches on your local Domoticz hub:

Pingback: Automated Tank | Wizworks