Multiroom Audio Feedback (not TTS)

Hello guys

As I’m planing our new house, I thought some audio feedbacks from OH would be a nice feature.
Some szenarios: dryer or washer is finished, Feedback if detection fails, Warning for thiefs :wink:

I wonder how I could play this on different rooms and/or floors. Is sonos a way for it (I plan to use sonos for my homecinema, in the kitchen, bath …)?

Did anybody did something similar?

regards
Michael

Your idea is something that’s of interest to me, so I’ll be following this thread.

I would think that you have a number of options available. What you’ll also need to think about is how you get OH to know where to send the Audio.Unless your happy to have the Audio sent to all devices at the same time.

As I have RPI’s in a number of rooms running Kodi my first thought was that I would hope to use these, but would need to work out how to attach a speaker that doesn’t mean having the TV switched on.

There are many different ways to go about whole home audio. Unfortunately, none of them fall into the realm of cheap, and few are easy.

If you can afford it, something like the Sonos will be the easiest by far. I don’t know much about Sonos, so I can’t tell you how to get OH set up as an input source.

In the DIY realm, there are several options. Chromecast audio that you can plug into your own speakers. Logitech Media Server (although officially discontinued) plus something like a RPi running Squeeze Lite.
Then of course, there’s a full on audio mixer. Of course with this route you’ll have to also have an amp per zone, or a multi zone amp.

I’ve looked into whole home audio several times. So far, I haven’t come up with a good “shelf” speaker option to hook up to something like a RPi or Chromecast, and I don’t want to invest the time in installing ceiling speakers in our current house.

I’m using Sonos in my setup (OpenHAB2 on rpi 2).
In the actual OH2 binding for sonos it is of no problem to play a sound (PlayURI) on a dedicated sonos-player. I’m presently using it to play a “WelcomeHome Jingle”, when the person is detected (better the device of the person comes on the WLAN) the actual state of the player is saved, the jingle is started, then the rule needs to sleep for the playtime and finally the old state is reset. That way the used radio-station (or whatever) will resume.
However, having sonos al over the house isn’t a cheap choice!

I am also a proud owner of a set of Sonos speakers. Among the available solutions from Sony, Teufel and such, this system seems the most mature. As pointed out, Sonos is supported by an openHAB 2 binding.

@opus would you be so kind to provide your Jingle solution as a short Example?

No problem, will post when I’m back home. Although I’ll have to change my usage of the reentrant lock. Just read in another post how it should be used correctly.

1 Like

Here is my code:

import org.openhab.core.library.types.*
import java.util.concurrent.locks.ReentrantLock
 
var java.util.concurrent.locks.ReentrantLock lock  = new java.util.concurrent.locks.ReentrantLock ()
 
 
rule "CheckAnwesenheitTina"
 
when
 Item Tina_WLAN changed to ON
then
 if (!lock.isLocked) {
   lock.lock
   try {
     logInfo("CheckAnwesenheitTina","Tina_WLAN = {}", Tina_WLAN)
     sendCommand(PlayKueche_Save, "ON")
     sendCommand(PlayKueche_PlayUri, "x-rincon-mp3radio://MyRaspPi/Tina_Jingle.mp3") // I have a webserver running on MyRaspPi
     Thread::sleep(25000)
     sendCommand(PlayKueche_Restore, "ON")
     }
    finally{
      lock.unlock
     }
   }
end

[Edit: Corrected .islocked to .isLocked ]

2 Likes