Whistle Switch

Control Homekit by whistling 🎶

Published 1/16/2022 by Colby Rabideau

My last day at RC came and went a while back, but I finally found a few minutes to tidy up my whistle project. Its got some rough edges, but it works a lot better than I expected it to when I started 😅

You can install it from npm.

$ yarn global add whistle-switch

Fire it up on the same network as you homekit setup, and it should work right out of the box.

$ whistle-switch 🚧 starting listener... 🦾 starting controller! Sun Jan 16 2022 15:56:42 GMT-0500 (Eastern Standard Time) | [vite] connecting... Sun Jan 16 2022 15:56:42 GMT-0500 (Eastern Standard Time) | [vite] connected. Sun Jan 16 2022 15:56:42 GMT-0500 (Eastern Standard Time) | %c * Tone.js v14.7.77 * background: #000; color: #fff Sun Jan 16 2022 15:56:42 GMT-0500 (Eastern Standard Time) | The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)

If you're trying to run whistle-switch on a Raspberry Pi, you need to tell it where to find chromium.

$ WHISTLE_SWITCH_CHROME_EXECUTABLE_PATH=$(which chromium-browser) whistle-switch

Then you should be able to connect the switch to your Homekit setup!

Homekit button map

Check it out on Github for more interesting configuration options and trouble shooting.