Home Creators Posts Import Register Favorites Logout

Content

"Sonoff" devices are cheap Wi-Fi controlled "smart switches" often used  for smart home automation (Not to be confused with "Sonos" devices, which are an excellent Wi-Fi connected speaker system!). I thought they might be a useful way I could trigger power to mains devices in an escape room, by subscribing to MQTT messages published by my Node-RED ER control software. 

The problem is that Sonoff switches don't work locally - they require a permenant internet connection, and are triggered from an external Sonoff server.  That might be great if you want to integrate with Amazon Alexa or Google  Home, but not so great if you'd rather have the security and control of using them on a private network or controlled by a local server  application. 

Fortunately, there's a (relatively) easy solution - using an FTDI  programmer you can reprogram the ESP chip inside the Sonoff to use a  custom Tasmota firmware instead - that lets you connect to a local Wi-Fi  / MQTT broker instead, which can be triggered by your Node-RED flow.  The new firmware also provides a web interface that you can connect directly to the IP address of your smart switch from, say, your mobile device to toggle power on/off.  It's a little bit of a fiddly process, but, for the price, you end up with a pretty flexible Wi-Fi enabled mains relay.

You can buy a Sonoff basic switch for around $5 from  https://www.banggood.com/custlink/DmmvAcybbb

You'll also need an FTDI programmer to flash new firmware onto the Sonoff chip, which is around $2.50:  https://www.banggood.com/custlink/v33DQcEQkE

Download the latest Tasmota firmware from  https://github.com/arendst/Tasmota/releases

The software I used to flash the new firmware onto the Sonoff is called "Tasmotiser", available from  https://github.com/tasmota/tasmotizer/releases

A full guide is also available from  https://tasmota.github.io/docs/#/installation/ 

Files

Local Wi-Fi/MQTT Automation of Mains Appliances with Sonoff and Tasmota

SonOff devices are cheap Wi-Fi controlled "smart switches" often used for smart home automation. The problem with them is that they require an internet connection, and are triggered from a central Sonoff server. That might be great if you want to integrate with Amazon Alexa or Google Home, but not so great if you'd rather have the security and control of using them on a private network or controlled by a local server application. This was the case when I wanted to use my Node-RED based Escape Room control software to control mains appliances. Fortunately, there's a (relatively) easy solution - using an FTDI programmer you can reprogram the ESP chip inside the Sonoff to use a custom Tasmota firmware instead - that lets you connect to a local Wi-Fi / MQTT broker instead, which can be triggered by your Node-RED flow. You can also connect directly to the IP address of your smart switch from, say, your mobile device to toggle power on/off. - You can buy a Sonoff basic switch for around $5 from https://www.banggood.com/custlink/DmmvAcybbb - You'll also need an FTDI programmer, which is ardoun $2.50: https://www.banggood.com/custlink/v33DQcEQkE - Download the latest Tasmota firmware from https://github.com/arendst/Tasmota/releases - The easiest way to flash your Sonoff chip to use the new firmware is using Tasmotiser, available from https://github.com/tasmota/tasmotizer/releases  Full guide is also available from https://tasmota.github.io/docs/#/installation/ For more tutorials regarding escape room technology, see https://www.patreon.com/playfultech

Comments

No comments found for this post.