Trigger Your Home Automation Routines With Home Buttons

Home automation systems are all well and good, so long as the person who built it all is around to drive it. Let’s face it, they’re quite often a complex web of interconnected systems, all tied to the specifics of one’s home — and someone less familiar with it all could get a little irritated if, on a chilly day, the interface to the boiler is via a Python script, and something won’t work. Just saying. Home Buttons by [Matej Planinšek] over on Hackaday.IO is a nicely polished project, which aims to take some of the hackiness out of such automation by providing a sleek front end to those automation routines, enabling anyone to rock on over and set one in action without hassle.

Internal PCB shown in the foreground, with the complete unit behind.The PCB is based around the ESP32-S2-mini which deals with WiFi connectivity and integration with Home Assistant using the usual MQTT protocol. We expect integration with other flavors of home automation would not be difficult to achieve. The center of the unit holds a simple E-Ink display, for that low-standby power. Specifically, the unit chosen is a Good Display GDEY029T94 2.9″ which this scribe can confirm is easy to interface and pretty cheap to purchase from the usual Chinese online vendors. This was matched up with six clicky Alps SKRB-series low-profile tact switches, which sit on either side of the display, and corresponds to a flexure-type affair on the 3D printed front casing. Neat and simple.

The PCB design was provided in Altium format, which you can find on the project GitHub page. This shows a straightforward design, with a few nice little details here and there. The internally mounted 18650 cell is reportedly good for at least a year of operation, but when time, it can be charged via USB. A Xysemi XB8608AF (PDF) protection chip provides appropriate limiting for the 18650 cell, shielding it from the perils of overcharging, discharging, and whatnot. Not that that is likely in this current setup. A Sensiron SHTC3 humidity and temperature sensor is also in there, hanging off the I2C bus, which makes sense for this application.

Home Automation hacks are plenty on these pages, like this scroll-wheel interface, for instance. If all this stuff is looking quite overbearingly complicated to get into, how about starting with a Pico W?

This Week In Security: OpenSSL Fizzle, Java XML, And Nothing As It Seems

The security world held our collective breaths early this week for the big OpenSSL vulnerability announcement. Turns out it’s two separate issues, both related to punycode handling, and they’ve been downgraded to high severity instead of critical. Punycode, by the way, is the system for using non-ASCII Unicode characters in domain names. The first vulnerability, CVE-2022-3602, is a buffer overflow that writes four arbitrary bytes to the stack. Notably, the vulnerable code is only run after a certificate’s chain is verified. A malicious certificate would need to be either properly signed by a Certificate Authority, or manually trusted without a valid signature.

A couple sources have worked out the details of this vulnerability. It’s an off-by-one error in a loop, where the buffer length is checked earlier in the loop than the length variable is incremented. Because of the logic slip, the loop can potentially run one too many times. That loop processes the Unicode characters, encoded at the end of the punycode string, and injects them in the proper place, sliding the rest of the string over a byte in memory as a result. If the total output length is 513 characters, that’s a single character overflow. A Unicode character takes up four bytes, so there’s your four-byte overflow. Continue reading “This Week In Security: OpenSSL Fizzle, Java XML, And Nothing As It Seems”

A Pi Pico plugged into a breadboard, with an I2C OLED display connected to it

Need An USB-I2C Adapter? Use Your Pico!

Given its abundance and simplicity, the RP2040 has no doubt become a favourite for USB peripheral building – in particular, USB-connected tools for electronics experiments. Today, we see one more addition to our Pico-based tool arsenal – a USB-I2C adapter firmware for RP2040 by [Renze Nicolai]. This is a reimplementation of the ATTiny-based I2C-Tiny-USB project and complies to the same protocol – thus, it’s compatible with the i2c-tiny-usb driver that’s been in the Linux kernel for ages. Just drag&drop the .uf2, run a script on your Linux system, and you will get a /dev/i2c-X device you can work with from userspace code, or attach other kernel drivers to.

The software will work with any RP2040 devboard – just connect your I2C devices to the defined pins and you’ll have them show up in i2cdetect output on your Linux workstation. As a demo, [Renze] has written a userspace Python driver for one of these SSD1306 128×64 OLEDs, and gives us a commandline that has the driver accept output of an ffmpeg command capturing your main display’s contents, duplicating your screen on the OLED – in a similar fashion that we’ve seen with the “HDMI” I2C-driven display a few months back. Everything you might need is available on the GitHub page, including usage instructions and examples, and the few scripts you can use if you want to add an udev rule or change the I2C clock frequency.

Just to name a few purposes, you can use a Pi Pico as a tool for SWD, JTAG, CAN, a logic analyser with both digital and analog channels, or even as a small EMP-driven chip glitching tool. The now-omnipresent $3 Pi Pico boards, it seems, are a serious contender to fondly remembered hacker tools of the past, such as the legendary BusPirate.

Continue reading “Need An USB-I2C Adapter? Use Your Pico!”

Garmin HUD Got Discontinued, But Not Trashed

The Garmin HUD+ was a small Bluetooth device intended for the dashboard of a car, meant to be used as a GPS heads-up display for data from Garmin smartphone apps. It used a bright VFD (vacuum fluorescent display) which was viewed through a clear reflector, and displayed GPS information and directions. It was discontinued in 2015, but [Doz] was fond of his and used it happily until a phone upgrade meant it no longer worked. Was it destined for a landfill? Not if he had anything to say about it!

The first thing [Doz] tried was using an alternate Android app, but since it also didn’t work, it was time to sit back and reflect on the scope of the issue. In [Doz]’s case, he really only wanted some basic meaningful data displayed, and decided he could do away with the phone altogether if he had the right hardware. Continue reading “Garmin HUD Got Discontinued, But Not Trashed”

Driving Three-Color E-Paper Pricetags With An Arduino

ePaper pricetags are becoming popular parts in the hacker community as a cheap way into tinkering with the technology. [Aaron Christophel] got his hands on a 4.4″ model with red, black, and white colors, and set about programming an ESP32 to drive the price tag instead.

The protocol the display uses was reverse-engineered by prompting the display to update via RF and monitoring the signals sent to between microcontrollers on the display’s control board. Once the protocol was understood, one of the microcontrollers could then be removed and replaced with an ESP32 for direct control. Implementing this takes some disassembly and some delicate soldering, but it’s nothing that should scare off an experienced hacker.

With the right code flashed to the ESP32, as available on Github, it’s possible to run the display directly. The hacked code does a great job driving the display, showing crisp lines and clean colors that indicate the e-Paper display is running properly.

We’ve seen [Aaron’s] work before in this area, when he hacked simpler two-color e-ink price tags. He’s also gone so far as creating entire wall displays out of salvaged displays, which is quite the sight. Video after the break.

Continue reading “Driving Three-Color E-Paper Pricetags With An Arduino”

Get Clear Insights Into Cloudy Water With The Open Colorimeter

A basic scientific tool for chemistry and biology is a colorimeter device used to measure which wavelengths of light a particular sample solution absorbs. Some applications of colorimeters are measuring pH or chlorine levels, measuring pollutants, such as oil or pesticides, and, in some cases, can even be used to measure RNA/DNA concentrations. Even most washing machines today have a specialized colorimeter sensor, of sorts, to measure turbidity (cloudiness) to provide feedback on the cleaning process. To help in building your home scientific lab, [IORodeo] has released an Open Colorimeter.

A blown out diagram of the Open Colorimeter showing the 3d enclosure, the PyBadge, the LED board and sensor along with text describing each element

The Open Colorimeter is a self-contained device that accepts cuvettes filled with liquids for testing. The basic structure is an LED mounted onto a board that shines through the cuvette filled with a sample that is then measured at the other end by a TSL2591 color sensor. The Open Colorimeter has separate specialized LED boards for a range of wavelengths from 470nm to 630nm and incorporates a PyBadge that serves as the main microcontroller, as well as display and input.

[IORodeo] has done extensive documentation on the assembly, usage, and testing of the device. They have also provided protocols for the measurement of Ammonia, Nitrate, Nitrite, and Phosphates in addition to providing resources for absorption profiles of many other substances. All files relating to the 3D enclosure, firmware source code, schematics and Gerbers are provided under an open source hardware compatible license. For those not wanting to build it themselves, [IORodeo] is offering them for sale.

This isn’t the first time we’ve featured colorimeters, with some building a DIY version and others using it in a Tricorder project. The Open Colorimeter is a nice addition to this list and is ready for hacking and extending!

Generating Stereo FM Signals, Thanks To Python

A casual understanding of how AM radio works is pretty easy to come by, and standard FM is only a little more complicated. Things can go off the tracks a bit with stereo FM, though — figuring out how they squeeze two separate audio tracks onto one radio signal is a bit of a head-scratcher. In that case, wrapping your head around the concept might be helped by mocking up a stereo FM signal with an arbitrary waveform generator and a little bit of Python.

Not that [Sebastian] of Baltic Lab was unfamiliar with multiplex FM theory, mind you. As he explains it, his goal was to generate a valid stereo FM signal with a different pure tone on each channel, 700 Hz on the left and 2,200 Hz on the right. Luckily, [Sebastian] has a nice AWG, the Siglent SDG1032X, which has an Ethernet connection that can be used to control it remotely along with PyVISA, a Python package for controlling instruments using the Virtual Instrument Software Architecture protocol.

The meat of this project, and what really helps drive home the concept of putting multiple audio signals onto an FM signal, lies in the Python code that generates the component parts. [Sebastian] does a great job explaining how he programatically generates the sum and difference signals along with the 19 kHz pilot tone, and puts them all together into one waveform. The output of the program is used to generate a series of values that are sent to the arbitrary waveform generator, which outputs the desired FM signal. Looking at the output on a spectrum analyzer, the two audio tones are clearly visible, as are the attenuated pilot tone and some other spikes a little further up.

Just add an antenna to the setup and you’d have the world’s dullest FM radio station — but at least it’d be in stereo. Or if you want to check out the origin story for FM radio, we’ve got something for that too.