chester's blog

technology, travel, comics, books, math, web, software and ramblings

(Cheap) 433Mhz Leak Detectors in Home Assistant via Arduino + OpenMQTTGateway (with Telegram alerts)

Jul 30, 2019

Water incidents in a condo can be catastrophic, and surely things like shutting your main water valve when you go out for long periods and having the proper coverage in your insurance are important. But for added peace of mind, leak detectors aren’t a bad idea.

When I saw these $3 leak detectors on eBay, I decided to give them a shot. Not only for low price, but also because they used 433Mhz RF - the same tech I use to voice-control my lights from a Raspberry Pi.

Once they arrived, I ran RFSniffer and indeed, when they get wet, the Raspberry Pi prints a different value for each sensor - so it should be easy to wire up an alert system… right?

Fixing a loose Nintendo Switch Joy-Con

Jul 6, 2019

The Nintendo Switch is surprisingly sturdy, but this is a common problem: joy-cons that still click (and oh, how I love that click) and snap to the console, but slide off when they shouldn’t (e.g., right in the middle of an online game match).

The cause is a plastic latch that erodes slightly with use (or maybe after it gets jammed on the backplate when you mis-connect it). There is a cheap replacement for that latch that you can order here†.

The replacement latch is made of metal (which should have been Nintendo’s original choice), and several videos (like this one) show how to replace it. No soldering is required, just some careful screw removal and disassembly.

With the usual caveats (you do it on your own risk, it voids your warranty, etc.), here is how it went for me.

Using Ansible to configure a Raspberry Pi (Home Assistant, LIRC, 433Utils, Z-Wave, etc.)

Apr 13, 2019

A while ago I built a couple inexpensive hacks that added voice-command to my tv and then to my lights using a Raspberry Pi, Google Home Mini, infrared and RF radio. Since then, I added other things, which prompted me to move the hacks into the popular Home Assistant home hub software.

With so much of my routine depending on that setup, backup became a concern. I’d make an occasional copy of the SD card with dd, but that isn’t a good long-term solution. Ideally, I wanted to rebuild my setup easily, should the card get corrupt, slow or just wrecked by my ongoing hacking.

Enter Ansible. Sysadmins use it to write “playbooks” that represent the changes they would manually apply to a server. If done right, such playbooks can be applied to an existing server (fixing any broken configs), or a brand new one (to recreate its services).

The Raspberry Pi is just a (tiny) server - meaning hobbyists can use Ansible as well!

I’m not an Ansible expert (there are better places to learn about it), but my Ansible configs and these notes may be useful for anyone interested in automating Raspberry Pi setups (for home automation or anything else).

Renovating an Atari 2600 (AV mod + capacitor/power adaptor replacement)

Feb 18, 2019

A while ago I got this beautiful Atari 2600 all-black, 4-switch model - often nicknamed “Darth Vader”, for obvious reasons:

The console generates a TV signal, which the TV has to tune in just like a normal over-the-air channel. It was quite convenient at the time (and quality was good enough for the TV sets we had), but modern TVs show degradation - not to mention some can’t even pick up the faint signal - I had to hook mine to a VCR that would decode the signal into A/V.

That quirky setup led me to make the popular A/V conversion (“mod”) - and, while at it, replace the power adaptor (with one that I can actually keep on the wall without fear of burning down the house) and capacitors (something that should be done to any vintage electronics that you want to keep humming).

More tips on reusable coffee pods in Keurig coffee makers

Feb 1, 2019

Prepara 3042 Evak Fresh Saver Airless Canister

My Keurig B40 coffee maker was super convenient, but throwing those pods in the garbage wasn’t great for the environment (yes, you can compost the contents, but despite manufacturer claims/efforts, you can’t recycle the pods in Toronto. They also limit your coffee choice, so a couple years ago I switched to reusable pods and wrote a blog post about it.

Since then, I learned a couple things about grinding and avoiding leaks that are worth sharing.

Hacking a BMW

Jan 4, 2019

My friend drives a BMW 3 Series. Those cars come with a built-in entertainment system that allows you to connect your smartphone and make calls, which worked as expected. But some capabilities (which they call Enhanced Bluetooth) are only enabled by means of a “service fee” - even though you’ve already paid for the system.

And when “the man” abuses its power, hacking ensues…

Controlling RF outlets from a Raspberry Pi

Dec 26, 2017

IKEA floor lamps aren’t bad - as long as your house has sufficient outlets with properly wired and positioned wall switches. Mine doesn’t 😐 and, being a renter, I can’t simply rewire them, so I decided to try the Etekcity RF-controlled outlet kit.

For less than CAD$ 60 you get five outlets, which can be turned on and off individually by the two included remotes. Not a bad deal, and sure an improvement from the odd switches (and the built-in ones on the lamps). But given I already control my TV and sound bar from Google Home with a Raspberry Pi, it wouldn’t be much of a stretch to also have voice control over the lights.

outlets

Motion-sensing, Arduino-based Washing Machine Alarm

Dec 22, 2017

I don’t iron clothes. Heck, I don’t even own an iron - quickly folding clothes right when I remove them from the dryer works for most of them (and a steamer does the job when that fails).

Problem: my current machine has a very low and short audio warning, so I often miss when it is done, ending up with wrinkled clothes. 😔

I thought it wouldn’t be too hard to build a device that detected when the machine stopped moving and alerted me in a more extravagant way. Having never played with raw accelerometers before, I would at least have some fun trying!

Voice control for a non-smart TV (with Google Home, a Raspberry Pi, LIRC, nginx, Lua and IFTTT)

Dec 10, 2017

Despite my privacy concerns, I could not resist the low price of the Google Home Mini. It is really convenient to control the ChromeCast with it, but turning my (non-smart) TV on/off, or switching the input between different devices still required reaching the remote…

…until I hacked a bit!

In a nutshell: IFTTT turns Google Home commands into HTTPS requests towards a Raspberry Pi. There, nginx triggers some Lua code that runs LIRC, which generates IR signals into a transistor that amplifies them to two IR LEDs. Complicated, but works!