Heos (Denon) support

I have updated to this version, because I had some problems with a previous version.

Now I have the same problem. On PaperUI the Things are Online, but it doesn’t accepts any commands, doesn’t show the status of devices… What could be the problem? On OH startup, or refreshing the bundle, it seems normal, loads the favorite channels, etc… but after, no values shown on the Things and can’t do anything from openHab

Ps.: After a restart, I can play/pause music on the players, but it won’t update the info (track name, etc…).
Also it is really odd that enabling trace, seems that sometimes (for example after a Thing refresh) I can see that it polls all data correctly, but this won’t show up on the Items linked to the Thing

After you created the Bridge, you have to login with your HEOS account and these channels will appear on the Bridge Thing.
You should do this from PaperUI I think

Hi,

I use HEOS binding from sometime.

My configration is: openhab 2.3.0 from docker + 2.3.0 HEOS binding.
0afce1a2a57228aacdb8416ffccb27101377bb4c org.openhab.binding.heos-2.3.0-SNAPSHOT.jar ( V2.3.0-RC1.3)

I create two issue on https://github.com/Wire82/org.openhab.binding.heos/issues.

  1. Connection to HEOS Network lost!
    I have something like this in openhab.log every one minute:
==> /opt/openhab/userdata/logs/openhab.log <==
2019-01-14 22:50:36.681 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Heos Heart Beat
2019-01-14 22:50:36.681 [WARN ] [binding.heos.internal.api.HeosSystem] - Connection to HEOS Network lost!
2019-01-14 22:50:36.681 [INFO ] [binding.heos.internal.api.HeosSystem] - Shutting down HEOS Heart Beat
2019-01-14 22:50:36.681 [INFO ] [binding.heos.internal.api.HeosSystem] - Stopping HEOS event line listener
2019-01-14 22:50:36.681 [INFO ] [binding.heos.internal.api.HeosSystem] - Reconnecting to Bridge with 192.168.199.247 @ port `1255`
  1. Problem after power outage.
    I have two HEOS One. Openhab is running on APC Battery Backup. After power outage when I want to control HEOS with openhab I have i log:
2019-01-10 07:30:29.829 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Heos Heart Beat
2019-01-10 07:30:29.836 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {"heos": {"command": "system/heart_beat", "result": "success", "message": ""}}
2019-01-10 07:30:31.210 [INFO ] [se.smarthome.model.script.heos.rules] - HEOS Volume: 10.0
2019-01-10 07:30:31.211 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://group/set_volume?gid=-104736039&level=12.0
2019-01-10 07:30:31.215 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {"heos": {"command": "group/set_volume", "result": "fail", "message": "eid=2&text=ID Not Valid&gid=-104736039&level=12.0"}}
2019-01-10 07:30:31.215 [WARN ] [nding.heos.handler.HeosBridgeHandler] - HEOS System response failure with error code '2' and message 'ID Not Valid'
2019-01-10 07:30:31.220 [INFO ] [se.smarthome.model.script.heos.rules] - Tryb głośności HEOS: CRON
2019-01-10 07:30:31.221 [INFO ] [se.smarthome.model.script.heos.rules] - Tryb głośności HEOS: CRON
2019-01-10 07:30:31.221 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {"heos": {"command": "group/set_volume", "result": "fail", "message": "eid=2&text=ID Not Valid&gid=-104736039&level=12.0"}}
2019-01-10 07:30:31.222 [WARN ] [nding.heos.handler.HeosBridgeHandler] - HEOS System response failure with error code '2' and message 'ID Not Valid'
2019-01-10 07:30:31.222 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://player/set_volume?pid=-104736039&level=12.0
2019-01-10 07:30:31.240 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {"heos": {"command": "player/set_volume", "result": "success", "message": "pid=-104736039&level=12.0"}}
2019-01-10 07:30:31.241 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://player/set_volume?pid=1013171437&level=12.0
2019-01-10 07:30:31.322 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {"heos": {"command": "player/set_volume", "result": "success", "message": "pid=1013171437&level=12.0"}}
2019-01-10 07:30:31.322 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://group/set_volume?gid=1013171437&level=12.0
2019-01-10 07:30:31.327 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {"heos": {"command": "group/set_volume", "result": "fail", "message": "eid=2&text=ID Not Valid&gid=1013171437&level=12.0"}}
2019-01-10 07:30:31.327 [WARN ] [nding.heos.handler.HeosBridgeHandler] - HEOS System response failure with error code '2' and message 'ID Not Valid'
2019-01-10 07:30:31.342 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {"heos": {"command": "group/set_volume", "result": "fail", "message": "eid=2&text=ID Not Valid&gid=1013171437&level=12.0"}}
2019-01-10 07:30:31.342 [WARN ] [nding.heos.handler.HeosBridgeHandler] - HEOS System response failure with error code '2' and message 'ID Not Valid'
2019-01-10 07:30:32.211 [INFO ] [se.smarthome.model.script.heos.rules] - HEOS Volume: RESCHEDULING
2019-01-10 07:31:02.213 [INFO ] [se.smarthome.model.script.heos.rules] - HEOS Volume: 12.0
2019-01-10 07:31:02.217 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://group/set_volume?gid=-104736039&level=14.0
2019-01-10 07:31:02.221 [DEBUG] [nding.heos.handler.HeosBridgeHandler] - HEOS send response: {"heos": {"command": "group/set_volume", "result": "fail", "message": "eid=2&text=ID Not Valid&gid=-104736039&level=14.0"}}
2019-01-10 07:31:02.221 [WARN ] [nding.heos.handler.HeosBridgeHandler] - HEOS System response failure with error code '2' and message 'ID Not Valid'

Is there any possibility to write some sort of reconnection/checking in this case?

Best regards,

Hi Wire82

Found the error with not being able to login to heos account… I use textfiles t configure the binding. While according to the examples the syntax should be userName=“something” (which worked before), it should now be username=“something” (so no capitals in “username”)

1 Like

I downloaded the compiled version from here: https://github.com/Wire82/openhab2-addons/releases/tag/V.2.4.2 and put it in the addons directory of my fresh Openhabian 2.4 installation.

However, I get the following error in the log file:

2019-01-21 00:00:57.696 [ERROR] [org.openhab.binding.heos            ] - FrameworkEvent ERROR - org.openhab.binding.heos
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.heos [218]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

Of course the plugin is not there in the bindings section of the Paper UI. Any idea? :slight_smile:

See here

@Wire82

I have a problem with the new version. Everything seems working, but commands cant be executed from openhab.
I get an error like this when I want to group players:

2019-01-21 13:32:09.835 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://group/set_group?pid=-120546993,-1539455483

2019-01-21 13:32:09.842 [DEBUG] [eos.internal.api.HeosEventController] - HEOS send response: {"heos": {"command": "group/set_group", "result": "fail", "message": "eid=7&text=Command not executed&pid=-120546993,-1539455483"}}

2019-01-21 13:32:09.844 [WARN ] [eos.internal.api.HeosEventController] - HEOS System response failure with error code '7' and message 'Command not executed'

Thank you @bartsnijder for your fast reply. I got it working tonight after adding my HEOS to the same network as my OpenHAB installation. I can also control from my phone in a different subnet after some other network tweak with pfSense/pimd. Really happy with this great plugin, thank you @Wire82!

@majherek
Can you please install the latest Binding version I posted some time ago. Maybe this already solves your problem. The version you are using is an older one. Normally the binding checks if the connection is working correctly and reconnect it if required. Please let me know if the latest version has the same issue. Please note that the new version breaks with some old behavior and rules. So please check out the read me file I also posted before.

@bartsnijder
Happy to here that this solved your problem. Yes the latest version changed some names and values and also moved some parts from one thing to an other. So please refer to the latest readme file.
And also thanks for the hint to @Dennis1984120!

@rkrisi
Can you please check if your players both have a negative PID? You can check this via PaperUI!

@Dennis1984120
Thank you! Good to here that the binding is working. I will improve it during the next months and hopefully it will be integrated to OpenHab 2.5

Hint btw ! It took me a while to understand why binding does not discover any device as a bridge and - as following - none of the things/favorites/playlists discovered.

Check your FIREWALL! Even if Openhab acts as a Upnp client it has to have allowed source port 1900/udp. Enabled/add that to iptabes/firewalld if you have strict firewall!

@Wire82 / Anybody - do you have any clue why binding drops this messages ?
2019-01-28 09:36:39.911 [WARN ] [binding.heos.internal.api.HeosSystem] - Connection to HEOS Network lost!
2019-01-28 09:36:39.912 [INFO ] [binding.heos.internal.api.HeosSystem] - Shutting down HEOS Heart Beat
2019-01-28 09:36:39.913 [INFO ] [binding.heos.internal.api.HeosSystem] - Stopping HEOS event line listener
2019-01-28 09:36:39.917 [INFO ] [binding.heos.internal.api.HeosSystem] - Reconnecting to Bridge with IP 10.1.1.5Y @ port 1255

I have an active bridge binded to 10.1.1.5X ip and for some reason binging connects to second device 5Y

@dimka
I have similar issue: #29.

In weekend I upgrade OH to 2.4 and I will try newest HEOS binding, as @Wire82 suggest. But I think the solution with definig two bridge isn’t good.

@Wire82: can we define two bridge in things file, as I do it?

Bridge heos:bridge:2159aebc-1cdc-2c29-3139-1f6d9c5f8669 "HEOS Bridge: Matylda" @ "HEOS" [ name="HEOS Bridge Matylda", ipAddress="192.168.199.246", userName="username", password="secret", heartBeat=60]

Bridge heos:bridge:c4c3c1e7-2875-f458-24b5-75b691e7b149 "HEOS Bridge: Marta" @ "HEOS"  [ name="HEOS Bridge Marta", ipAddress="192.168.199.247", userName="username", password="secret", heartBeat=60]

Thing heos:player:1013171437 "HEOS 1: Matylda" @ "HEOS" [ pid="1013171437", type="Player", name="Matylda" , ipAddress="192.168.199.246" ]

Thing heos:player:-104736039 "HEOS 1: Marta" @ "HEOS" [ pid="-104736039", type="Player", name="Marta" , ipAddress="192.168.199.247" ]

Thing heos:group:1368813261 "HEOS 1: Matylda + Marta" @ "HEOS" [ gid="1013171437", name="Matylda + Marta", ipAddress="192.168.199.246", type="Group", memberHash="1368813261" ]
Thing heos:group:3724010187 "HEOS 1: Marta + Matylda" @ "HEOS" [ gid="-104736039", name="Marta + Matylda", ipAddress="192.168.199.247", type="Group", memberHash="3724010187" ]

@majherek yes - I would accept it if I would define as you do - two bridges statically. However during discovery I had accepted only one (out of three) devices as a bridge. There one that has 1X ip. Question - where does it take second 1Y. Ofcause I had been playing a lot before - trying to define a bridge manually pointing each time to new IP. But now - it seems all clean …

Thanks @Wire82 for your reply!

However the problem there was that the players were already groupped (but I never saw an error like this before).
Also I have some other problems with the binding:

  • The favourite (dinamic) channels are loaded, I can assign Items to them, but it won’t do anything. (I can’t see anything in the log except that the switch is turned on and after off - no other logs even in TRACE mode). Executing the same command (starting a favourite channel) through sending the raw command to the command channel works flawlessly. Or even if a group is made before, should I have to select a player where to play this favourite channel?
  • The current track position / track duration is now returned as seconds not as milliseconds written on the README. I will make a PR as soon as I arrive home next week to improve the README, I have found some typos, etc in the README

Thanks!

I’m not sure if I fully understand your question.
But if you install the Heos binding, and open het Heos Bridge Thing, you will see that each favorite in Heos has it’s own channel:
image

All you need to do next it create an item linked to that channel.

My bad, if you select a channel, you have to select a player in advance…
Now it works, great!

Thanks!

Hello everybody,

I released a new version of the binding which can be found here:


Please note that many things have changed. Some are on code side only but there are also some changes at the user side.
Some important thing which changed is the definition of the bridge, players and groups for making it easier to configure the things. Please refer to the README.md for more information.
An other important change is that the favorite channels are now available at each player and group to avoid some additional rules. In this version the channels are also kept at the bridge to not break any definitions at the current state. But please note that this can change if decided that this change is a good one and the favorite channels are not needed anymore at the bridge.
So enjoy testing and let me know if you find some issues and what do you think about the changes and the binding.
Wire82

@dimka and @majherek
Please do not define two Bridges! This can cause many issues with the binding. Please refer to the new README.md for an example how to define the thinks with one bridge.
Only one bridge is required to establish the connection. Than all players and groups are discovered through that single bridge.
Wire82

Hi

Are there any prerequisites for your testing version?

I’ve dropped the jar into the add-ons folder but the binding is showing in bundle:list as installed, but not active

bundle:start 259
executing command: Error executing command on bundles:
   Error starting bundle 259: Could not resolve module: org.openhab.binding.heos [259]
Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp

I tried your 2.4 version (which is not loaded / installed currently) and that worked straight away.

Update

Running this command from the Karaf console has changed your binding to Active

feature:install esh-io-transport-upnp

FYI

I’ve entered my user name and password, but the Thing is still initialising…

So I thought I’d look for an annotation solution…

And a binding to address the annotations can be found here.

https://repo.eclipse.org/content/repositories/eclipse-releases/org/eclipse/jdt/org.eclipse.jdt.annotation/2.0.0.v20140415-1436/

Hi,

I think this a know issue. As long as the binding is not part of the openHAB system the upnp feature does not install automatically. This can also be solved by installing the HUE binding for example which activates this feature.

1 Like