Posts

Showing posts with the label smartplug

Update to smart plug rules for controlling bathroom fans manually

Today I made some changes to the rules that let the smart plugs running tasmota in the bathrooms turn on the fans. With these rules a short press turns on the fan, and a long press turns on the switch. Rule1 on switch1#state=3 do Power 2 endon Rule2 on switch1#state=2 do publish cmnd/sw_bri_03/POWER 2 endon Rule1 1 Rule2 1

Tasmota Smart Plugs, MQTT and Home Assistant

Image
After getting  Tasmota flashed onto Sonoff S20 and S26 smart plugs  I then needed to get them configured and talking to Home Assistant . MQTT Given that Tasmota is designed to be used with MQTT , this seemed like a sensible place to start. I had Home Assistant running on my Raspberry Pi Zero W in a python virtual environment , so I set about installing the Mosquitto MQTT broker  on the same Raspberry Pi. As usual, the wealth of resources available on the internet made this a relatively easily process, and this article  was very helpful. The following commands updated the package list in Raspbian and installed Mosquitto. Mosquitto started automatically after the install. $ sudo apt update $ sudo apt install mosquitto mosquito-clients MQTT works with the concepts of topics and messages. Devices or software tools can listen (or subscribe) to messages on a given topic, and also publish messages to a given topic. Anything interested in a particular topic can ...

Tasmota on Sonoff S20 and S26 Smart Plugs

Image
After failing to install Tasmota on some Australian certified smart plugs using tuya-convert  I embarked on dismantling some Sonoff S20 and S26 smart plugs and flashing Tasmota  on them using a CH340G USB to serial adaptor. I purchased the CH340G USB to serial adaptor from eBay, and you can see it below. So, starting with the S20 , there are some good instructions on flashing this device in the Tasmota documentation . I firstly disassembled my device, and had a look at the board.  You can see there are various sets of header holes, but it is those near the button that can be to be used to flash the device. Unfortunately mine weren't labelled, but the instructions I referred to previously had an image of another PCB which had the headers labelled. So, I connected the headers to the CH340G using duPont cables. It's worth noting that the RX and TX cables need to be crossed so that RX connects to TX, and vice versa. The CH340G was set to supply 3....

Flashing smart plugs with tuya-convert FAIL

Image
I purchased a Medion Life+ Smart Plug from Aldi , for the purpose of doing some experimentation, and setting up a few automation ideas I had by connecting it to my Home Assistant instance . After getting it home, and doing a bit of I realised that these plugs were actually manufactured by Tuya , and were simply rebranded with the Aldi Medion brand. I found that there was a Tuya component for Home Assistant  that worked with the Tuya cloud, however upon doing some more reading, a more appealing solution emerged. I realised that many people were flashing Tuya based devices with custom firmware such as Tasmota  or ESPHome , which allowed local control of the devices over a local network using Home Assistant.  Usually flashing these devices means pulling them apart and using a USB-to-serial adaptor to flash the custom firmware. But, even more searching led me to tuya-convert which makes it possible to flash some Tuya-based devices over the air. So,...

Sonoff S20, RF Bridge and PIR2 Motion Detector

Image
With a lot of smart home products coming on the market, and being discussed in my various news feeds, I was keen to start experimenting with some devices. There appeared to be a lack of products intended for the Australian market, and so after a bit of reading I learnt about Sonoff products manufactured by a company named  ITEAD  and purchased the following items. Sonoff S20 Smart Plug Sonoff RF Bridge Sonoff PIR2 Infrared Motion Detector My thinking was that I would use the S20 Smart Plug to experiment with some home automations, and use the RF Bridge and IR Motion Detector as the beginnings of a home security system. Configuration required installation of the eWeLink app by Sonoff. Unfortunately, when I sat down to start configuring the RF Bridge, I realised that potentially I was giving away more information through the app than I was willing to provide. My first pause point was the need to provide the password to my WiFi network. I also consi...