Skip to main content

Posts

Showing posts with the label Tasmota

Smart Home Control Panel using ESP-Link

This post describes the control panel developed with a few open source software and libraries. The main purpose is to have a proof of concept that the various components can be put together to become a useful product. I have built a smart home system controlled using Openhab and the hardware switches are primarily using Sonoff switches with Tasmota firmware. The switches are controlled using Openhab Habpanel using an Android Tablet. Generally, this is my preferred way of  using the Android Tablet but the Arduino control panel is developed so that it can interface to external hardware at low cost. The control panel is developed using ESP-Link firmware with the El-client APIs and the hardware is an ESP8266 and Mega2560 combi board.  Besides acting as a touchscreen based on/off switch, it is also an internet clock (ntp) and a doorbell buzzer. The software/firmware/libraries are ESP-Link el-client APIs (interface to ESP-Link firmware MCUFriends Arduino library...

A Super IR Transmitter

One of the difficulties I had with the common IR transmitter module block from Arduino kit is it is not powerful. It can only transmit from a distance of about 1 m and the angle is very narrow. I need an effective distance of more than 3m and a wider angle and I wanted to use Tasmota as the bridge so that I can send the IR commands from my PC or another remote non-IR device. The circuit for the super IR transmitter is as follows. On the web, I have found 2 approaches: connect multiple IR LEDs in series or parallel. The parallel configuration will provide more current to the LEDs and the series configuration will provide less current. I chose the series circuit because the resistance in the parallel circuit cannot be matched properly and the LED with the lowest resistance will get more power than the other which may result in 1 IR Led brighter than the other. I managed to find a super bright IR transmitter LED in Aliexpress. The LED has a blueish tint compared to the...

WIFI switch

Lately, I have been experimenting on how to DIY a simple WIFI switch which can switch on/off a remote device. I can use OpenHAB to design a screen and use it on my mobile phone to do the job but I wanted a physical switch. I have put together the switch using a Wemos D1 mini and a capacitive touch switch. The capacitive touch switch has a nice blue glow when it is turned on. A NPN transistor is used as a switch to pull the D1 mini GPIO to the ground when activated. Tasmota has a configuration for Switch mode . When a switch is toggled, it will send out a MQTT message. I have made both the Sonoff RF Switch and DIY switch listened to the same queue. When the switch is touched, it will turn on/off the Sonoff RF Switch. Cool !!!

UPDATE 1: DIY Sonoff RF Bridge with Sonoff RF

The Sonoff RF I have ordered arrived. It is similar to Sonoff Basic in term of the layout. Flashing the device with Tasmota firmware is easy. In Tasmota website, the instruction recommended soldering a jumper at R21. I discovered that this is not necessary. To start up the ESP in programming mode, I only need to short the inner pin of R21 to ground when powering up the ESP. After I have flashed the device, I was trying to pair with my RF433 with pre-defined code but it does not go into pairing mode and I also noticed the ESP01 randomly throws errors. I suspected that the FTDI serial adapter may not have enough current to power both the ESP and the RF board. I put back the casing, powered the device using AC and cleared the existing code. I paired the Sonoff RF with my fixed code RF433 transmitter and using the DIY Sonoff bridge Web UI to trigger. Presto! The bridge is able to switch on/off the Sonoff RF. That is a promising start for the DIY bridge. More exciting integ...

DIY Sonoff RF Bridge

Tasmota recently supported the RF bridge by iTead which allowed for RF 433 remote devices to be controlled/controlling using Sonoff products. e.g A handphone can be used to control a remote RF device or an RF remote control can use to control a WIFI enabled device. By using Tasmota, I can control the device using MQTT. This idea fits exactly to my smart home plan. Here is the schematic: I cheated a bit by having ESP01 mounted on a breakout board. This breakout board converts all the external pins to 5v which simplified the wiring and I do not need to use a voltage level shifter. Moreover, the Arduino 3.3v power does not have enough current to power the ESP reliably and I have to power it via the 5V from Arduino Uno. Next, I used an Arduino Uno prototype shield with a tiny breadboard to hold all the components together. For the RF 433 transmitter/receiver, I am using the development kits when I purchased the all-in-one Arduino development kits. An antenna is added for m...

The Edge Devices - Sonoff, ESP8266 and Tasmota

Sonoff, ESP8266 and Tasmota, how are these 3 components related? This can be viewed as a computer where Sonoff is the computer, ESP8266 is the CPU and Tasmota is the Operating System. Sonoff  is one of many companies in China which manufactures smart home WIFI connected devices such as switches, plugs and lights. Their devices are very popular among DIY smart home builders because they make it convenient to flash custom firmware. I have bought a few of such devices,  Basic Switch ,  RF-Wifi Switch ,  Wall socket  and  Light Switch . This can be easily found on Aliexpress, Taobao and Banggood, Videos and articles on how to modify to custom firmware can be found on Youtube. ESP8266 is one of the amazing makers modules that come out after Arduino. Espressif has make the ESP Microcontroller programmable using the Arduino IDE. The library has the entire TCP stack built in making it possible to be programmed as a mini web server, tcp/udp server/client. There ...

Smart Home Components

Next, I need a Micro P rocessing Unit (MPU), Micro-controller (MCU) and the software. After some design considerations, I have decided the brain of my system shall be a Raspberry PI. Raspberry is easily available. I have purchased mine at Taobao for less than S$70. It comes with a casing, power supply, 3xheat sinks, fan and a 16GB micro SD. This is the cheapest I can find. There are so many documentations, videos and websites on Raspberry Pi.  I watched a youtube clip showing Google Home assistant can be easily installed on a Pi. That sealed my decision to choose Raspberry Pi.  The next piece shall be the automation software, Currently, the most popular Home Automation control software are Openhab and HomeAssistant. I do not have time to evaluate both and settled for Openhab as I am more of a Java programmer. In case anything that needs debugging, it will be easier for me (but it turned out that I do not really need to look at the code). I like the Arduino ...