I have a couple of IKEA-like boxes in my home office labeled “Inbox”. They are full of stuff I buy and store waiting for some free time to spend on them. From time to time I pick one of the boxes and take a look at its contents. They are actually full of “wow” stuff. I would buy again most of the things there but at the same time I fear I’m just collecting stuff that will become junk.
I couple of week ago I rescued from one of those boxes an M5Stack Core Development Kit and some other stuff that was there for maybe 6 months.
I’ve been somewhat busy lately and it’s been a long time since my last post. I have a few projects on the go but not much time to sit down and write about them… Let’s see if this one goes through…
I’ve been lately looking for a reliable UPS system for Raspberry Pi 3. I moved my home server to a RPi a few months ago and even thou its behind an ACS UPS a couple of other projects involving RPis required mobility (one of them) and unassisted power backup (the other). So I started browsing several marketplaces looking for a solution.
A few weeks ago a user came with a request to add support in ESPurna to a power meter that had been hacked by Karl Hagström. It is a very cheap chinese power meter with plenty of room on the inside, enough to house an ESP8266 module and a DC/DC power supply and the main IC protocol had been reverse engeneered. There even was a repository by the Harringay Maker Space with sample code for an arduino compatible platform.
I found it really interesting so I jumped in and ordered two of them (for 25,20 euros in total). Unfortunately the seller I bought it from has ran out of them. But you can still find them on the usual market places, like these ones [Ebay] or (also with non-EU variants) these ones [Aliexpress].
When I received them I quicky unscrewed the enclosure of one of them and… wow, it looked slightly different than that on Karl’s post but also different from the one the people at Harringay Maker Space had worked with.
I went back and forth and I noticed the hack was almost 2 years old and the board was clearly different: different version (unlabelled on Karl’s pictures, version 2014-04-28 on Harringay’s power meter and 2016-12-18 on mine), different board layout with a different connector between the power meter board and the display (7 wires on theirs, 6 on mine). But the most important difference was the main power meter IC. Karl had reverse engineered the ECH1560 on his power meter, a 24pin SOP package (on the back on his device, on the front in Herringay’s power meter). Mine was only 16pin…
I had to decipher the IC mark using parts from both devices since the manufacturer had crossed out the marks (they don’t want us to hack it or what?). Finally my best guess was V9261F. I quicky googled it and… bingo!
Itead Studio has been releasing interesting gadgets for the Home Automation community based on a low price tag and extreme hackability. You can google “sonoff” (the main brand for Itead Studio home automation devices) to get more than a million hits, including official pages, reviews and lots of hacks. The ubiquitous ESP8266 (or its sibling ESP8285) is the core of all those devices, using WiFi instead of the traditional RF messages, replacing a remote with mobile apps or voice commands. But also, using custom firmware like ESPurna, technologies and solutions like MQTT, Node-RED or Home Assistant. But one of the latests devices from the chinese firm tries to bridge the gap between those two technologies: the Sonoff RF Bridge 433.
A few months ago I wrote about the Sonoff SC sensor hub by Itead Studio. It’s a device with a Sharp GP2Y1010AU0F [Aliexpress] dust sensor, a DHT11 humidity and temperature sensor, an LDR as light sensor and a mic. The sensors are driven by an ATMega328P microcontroller but there is also an ESP8266 on board for WiFi communication, a pretty standard set up when you have several sensors and the ESP8266 GPIOs are just not enough.
On the first post I already did a small mod to replace the DHT11 humidity and temperature sensor with a more accurate and pin compatible DHT22. Since then, several readers have contributed with code and ideas. My progress implementing and testing them is slow, so I though about writing a first post about some modifications I (and others) have done to the device.
So this is a work in progress post. At the moment, all the code for these modifications is in the dev branch of the repository.
This custom Sonoff SC firmware is released as free open software and can be checked out at my SonoffSC repository on Github.