Automated unit testing in the metal
Unit testing your code is peace of mind. It has two main direct benefits that impact on your confidence about the code you are writing:
Testing expected behaviors Avoiding regressions (i.e. breaking something that was working fine before) Unit testing embedded systems is a bit more involved since there is the additional constraint of the hardware itself, sometimes more than one device or even different platforms. Quitting (or not even thinking about it) is the easy answer to the problem....
Useful notifications from your home appliances using Node-RED
Some time ago I worked on a home project to get a notification when my washing machine had done its job based on monitoring its power consumption. There was a good reason for that, the machine was outside the house and I had already forgotten about the laundry several times. And when that happens your only option is to wash it again, because it really smells musty…
Monitoring your appliances Use ESPurna :)...
EEPROM Rotation for ESP8266 and ESP32
The Arduino Core for ESP8266 and ESP32 uses one SPI flash memory sector to emulate an EEPROM. When you initialize the EEPROM object (calling begin) it reads the contents of the sector into a memory buffer. Reading a writing is done over that in-memory buffer. Whenever you call commit it write the contents back to the flash sector.
Due to the nature of this flash memory (NOR) a full sector erase must be done prior to write any new data....
Sonoff S31, a world apart
It's not that other Sonoff products are not “serious” business, but there are a number of design changes in the Sonoff S31 that make this new product a world apart. For the functional point of view it looks like a S20 with POW-powers, but they have redesigned the product completely. The result is very very interesting.
Revamped case, more compact and sturdy Redesigned PCB, actually 2 different PCBs for main and control Different power monitor chip: the CSE7766 (same as in the new POW R2) replaces the HLW8012 The only drawback: it's only compatible with plug types A & B, tat is central and north-america and few other countries....
Yet another WiFi light bulb
Eight months ago I reviewed and hacked the AiLight WiFi light bulb by AiThinker. By the time there was a number of people doing the same because of a key reason: it sports an ESP8266 microcontroller and it is based on the OpenLight by Noduino, that had already provided open source code for the LED driver inside, the MY9291.
Let time pass and I was doing the same with the Sonoff B1 light bulb by Itead Studio....
Sonoff B1, lights and shades
Six months ago I was reviewing the AiThinker AiLight, a great looking light bulb with an embedded ESP8266EX microcontroller, driven by a MY9291 LED driver. Just before summer IteadStudio released it's Sonoff B1 [Itead.cc] light bulb, heavily inspired (probably same manufacturer) by the AiLight, at least on the design.
Now that IteadStudio has become popular between the home automation community you can also find the Sonoff B1 on global marketplaces like Ebay or Aliexpress for around 13€....
Connected power meter
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....
Hacking the Sonoff RF Bridge 433
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....
Using Google Assistant to control your ESP8266 devices
In my last post I tried to explain how to access your IoT devices at home from the Internet in a secure way using a reverse proxy. Truth is that I had it running since maybe 6 months ago without giving it too much use until recently. Reason? My Nexus 5 had been having serious problems (battery not charging, screen broken, earpiece not working,…) and I decided to replace it with a new mobile phone and the new one has Google Assistant built in....
Secure remote access to your IoT devices
When you are hacking with IoT devices at home you get to face the challenge of accessing remotely to them, that is from outside your home network. I'm not saying your home network is a safe place, beware. But that thing outside, you know, “the Internet”, it's so scary… Unfortunately, most IoT devices are just not ready for the jungle. Neither the commercial ones, nor the hacked ones you might have....