2024 Home Sweet Home Automation: A Piano-Controlled Smart Home

There’s a scene in Willy Wonka and the Chocolate Factory where a little flap in the wall flips down to reveal a small organ embedded there. Gene Wilder plays a bit of Rachmaninoff on the organ, and the giant door to the chocolate room slowly creaks open.

Once [Nathan Orick] got this into his head, he couldn’t get it out, and had to give it a go in his own home. Regrettably there’s no chocolate rooms in the house, so he’s using various chords and melodies to do things like control the lights and the TV, as you’ll see in the video after the break. Although this one may have started as a joke of a home automation scheme, [Nathan] thinks it turned out pretty solid, and so do we.

He already had the piano and a Raspberry Pi Zero lying around, so getting this up and running was mostly about connections and code. Speaking of connections, [Nathan] was hard-pressed to find a micro-USB to USB-B cord, so he ended up splicing one together. Simple enough. The harder part was getting Linux to recognize the keyboard, but all it took was touching all the pins with a multimeter, evidently. What’s a project without a little magic?

And not only did it show up, Linux went to the trouble of registering it as a MIDI device all on its own. Once [Nathan] obtained the port number, he had data printing to the console every time he played a note. Then it was mostly a matter of writing code to interact with MIDI data and track the notes as they’re played, and put it all together with Home Assistant. Be sure to check out the brief demo after the break.

7 thoughts on “2024 Home Sweet Home Automation: A Piano-Controlled Smart Home

  1. There was an episode of “Wild, Wild West” where Doctor Lovelace is controlling a steam-powered murderbot by playing an organ. If I recall correctly, it was one of the early episodes, before the show was in color.

  2. Doesn’t Vincent Price’s character in “The Abominable Dr. Phibes” control his evil lair via a musical keyboard? (or am I just misremembering because of the organ music overlaid on the montages of his evil genius activities?)

  3. i get the hack and novelty but personally i would recommend against this kind of use of a musical instrument. it actually decreases musicality, rather than increases it. when i touch the piano, i am trying to make music. if i am trying to do anything else then it would actually be anti-practice at making music.

    it’s related to why ‘guitar hero’ style of musical instruction is so limited. you can use it to teach specific skills but once you begin to get what it can teach you, if you don’t move on right away (probably before mastery), it can encourage a lot of stagnation and bad habits.

    hahah i love computers but i have a real knee jerk reaction to seeing them where they don’t belong. i just always assume what one is doing is replacing a noble pursuit with simply fidgeting with technology instead. anyways, that’s what i learned from my abortive attempts to make instruments and so on.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.