AudioMeterEvent: notify OpenHAB when Windows is playing sound

Tags: #<Tag:0x00007f6170221e50> #<Tag:0x00007f61702219f0> #<Tag:0x00007f6170221658>

Hi there,

I just made this: https://github.com/dechamps/AudioMeterEvent

It’s a little piece of software that can be used to flip an OpenHAB Switch Item ON when a Windows computer starts playing sound through an audio device, and then switch it OFF if no sound is detected for a period of time (or when the computer goes to standby, or is shutdown). It works by sending HTTP requests to the OpenHAB REST API in response to changes in audio level.

Example use case: I use OpenHAB to control wall plug switches that power my active loudspeakers. Using this software I can make my speakers turn on automatically as soon as sound starts playing.

I suspect it can also be used to monitor input device levels (e.g. microphone), but I haven’t tried.

I don’t expect much people will be interested in this as it’s a fairly niche use case, but here it is nonetheless. Enjoy!

2 Likes

Thanks for Sharing