Heos (Denon) support

Problem still exists but the workaround with the HUE-Binding worked! :grinning:
Updated today to the latest versionā€¦ But for the first install (0.0.2) HUE wasnĀ“t needed.

Since i updated today, i discovered that i wasnĀ“t able to switch on/off my HEOS via the Dummy-Switch anymore.

I had to change my rule (Play (also ON) / Pause (also OFF) )ā€¦ only PLAY/PAUSE is working for
me instead of ON/OFF.

Regards
Oliver

Hello!

Is it possible to make a virtual switches with TuneIn radio stations
to switch the stations via Alexa?

If so, how can i realize that?

Regards
Oliver

Yes you can using rules. You have to select the Heos and then select the favourite.

I have this in my sitemap to select the required input:

Selection label="Living Input" item=Heos_Living_Select_Input  mappings=[Stop=Stop,AUX="AUX (TV)",MNM="MNM",MNM_Hits="MNM Hits",StuBru="StuBru",Radio_1="Radio 1",Radio_2="Radio 2",Klara="Klara",Relax_1="Relax 1",Relax_2="Relax 2",Relax_3="Relax 3"]

Corresponding item:

String Heos_Living_Select_Input "Living: Kies input" (G_Heos,G_Heos_Living)

This triggers a rule:

rule ā€œHeos_Living_Select_Inputā€
when Item Heos_Living_Select_Input received command
then
ā€¦
} else if ( Heos_Living_Select_Input.state == ā€˜MNM_Hitsā€™ ) {
sendCommand(Heos_Living_Volume, 0) // Mute volume before switching
sendCommand(Heos_Living_Select, ON) // Select Heos Living
Thread::sleep(100)
sendCommand(Heos_Favorite_MNM_Hits, ON) // Select Favorite MNM Hits
sendCommand(Heos_Living_Volume, 10) // Set volume
sendCommand(Heos_Living_Select, OFF) // Deselect Heos Living
ā€¦

The most important item is ā€˜Heos_Favorite_MNM_Hitsā€™:

Switch Heos_Favorite_MNM_Hits ā€œFavorite: MNM Hitsā€ {channel=ā€œheos:bridge:14b824d6-361a-1fce-0080-0005cd546840:s69137ā€}

And you also need an item to select the Heos:

Switch Heos_Living_Select ā€œSelect Livingā€ {channel=ā€œheos:bridge:14b824d6-361a-1fce-0080-0005cd546840:P1640960381ā€}

The channel names can be found in the logs or the inbox. The favourites will be detected when you enter your username/password in openhab.
You also need to only add 1 bridge if you have multiple Heos boxes in your network. Each box can be a bridge, but only one is needed.

I hope this helps.

Stef

1 Like

Hi,
thanks to Wire82 for developing this great binding.
After installation of the binding on OH 2.3.0-1 everything works real fine.

Now i want to play my HEOS favorites on one of the Players (HEOS 1 HS2) using OH.
Autodetection has discovered the favorites on the bridges.
It would be great if anyone can provide an example on how to do this.
The above example from stef doesnĀ“t work for meā€¦sorry

Thanks for helping me out.

Mhh, I donā€™t have the time right now, but I must have missed somethingā€¦

It also took a while for me to figure it out.
What I do remember is that you have to select the heos box and then select the favourite you want.

Stef

Hi @Wire82, it seems to me that playing mp3 with audiosink still not working.
Do you notice the same behaviour?

Regards.

Thanks for your example, yet I am unable to get it working.

Switch Heos_Favorite_MNM_Hits ā€œFavorite: MNM Hitsā€ {channel=ā€œheos:bridge:14b824d6-361a-1fce-0080-0005cd546840:s69137ā€}

Where do I get that value from? I guess its the uid for the favorites?
I searched for it in openhab.log, event.log, jsondb and in the UI. I can see my favorites in openhab.log, but just the labels of it. Running out of ideas now.

edit: okay I used telnet with the cli to find it, but its still not workingā€¦

edit2: ok and it works with the cli with this command executed by a rule I generated in the UI:
heos://browse/play_stream?pid=-600178216&sid=1028&cid=CID-55&mid=s25260

pid = Player ID
sid= Source ID
cid= Container ID
mid=media ID

Still, I would really like to get your example to work. I donā€™t know whats missing there.

If Iā€™m not mistaken, these values can be found in the log files.

I took some trial and error to get it working for me.
So donā€™t give up :wink:

Stef

I just got a sufficient solution for me.

items:

String HeosKitchen_InputSelect ā€œInputā€ (gHeos)
Switch Player_2 ā€œPlayer 2 [%s]ā€ {channel=ā€œheos:bridge:0f895b56-b06d-1b0a-0080-0005cd6bd942:P-600178216ā€}

sitemap:

Switch item=HeosKitchen_InputSelect mappings=[1_Live = ā€œ1 Liveā€ , WDR2 = ā€œWDR2ā€, WDR4 = ā€œWDR4ā€, BIGR = ā€œBIGRā€]

Rule

rule ā€œplay favoriteā€
when Item HeosKitchen_InputSelect received command
then
sendCommand(Player_2, ON)
sendCommand(heos_player__600178216_Volume, 10) // Set volume
Thread::sleep(100)
if(HeosKitchen_InputSelect.state == ā€˜1_Liveā€™) {
sendCommand(heos_bridge_0f895b56_b06d_1b0a_0080_0005cd6bd942_RawCommand, ā€œheos://browse/play_stream?pid=-600178216&sid=1028&cid=CID-55&mid=s25260ā€)
} else if(HeosKitchen_InputSelect.state == ā€˜WDR2ā€™) {
sendCommand(heos_bridge_0f895b56_b06d_1b0a_0080_0005cd6bd942_RawCommand, ā€œheos://browse/play_stream?pid=-600178216&sid=1028&cid=CID-55&mid=s99166ā€)
}else if(HeosKitchen_InputSelect.state == ā€˜WDR4ā€™) {
sendCommand(heos_bridge_0f895b56_b06d_1b0a_0080_0005cd6bd942_RawCommand, ā€œheos://browse/play_stream?pid=-600178216&sid=1028&cid=CID-55&mid=s100162ā€)
}else if(HeosKitchen_InputSelect.state == ā€˜BIGRā€™) {
sendCommand(heos_bridge_0f895b56_b06d_1b0a_0080_0005cd6bd942_RawCommand, ā€œheos://browse/play_stream?pid=-600178216&sid=1028&cid=CID-55&mid=s49485ā€)
}
sendCommand(Player_2, OFF)
end

The station Id can be found easily in the url of tunein:
https://tunein.com/radio/1-LIVE-1024-**s25260**/

https://help.tunein.com/what-is-my-station-or-program-id-SJbg90quwz

sendCommand(heos_bridge_0f895b56_b06d_1b0a_0080_0005cd6bd942_RawCommand, ā€œheos://browse/play_stream?pid=-600178216&sid=1028&cid=CID-55&mid=s49485ā€)

Hi

Thank you so much for maintaining this binding.

It was really easy to add the AVR-X4400H bridge and player.

Iā€™ve created & linked all the Items, with the exception of the Heos favourites via PaperUI.

I can see all the Favourites (as switches) in the Bridge, but they just donā€™t want to link to a Item switch (in PaperUI 2.4)

What I have noticed is that the ā€œSelect a profileā€ list box isnā€™t populated.

FYI, Iā€™m using the RC1.4.1 jar file from this page :- https://github.com/Wire82/org.openhab.binding.heos/releases

Can you advise what I should try or do?

Many thanks,

Stuart

UPDATE

Iā€™ve created a Text file of Switch items that appear to link to the favourites in this Heos bridge, but other than the switch moving to ON then back again to OFF instantly, nothing happens with the player output.
Have you any idea what am I missing???

Switch BBC_Radio2 "BBC Radio 2" {channel="heos:bridge:07c42678-e5e2-1ce8-0080-0005cde91312:s24940"}
Switch BBC_Radio6Music "BBC Radio 6 Music" {channel="heos:bridge:07c42678-e5e2-1ce8-0080-0005cde91312:s44491"}

Switch AbsoluteRadio "Absolute Radio" {channel="heos:bridge:07c42678-e5e2-1ce8-0080-0005cde91312:s16679"}
Switch AbsoluteRadio70s "Absolute Radio 70s" {channel="heos:bridge:07c42678-e5e2-1ce8-0080-0005cde91312:s9115"}
Switch AbsoluteRadio80s "Absolute Radio 80s" {channel="heos:bridge:07c42678-e5e2-1ce8-0080-0005cde91312:s117787"}
Switch AbsoluteRadio90s "Absolute Radio 90s" {channel="heos:bridge:07c42678-e5e2-1ce8-0080-0005cde91312:s126362"}

Switch PlanetRock "Planet Rock" {channel="heos:bridge:07c42678-e5e2-1ce8-0080-0005cde91312:s2377"}

Hi everyone! I havenā€™t fully able to recap the posts here, but has anyone multiple Heos capable device? Can you control it fully from openHab? I mean I have a AVR-3400H receiver and it works good, but can I preset for example groups? So then I just have to press a button in OH and it automatically changes to that group, turns on additional speakers etcā€¦
Thanks!

@ccaramel / @Wire82 I had a huge fight getting the notification played at a proper volume. Problem is that the volume should ideally be set back as soon as the fragment is stopped and normal playback is resumed but I cannot easily come up with a rule for this. It would be great if this could be supported by the binding :slight_smile:

What I have is:

item:

String KantoorHEOS3_message

rule:

rule "HEOS speak"
when 
	Item KantoorHEOS3_message received update 
then
    val previousVolume = KantoorHEOS3_Volume.state
    KantoorHEOS3_Control.sendCommand(PAUSE)
    KantoorHEOS3_Volume.sendCommand(new PercentType(30))
 	say(KantoorHEOS3_message.state)
    Thread::sleep(4000)
    KantoorHEOS3_Volume.sendCommand(previousVolume)
end

So this only works well with average length fragments, not with short ones, then the music is played load and with long ones the volume is reset to early.

I think ideally the binding should support say(ā€œmessageā€, volume) but in that case the volume is reset to the old volume as soon as the clip has started.

1 Like

I got my additional HEOS speaker so I started using it with openHab. Some thing I donā€™t know:

  • The binding automatically creates a ā€˜Bridgeā€™ for every device? Why is that good? As far I could find out, it is useless for me, I just use one Bridge to send commands.
  • Is it somehow possible to create a group without pausing the music? In the HEOS app when you create a group, the music donā€™t stop playback, just seamlessly start on the new speakers when they turn on from sleep.
    In openHab after selecting the speakers in the bridge and sending a MadeGroup command it pauses the music. I have created a rule which immediately resumes it, but it would be better to not stop the playback.
    It is somehow possible?
  • What is the purpose of KeepGroups?

Hi everybody
thank you for this great Plugin!
everything works at my place as it should only 1 thing is a little problem:
i have a switch, where i need 4 HEOS groups together and play something
at the moment i do it like this: Ungroup everything (no matter if itā€™s allready correct grouped) and select the devices i want, group new and play.

this works. but it would be a lot faster / nicer if i could check if the group is already made and if yes i can only play the music.
I hoped i can do it with the ā€œonlineā€ status of the group, but the Groupe is always online, no mather what i do with the heos app, if i ungroup or make a new group with the heos app, the status is still online in the paperui of the group

does somebody has a solution for it?
regards
Philipp

I just updated to openhab 2.4 and now the logfile states:Can not log in. Username and Password not set
While the original config file has not changed?
Any ideas?

Nobody, any ideas?

I just updated to openhab 2.4 and now the logfile states:Can not log in. Username and Password not set
While the original config file has not changed?
Any ideas?

@bartsnijder

Which release are you using? I released a last build on 9th of December which can be found here:

please note that this release changed something within the handling so please check the readme.md here:

Please note that Iā€™m currently working in an other repository than before.

I hope that the latest release will fix some problems you currently have with the binding.

Thanks for sharing! I was using the last version from the other repo, because I didnā€™t know that you push to a different one (google only gives the old one).

Also, would be great if this will be included in OH as an Addon. Or maybe you can upload it to Eclipse IoT Market?

Hi Dries,

Could you please explain, how you got the channel for your Favorite playing switch. So far I understand that you have to link the switch to the bridge. But where did u get the string after the last ā€œ:ā€ from?