Zigbee2MQTT and Node-RED switch Toggle over MQTT

In a prior post , I had accidentally purchased a Zigbee smart switch instead of a WiFi smart switch. I had no Zigbee hub at that moment, so it went into the drawer. In watching a lot of YouTube videos, I repeatedly heard about a project called Zigbee2MQTT. This project acts as a proxy between a USB Zigbee dongle and MQTT, allowing you to control Zigbee devices with MQTT messages. Since most of my devices are already using MQTT, this seemed like a good fit for my home automation setup.

Read More

Tuya Universal IR Remote

Adding to the ever-growing list of IoT devices in my home, I recently purchased a Tuya Universal IR Remote. This device is a small IR blaster that can be controlled via the Tuya Smart Life app. It can be used to control a wide range of IR devices such as TVs, air conditioners, and more. The device is powered by a BK7231N chip, which can be flashed with OpenBeken firmware to enable local control and integration with Home Assistant.

Read More

Flash Generic $2 Smart Plug

I’ve been on the hunt for some additonal smart plugs, and recently I’ve been seeing some extremely cheap ones from AliExpress for $2, so I bought one to see if it’s able to be reflashed with ESPHome or OpenBeken. Following the instructions in the box I’m directed to download the eWelink app, which I’m not interested in using, but I will use only briefly to ensure the device is working before I flash it.

Read More

Low-voltage power monitoring with EasyPower

When working with battery powered devices, knowing how much power they consume will tell you how long they will last on a charge or a fresh battery. This is imporant to know when replacing the stock firmware with ESPHome or Tasmota, which can drastically change the power consumption of the device. Many battery-powered IOT devices spend the majority of their time in a deep sleep state, and only wake up briefly to perform a task, then go back to sleep. This is great for battery life, but makes it difficult to measure the power consumption of the device over time. The INA219 is a great little chip that can measure both voltage and current, and when paired with a microcontroller, can be used to measure the power consumption of a device. This post will cover how to use the INA219 with ESPHome to monitor the power consumption of a device.

Read More

Flash Tuya Mini Smart Switch with ESPHome

Continuing the Tuya device hacking series, this post describes how to flash the Tuya Mini Smart Switch with ESPHome firmware. I picked up a few of these switches on sale for only a few dollars each, found that each of them are slightly different internally, despite looking almost exactly the same on the outside. This post covers the first of the three different versions I have, but I’m sure there are more out there.

Read More

Almost bricking BK7231N modules

So, I was given bad/outdated advice and I was spreading it to future me and anyone else that stumbles across these blog posts. I’m use to dealing with Amtel and ESP microcontrollers, and familiar with the tools needed for them. When I started working with the BK7231N, I had read that the hid_download_py tool was the only reliable way to flash the BK7231N in MacOS from the terminal. I was able to successfully make use of this tool to flash the OpenBeken firmware, however when I tried to flash ESPHome or esphome-kickstart, not only was I unable to get it to burn without failing CRC check, the module would no longer boot unless I flashed the OpenBeken firmware again.

I had gone on the hunt for better tooling, and found a few new options:

Read More

Flash Tuya CB3S Switches with OpenBeken

I recently picked up a couple of no-name WiFi switch from AliExpress, they are sold under a variety of names, but the ones that look like mine all use the Tuya app. I was hoping to flash it with ESPHome, but unfortunately, it doesn’t contain an ESP8266 module, instaed using a Tuya CB3S module, which is not supported by ESPHome. These switches had been using ESP-12F modules for some time, but have since transitioned to CB3S. Fortunately, I was able to find a project called OpenBeken, which is a custom firmware for the Tuya CB3S module. It’s more basic than ESPHome, but it did actually do what it said it would, with very little effort.

Read More

Flash Etekcity Plugs (ESW01) with ESPHome

I’ve been slowly amassing a collection of various smart plugs and switches around my house for the purpose of setting up a home automation system. I picked up a single Etekcity ESW01 plug to test out, and was pleasantly surprised to find that it was based on the ESP8266, a very popular and well supported microcontroller. I hadn’t played with home automation in a while, and was excited to see how far it had come. Where previously, I would have had to roll my own firmware, and then write my own integration for Home Assistant, I found that there is now a project called ESPHome which allows you to easily flash ESP8266 and ESP32 devices with a custom firmware, and then integrate them into Home Assistant.

Read More

DIY Espresso Distribution Tool

I had been wondering why my home espresso machine pucks would sometimes turn out dry and sometimes turn out looking like mud. After several YouTube videos later, I’m now convinced that my grounds lack equal distribution prior to tamping, as my current process involves scooping in a dome of grounds and pressing it down. This causes a dense part in the middle (top of the dome), and loose grounds around the edge. The YouTube experts recommend distribution, either by practiced hand methods, or by using a tool, of which there are several to choose from. I liked the “Weiss Distribution Method” or “wire-stir” method, as it seemed straightforward and didn’t require a $30 precision made tool. I found several on Amazon, but I’m feeling equally lazy as I am impatient, so rather than spend $10 and wait two days, I’m going to make my own with items I already have.

Read More