Heos (Denon) support

No. I added it via the .sitemap file. I think at the moment the PaperUI can’t show items in the control page which are added manually and are’t linked to a Thing directly

Short update … so far no disconnects and way more reliabel, more precise no problems at all so far! Did not tried the favorite yet. Keeping u updated how it goes :slight_smile:

NoTechi

@NoTechi Good to hear. :slight_smile:

I will release a new version within the next days where I improved again the start-up procedure and the binding now reconnects automatically to the HEOS-Network if the connection was lost.
I’m currently testing it on my Raspi to see how stable the binding runs. And maybe also good to know, with the HUE Emulation you can control the HEOS by voice. :wink:

Wire82

I did not had the chance to test the favorites yet but it was really reliable and stable until at some point the heos group got kicked out of my things. It was working fine again after I added the group from the inbox. No clue why it was kicked out since I am pretty sure I did not changed anything.

I did play with the hue emulator but was not successful. I tried it like this:

  1. created a switch item and added the required tag
  2. created a rule triggered from the switch to turn on the Heos player
    Within Alexa I was able to find the item. Had some hard time with “heos” as item name since Alexa never understood “heos” so I changed it for testing to something Alexa understood in correct spelling. But even though Alexa responded that she put the item to “on” my switch state never changed.
    Would be great if you could let me know how you did it :slight_smile:

Looking forward to the next release! :slight_smile:

NoTechi

So I started testing your version and it works quite stable. If you could look at starting playback from the AUX input that would be great.

@jarlebh Thank you for testing. :slight_smile:
I already implemented the switching to external sources within the current version I’m on.
I think I will release this version tomorrow or on Sunday. The most things I did are on the connection side. So the binding is now checking if it’s still connected and reconnects if not.
I also added support for playlists. Together with the inputs I changed the design compared to the
favorite selection. I do not provide an extra channel per item. Instead you have one channel and you are controlling it via mapping and numbering or words…
I will add an explanation to the instructions.
@NoTechi: Thank you again for the feedback. I will provide some samples within the next release of the description.

Wire82

That sound like a better approach, I did something like this in my version.
I have some issues when changing groups, is this supported ?.

I actually want to controll a specific speaker not matter which group it is currently part of.
This is to change volume or pause in a specific room (which will pause in all rooms, but that’s ok)

@jarlebh
Yes groups are supported. But i spend some work since the last release to it and found some faults in my code.
Unfortunately I only have two HEOS Speaker so I can only test one group. But I guess it should also work with more than one.
Changing and Muting the volume for each player even if it is in a group is no problem. Until the play/pause control all things can be switched individually.
For groups I added a mode (Keep Groups switch at the bridge) where the group is not removed if you de-group it. It only goes offline and goes online again if you initiate the group again.
I will add this in my description.

Wire82

Looking forward to testing this version, do you handle ON/OFF as PLAY/PAUSE ? Would be good for usage with Hue Emulation and Google Home.

Yes. The Controls need PLAY/PAUSE for the player. I did it with a rule which sends PLAY or PAUSE if the item is switched on.

rule "Alexa Stop"	
	when	
		Item Alexa_AZ_Play received command OFF		
	then		
		sendCommand(HeosAZ_Player, PAUSE)		
	end

I’m using extra Alexa items.

Ok, could you add ON/OFF as PLAY/PAUSE to the binding ?. I would need another 5 virtual items to use this approach.

Yes. I will add it. :slight_smile:

So, after a long time a new release is ready! :relaxed:
Fell free to test it and I’m looking forward to get feedback!
As written in the release notes I recommend a clean update. Things may have to be removed and added again to support the new features.
You can find it here:

Wire82

Just installed the new release and will let u know how it goes :slight_smile:

Could you post how you defined your Alexa item “Alexa_AZ_PLay”. Is it a simple switch?

Thanks again already! :slight_smile:

NoTechi

Thanks for the update @Wire82 :slight_smile:. Works pretty good.

I have an issue with the players not being visible on the bridge, so I cannot change to a favorite station.They are there a while, but suddenly they are removed.

Also should I have more than one bridge defined ?

I found another issue, seems like the handeling of now_playing_change events is broken.

2017-02-16 20:56:01.132 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS event response: {“heos”: {“command”: “event/player_now_playing_changed”, “message”: “pid=2062371763”}}
2017-02-16 20:56:01.134 [DEBUG] [.openhab.binding.heos.api.HeosSystem] - Sending Command: heos://player/get_now_playing_media?pid=0
2017-02-16 20:56:01.155 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {“heos”: {“command”: “player/get_now_playing_media”, “result”: “fail”, “message”: “eid=2&text=ID Not Valid&pid=0”}}
2017-02-16 20:56:01.157 [WARN ] [nding.heos.handler.HeosBridgeHandler] - HEOS System response failure with error code ‘2’ and message ‘ID Not Valid’

@NoTechi
I defined some items with the name i wanted.
Example:

Switch AZ_Play 		"Heos"			["Switchable"]

Then I defined a rule which look like that:

rule "Alexa Play"
	
	when	
		Item AZ_Play received command ON		
	then		
		sendCommand(HeosAZ_Player, PLAY)		
	end

Now you can say: “Alexa, switch HEOS ON” or, with another roule "Alexa, switch HEOS OFF"
With the last release you do not need to define a rule for play/pause because now you can use ON for PLAY and OFF for PAUSE directly. So you can switch the item directly.
Thanks @jarlebh for the hint.

@jarlebh
It seems to me that the binding lost your player completely. Have you tried to reinstall them via the PaperUI? First remove the old ones an then search again for the players?
If you do: Inbox -> Search for things -> Heos Binding
you should see a message within the consol which tells you how many groups and players are found in the network. Something like that:

23:20:47.977 [INFO ] [ternal.discovery.HeosPlayerDiscovery] - Start scan for HEOS Player
23:20:47.990 [INFO ] [ternal.discovery.HeosPlayerDiscovery] - Found: 2 new Player
23:20:47.997 [INFO ] [ternal.discovery.HeosPlayerDiscovery] - Start scan for HEOS Groups
23:20:48.009 [INFO ] [.openhab.binding.heos.api.HeosSystem] - Found: Group Garage with 2 Players
23:20:48.014 [INFO ] [ternal.discovery.HeosPlayerDiscovery] - Found: 1 new Groups

For the second issue I found the reason:
My code checks each PID if it is longer than 9 digits. That was a routine I added in the past because I had some trouble with no valid very long PIDs. And it works fine for me because all my players have only 9 digits :slight_smile:

That is the trouble maker code :grinning:

   if (eventResponse.getMessagesMap().containsKey("pid")) {
            if (eventResponse.getMessagesMap().get("pid").length() > 9) {
                response.setPid("0");
                return response;
            }
            response.setPid((eventResponse.getMessagesMap().get("pid")));
        }

I will change it and find a solution for that. This could also be the reason for your first problem…

Wire82

@jarlebh

You can find the new version here:

Thanks, I did a similar change myselfe last night and it seems more stable now.
This morning the the speakers grouped and the radio turned on as it should :slight_smile:
What about changing the favorites to the same approach as inputs ?. I think you could even define the options for the channel so that the UI can provide a dropdown to the user.

Thanks for the good work on the heos binding. I have just a question about AUX_IN. How do I configure the item, so I can switch to Aux with a sendCommand in the rule? I have seen in the source the entry ‘// private Sring playAuxIn = “heos: //”’ - think this is in progress, right? Thx for your answer @Wire8.