In a previous article, I wrote about an MQTT bridge by 1technophile. I added a DHT temperature and humidity sensor as well as a light sensor. Previously it included a software decoder to decode the IR signal. I never did test the IR transmitter on the gateway, as I didn’t have the parts. But thanks to IC Station, who sent me over a small YS-IRTM hardware based decoder and NodeMCU that I am writing about today. I have replaced the software based version with the YS-IRTM module in the latest update. I found this project challenging. I admit I am a little weak in my programming skills. It was difficult to find documentation but I found a forum talking about this device and basics of how it works. When an IR code is recognized it sends 3 hex codes via serial connection on the transmit pin. To transmit, it expects […]
$12 AI Light ESP8266 based WiFi RGB Light Bulb Supports MQTT via ESPurna Open Source Firmware
AI-Thinker is famous in the maker world for their ESP8266 modules, but they’ve also recently launched a WiFi RGB light bulb that sells for about $12.5 and up on eBay and Aliexpress. Some people noticed, and bought samples online, including Xose Pérez (aka Tinkerman), ESPurna open-source firmware developer, who could confirm ESP8266 was used in the light bulb, did some investigations, and eventually added the light bulb into ESPurna, which means it can be managed using MQTT or a web interface. AI Light looks very similar to Philips Hue, but comes with WiFi instead of Zigbee. AI Light “M1636” key features: RGBW LED E27 bulb with 16.7M colors Connectivity – 802.11 b/g/n WiFi Encryption – AES Voltage Range – 110-240V LED Power – 5 watts WiFi Power Consumption – ≤0.3W Temperature Range – -5~45degree Humidity – ≤80% Certifications – FCC, CE, ROHS If you’re going to use the stock firmware, […]
Karl’s Home Automation Project – Part 2: 433 MHz / WiFi MQTT Bridge, Door & PIR Motion Sensors
Karl here again for part 2 of my home automation project. We will be looking at how to automate your lights based on time of day and motion. In the first part we setup Home Assistant and uploaded firmware to basic Sonoff Wifi switches. Today we will setup a 433 MHz to MQTT bridge and some sensors. 433 MHz Depending on your country 433 MHz is an open frequency to use to communicate with. There are hundreds of different types of devices that use 433 MHz to communicate information. We will be focusing on 2 today from Gearbest: WMS07 motion sensor (left) and WDS07 door/window sensor (2 parts, right). I am not taking the door/window sensor apart, since it is super basic, but I’ve included some photos of the PIR motion detector. 433 MHz Bridge While contemplating how to get presence on a per room basis I ran across this […]
Karl’s Home Automation Project – Part 1: Home Assistant & YAML, MQTT, Sonoff, and Xmas Lights
Karl here. I am here to write about my home automation project. First thing I want to say is that I am very cost conscious and I don’t mind putting in extra effort into the setup of things to keep costs down. I did invest a lot of time and had to do a lot of reading to get my project going. It took while and I received a lot of groans from my wife while testing. I am still in the process of tweaking things. I started watching a series of videos on YouTube from Bruh Automation. He introduced me to Home Assistant. It got me really excited. He uses a Raspberry Pi as a server but I already had a Wintel Pro CX-W8 Smart TV Box which I use as a server. I run 3 Minecraft Servers, Emby Server, iSpyConnect DVR (2 IP Cameras), Unifi wifi controller, and […]
How to use Sonoff POW with ESPurna Firmware and Domoticz Home Automation System
Sonoff POW is an ESP8266 based wireless switch with a power meter that comes pre-loaded with a closed-source firmware that works with eWelink app for Android or iOS by default. But we’ve also seen Sonoff POW, and other Sonoff wireless switches from the same family, can be flash with open source firmware supporting MQTT (Message Queuing Telemetry Transport) lightweight messaging protocol such as ESPurna, and I initially sent data from Sonoff POW to ThingSpeak via an MQTT broker (mosquitto) to draw some pretty charts. I did that with the switch connected to a lightbulb, but I’ve since installed Sonoff POW in my office to measure the room’s power consumption minus the ceiling light and aircon as shown below. Sonoff cable mechanism is really a pain for hard copper wires, as they are hard to push inside the mechanism, and something come out. I finally managed by it took longer than […]
How to Use Sonoff POW ESP8266 WiFi Power Switch with MQTT and ThingSpeak
ITEAD Studio’s Sonoff is a family of cheap home automation products based on ESP8266 WiSoC, and I’ve already tested Sonoff TH16 wireless switch with a humidity and temperature sensor using the stock firmware and eWelink app for Android or iOS. It works, but up to recently it required a registration to a cloud service (the company will now allow use from the local network), and the source code is closed. So for the second device under review, namely Sonoff POW wireless switch with a power consumption monitor, I decided to install ESPurna firmware working on ESP8266 Sonoff devices and NodeMCU, as it’s open source, supports Sonoff POW natively, includes a web interface to control the device from the LAN, and includes an MQTT client. MQTT (Message Queuing Telemetry Transport) is a lightweight publish/subscribe messaging protocol used to control IoT sensors and devices, and it’s a popular method to gather data […]
How to Install ThingSpeak in Ubuntu 16.04
Last week-end I installed ESPurna open source firmware with MQTT server on Sonoff POW WiFi switch, and the next step is find a way to draw power consumption charts in some web based interface. We could do this in the IoT cloud with services like Xively or ThingSpeak, but since one of the goals of replacing the default firmware was not to rely on a proprietary cloud based solution, I decided to find a way to draw those chart in a local server, and it so happens that ThingSpeak is also open source with the code available on Github. Hardware platforms like NanoPi NEO / NEO Air, or Orange Pi Zero boards appear to be particularly well suited for the task of running an MQTT broker and Thingspeak, but at first I wanted to install ThingSpeak in my own Ubuntu 16.04 computer to have a try. As you can see […]
How to Build and Flash ESPurna Open Source Firmware to Sonoff POW Wireless Switch
ITEAD Studio Sonoff family is comprised of various inexpensive ESP8266 WiFi power switch, and the company sent me two of their latest CE certified models with Sonoff TH16 + external temperature & humidity probe, and Sonoff POW to measure power consumption. I checked the hardware is the first part of the review, and used Sonoff TH16 to control a water pump with the stock firmware and Ewelink Android app in the second part. It works reasonably well, but it relies on the cloud, so if you lose your Internet connection or the service closed, you can’t control the relay manually anymore. Luckily, the UART pins are exposed on Sonoff switches so you can solder a 4-pin header and connect a USB to TTL to flash your own firmware. Please don’t connect Sonoff devices to the mains when programming them, it’s very dangerous, instead the USB to TTL board will power […]