I moved to a new place and it has more than one room. Naturally, I hooked up the stereo in the living room and tested it like my dad taught me: by playing “Money For Nothing” really loudly. It worked. But wait a minute, there’s an upstairs now… how will I get it playing up there? I could always use the wifi network and raspberry pis to beam audio around. Yeah, let’s do that!
One of my first memories is a vision of lying near my dad in the basement in the mid-1980s while he endlessly soldered away at some big project. Later, I spent a lot of my childhood messing around with the product he was assembling: a Hero Jr. robot. This was a educational personal robot, intended to be your “friend, companion, and security guard.” Here he is:
Hero Jr. has a sonar, infrared motion sensor, light sensor, sound sensor, radio-frequency remote, drive motor, obstruction sensor, and a RS-232 serial port. His out-of-the-box features included a security guard mode, alarm clock, poetry, singing, and (my favorite) the ability to explore around the house, often while singing America, Daisy Bell, or Little Miss Muffet.
Hero Jr. was created by the Michigan company, HeathKit, which is famous for designing and selling high-quality electronics kits since 1926. (
but is now, sadly, gone UPDATE: It filed for bankruptcy in 2012 but is still operating today to some degree). As with most HeathKit products, Hero Jr. came as a kit, you had to mount and solder every component onto the circuit boards and install the motors, speakers, and sensors. It cost around $600.
His sensors are pretty solid, even a few decades later. My sister and I had a game where we’d try to sneak past him but he usually caught us. He also has a Cowboys and Robots game where you shoot him in a darkened room with a flashlight and he tells you if he got you first. Fun times. Here’s his Security Guard feature with hilarious singing when you get caught. (You could literally hook him up to a transmitter that would actually summon the police, but we never did this.)
The possibilities really get exciting with Hero Jr. Programming Language (HJPL), a simple set of instructions interfacing directly with the 99 CPU registers that you could enter, line by line, on the simple hexadecimal keypad of the robot itself. PCs were just becoming at thing at this time so my dad never experienced the BASIC option over the serial port. Below is a video of me entering and executing a simple counting sample program from the manual. It explained that we’re initializing a constant value of 0 in register 1 and then speaking the contents of register 1 and then adding a constant to the contents of register 1 and then gotoing up a line. Legend has it that my dad used to program it to walk around the house looking for a heat source and then reciting a love poem (assuming it had found my mom). Sometimes it accidentally recited the poem to the dog.
It’d be interesting to try to couple Hero Jr. with a Raspberry Pi and use it as part of a more modern personal assistant. When you get a text, it could hunt you down in your house (heat seeking) and tell you what it said. It’d still be a novelty obviously, but its great voice synthesis (driven by the Votrax SC-01A voice synth chip) really could add some charm to the uniform landscape we have today. That’ll have to be a future project.
Hero Jr. is powered by a 1 MHz Motorola 6808 CPU and can have up to 24 kB of RAM. The CPU board is below the power board, pictured below.
Hero Jr. has an add-on slot where you can hook in different ROMs to give him different capabilities. Here are a few of them:
It occurs to me that it’s been a long time since one single person knew all the details of a modern microprocessor, and exponential complexity and miniaturization seems to have left us hopeless in any desires to explore the magic of the computer/phone/camera/GPS/stereo/theater in our pockets. This goofy robot reminds me that it’s always possible to explore curiosities and fiddle around.
Given the relative sophistication of this guy, I’m honestly a bit surprised we don’t have much fancier things today. The Smart Speaker and robo-vacuum things are neat, but I think it could become much more interesting. It’s inspiring to see what was done in the 1980s.
If you have a digital video recorder (DVR) hooked up to some cameras and you want to access it remotely when something happens, you can set up remote access to review things from wherever. Here’s how to do it.
I’m becoming convinced that Jeremy Howard is right to predict that deep learning is going to be “more important and more transformational than the internet.” If you don’t know who Jeremy Howard is, he’s part of the duo behind fast.ai free and high-quality deep learning course series, which is dedicated to making deep learning accessible to everyone.
Deep learning takes advantage of certain graphics processors (GPUs) to be efficient. If you take the course, it’s recommended that you sign up for an Amazon Web Services machine with an appropriate GPU so you can just run the provided setup scripts and be on your way learning deep learning. But you may want to try to get everything set up on your own machine if you happen to have one. I just built a small server and added a modest GPU just for this purpose so I figured I’d give it a whirl. This is how I did it.
I decided I wanted a network-attached storage (NAS) server because I needed some central and safe place to put all my big files. I’ve been using more and more hard drive space because I’ve been taking photos in RAW and collecting more digital video (camera, dashcam, digitized home videos from the 1990s, and drone). I also just enjoy fiddling with servers and stuff and thought I could use a home server for a variety of other things. My raspberry pi has been doing well for my home automation but a bigger server might make it faster. I’m trying to learn Blender and have been eyeing a Machine Learning course. Both of those require a nice modern GPU. Finally, I just enjoy learning things about computers.
I’m trying to learn ways to minimize my reliance upon large companies for handling my day-to-day personal data. So I figured calendar and contacts should be on my list of things to self-host. This post is about how I migrated all my Google calendars and phone contacts to my own server without losing any features I was using. I’m doing this mostly for fun.
I got a few Amcrest Wifi security cameras for my mom’s house at her request. They’re pretty nice overall (My only complaint is that the web-interface doesn’t fully support Linux). I set one up to save a jpg snapshot to memory every minute and then flew across the country. When I wanted to access them, I couldn’t just put the SD-card in a computer or anything, and clicking all 14,000 of them seemed like a pain, so I decided to figure out how to get them with a Python script.
There are some digital levels on the market that are really nice tools to have for a variety of purposes. I grabbed a DXL360 and am really happy with it so far. When I wanted to do an angle vs. time calibration measurement of my Barn Door Startracker over 10s of minutes, I really wanted to get the data from the level into a computer so I could plot and process it a bit.
The level has a USB port but the manual suggests that an optional attachment is required to get it into a computer, at least for this model. However, the manual also states that data comes out of it in RS232 format. I bet I could read that data with some more generic equipment that I have sitting around. And it turned out to be easy. This post shows how I did it.
I like to mix hobbies, so naturally I’ve been eying astrophotography for a while. I’ve taken a time-lapse here and a moon picture there but, inspired by the folks over at /r/astrophotography, I wanted to take it to the next level. Since the Earth is spinning, any long exposure of the night sky has star trails, so you have to make your camera counter-spin if you want clear shots. In this post, you can read about how I made a simple barn door sky tracker to do this.
Barn door sky trackers have been made at home by lots of people for a long time. There are a variety of designs with different levels of complexity and precision required. I thought I’d make the simplest-to-construct one, a Haig mount. To correct he tangent error, I decided to use a cheap microcontroller (MCU) and have it speed up appropriately via software. Fun!
The math behind this is fun mostly because it’s straight out of high school and you finally at long last get to use it. Here’s the basic design:
I use SpamAssassin on my e-mail server to flag spam messages that come to my addresses. It uses a series of checks on each message and determines a Spam Score. If the Score is above a user-defined threshold, it adds a header that says that it is spam. Then dovecot files it away into a spam folder instead of my inbox. It does a pretty good job but requires tuning sometimes. I wanted to see if I could change my threshold from the default (5.0) without getting too many false positives or negatives. To do that, I’d have to collect some stats from my messages.
A year ago, my friend Laura was wishing that email providers could do some tone filtering and reject messages that are too mean. Since I run my own email server, I thought it might be simple to set something like that up easily. Turns out, it’s not that hard, but it wasn’t exactly trivial to figure out.
I run have postfix running to receive messages from the internet. It passes them through SpamAssassin, which inspects the messages and adds a few headers that indicate whether or not it’s spam. Then it passes them on to dovecot , which stores the messages in mailboxes and then tells with my email client, Thunderbird, that I’ve got mail. I like this setup because I feel like I have a bit more control over my data. Besides, it’s fun!
The original request is here shown below. I figure, if I could just have the message go through a second filter after it goes through spamassassin, I could make it a custom script that counts swear words.
I got one of those RGB LED matrix things for my birthday and wasn’t sure what to do with it. Then I found this awesome library which has Python bindings and can control it nicely even from a Raspberry Pi. Conveniently I had a spare Raspberry Pi 1 B+ sitting around so I hooked it up. After playing around for a while, I got the demos working.
UPDATE: Full documentation of infopanel is now available.
- Get data directly from a MQTT broker for getting live data (e.g. travel times in traffic, weather conditions) and for command and control. This allows me to connect the screen to my home-assistant home automation system.
- Assemble various built-in elements like giraffes, animated text, rainbow text, pictures, animated gifs into various scenes that rotate through on the screen to display the information in various fun and/or useful ways.
- There are Temperature and Duration sprites that you can define high and low values of so they’re red when they’re bad and green when they’re good, and anywhere in between.
You can set the scenes to be just random or you can control them through MQTT.
It’s intended to be very configurable but since it’s brand new some extra development is needed to make everything perfect. Send in your ideas and requests and code changes!
A relatively complete example configuration file is in the repo. That demonstrates using MQTT, connecting MQTT topics to various sprites, building your own frames of animation by hand, and adding in gifs and images from file paths. Note that you have to set an environmental variable or two to get the fonts right and whatnot.
Note: This is a thowback post, revitalized from the old partofthething.com where it was posted by me in like, 2004. I took out most last names.
My car is the ultimate car ever. It’s the greatest thing on Earth. No, really. It is. Sure, sure it’s old but that’s not what matters anymore. It’s the past that counts…and the stereo system. I grew up in this car. Yes sir I did. I always sat in the back right seat driving all over the place since I was seven years old. Usually Tom Petty was playing. you see, it used to be my mom’s car. When she got a new one, it became my sister’s car. And then, it became my car.
I have a website or two and sometime wish I could get notifications whenever someone visited them, just for fun. Well I did it, and now I can get beeps in my home whenever anyone visits. It’s kind of cool to hear it go off, though normally it will be annoying, so we need a switch for it.
I learned on reddit the other day about the sudo “insults” capability where it throws shade at you when you mistype the password. I configured it everywhere I could, but I wanted more, so I came across
$ fortune | cowsay / SHIFT TO THE LEFT! SHIFT TO THE RIGHT! \ \ POP UP, PUSH DOWN, BYTE, BYTE, BYTE! / ---------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||
Needless to say… wow.
Oh this is exciting! I’ve been trying to figure out how to get motion events from my IP camera into my home-assistant instance running on my Raspberry Pi, and I just did a successful test! It works! Hooray. Briefly, I set up an email server on the Pi, have the camera email the Pi, have the email server trigger a script which parses the email for key words and sends MQTT signals as appropriate, at which point the home-assistant MQTT client sees them and triggers automations (like blinking a light to scare people off). Here’s how I did it.
Or, how to control your A/C from your phone
You may have seen my earlier post about my new home automation setup. Well I just upgraded it! I just finished testing out a new infrared remote control send and receive capability and it is pure awesome. Here’s what I can do now from within home-assistant:
- Turn on and off my new DeLonghi portable air conditioner from Costco, and set the temperature to whatever
- Turn on and off the TV and press any buttons from its remote control
- Turn on and off the stereo and virtually press any buttons from its remote control (which I never even had!)
- Use an old random blueray remote control to set scenes, turn lights on and off, etc. (basically do anything under home-assistant’s control)
This post is about how I did it on my Raspberry Pi.
Update: A video!
I’ve been learning about my Canon EOS D-SLR camera and wanted to try a time-lapse cloud video. It was pretty easy!
Continue reading Time-lapse cloud video
I went over to my friend’s house last night to help get home-assistant on a Raspberry Pi working for his z-wave door sensors and siren. The Ecotech sensor showed up fine but the Aeotech recessed one (Recessed Door Sensor Gen5 , ZW089-A) did not show up by default. After poking around in the logs for a while, we realized that it was sending BASIC_SET command classes instead of BinarySensor commands. Apparently (I thought I had fixed this already), home-assistant doesn’t recognize the BASIC_SET commands just yet. But looking at the config file for this device, we discovered that config item 121 changes which kind of report this sensor sends:
Continue reading Using an Aeotech recessed door sensor in home-assistant
In this post, we’ll take a brief measurement of regular old FM radio stations and try to determine where we are. It’s like a GPS but with local FM transmitters instead of satellites. I did this just for fun. I wonder if it could be used for indoor location and stuff? It is nowhere near as accurate as GPS. But whatever.
The first step is to get a reading of all the nearby radio stations. I used gnuradio and a HackRF One software defined radio. A simple flow-chart that takes the FFT and dumps it to a file is all I needed. I had to throttle the I/O or else my computer would freeze. I used 16M sample rate to have as wide a bandwidth as possible.
The file sink saves the FFT results in 4-byte integers and just has one 1024-length vector after the other. In a few seconds, I had a 50 MB of data. I did all the post-processing in an external Python script.