Play annoucements through AVR

Tags: #<Tag:0x00007f616e448690> #<Tag:0x00007f616e448578> #<Tag:0x00007f616e4484b0>

I have a Denon AVR and would like to play announcements or music clips on certain events through the speakers connected to the AVR.

I have seen some examples of text-to-speech and Denon binding and I have seen examples of announcements locally on the device running OpenHab, however; I still cannot figure out if there is a way to play audio remotely on my AVR using DLNA for example. I have checked my Denon AVR protocol guide and found many examples of menu controls but nothing to play audio remotely.

I have been looking at this a little bit as well. I have a Marantz unit that is remote controllable though telnet. The Denon binding works well if you have one of the units that are a little bit older. Marantz/Denon changed the protocol a couple years ago. I have the full spec for the telnet commands, so just looked through it. I don’t see a call that says something nice like “play mp3 called bark.mp3” Instead it seems you would have to index a device yourself, and control the song skip though the interface. That is, if you had tracks 1.mp3 2.mp3 and 3.mp3 on the stick, your command sequence might go something like TURN ON, USE USB, SKIP, SKIP, PLAY to play 3.mp3. You did mention you didn’t want to do it, but putting a Pi or Beaglebone on your receiver would allow it to be used as an audio sync. I just don’t think our devices were created with that in mind. How far away is your receiver from your openHAB server? Run a cord?

There is a lot of work going on in the land of the Sonos to allow it to be used this way as well.

I need to come back and edit this post with some updates. I just spent some time reading through the docs and the source code for the Denon binding. It is actually more versatile than I initially thought. I was able to use it for my recently acquired Marantz as well as the older series. Additionally, the binding allows you to pass along a direct call to the AVR using the COMMAND tag. My initial sequence above was speculation, but I now think it could be made to happen.

I’ve seen some hints but no complete solution how to use DLNA for this.
You could try this or the control point from the GUpnp package.
If you happen to find a way using DLNA, let us know, please.
Otherwise, connect a Raspi via HDMI. If you can’t move your openHAB server close enough, you can still connect another Pi and control it from openHAB using MQTT or Exec binding to issue a ‘play’ command.

Running a cord was the next option on my mind. I’m actually running OH on a laptop and although it is pretty close to the Denon most of the time but I do occasionally move my laptop to other rooms and I would have liked it to still work. I also would like to eventually choose which AVR to play the audio so that I can make make different announcements in different rooms in the house.

Sending a command sequence also might work but is not very flexible. I actually wanted to use TTS without needing to prepare all the announcements as mp3. From my experience it is also pretty slow as I always need to put about a second of sleep between each command and the next (Do you know a way to speed this up?)

Let me know if you find a better solution, it would be much appreciated.

Put a Pi next to your AVR, connect HDMI ports and move your openHAB server over there. No need to run that on your laptop (if you’re worried about power outages, insert a smartphone battery extender as an UPS).
So you have everything there, including TTS.

Looks like can be helpful for you

Any example on how to integrate this with OH TTS service?

I don’t have a Pi and that would still limit audio to one location, I would like to broadcast different announcements to to different rooms all from one central location.

1 Like

How about buying some Chromecast audios. There is a python script somewhere on the forum / github that allows you to push sound. With multiple you could push to different rooms.

That could work, I don’t have one so can’t try; however, I think DLNA casting would be a nice feature to have in OpenHab.

Just to let everyone know, I have purchased a google home and it is very easy to bind it and make announcements from OpenHab, it works very nicely. The only issue I have seen is that it interrupts music if it was already playing.

can i know how to make google home announce