Heos (Denon) support

Thanks for your feedback. Glad that this works now. :slight_smile:

Hi

I have dropped your new JAR file in and Karaf reports :

error executing command: Error executing command on bundles:    
Error starting bundle 268: Could not resolve module: 
org.openhab.binding.heos 
 

Error executing command: Error executing command on bundles:    Error starting bundle 268:
Could not resolve module: org.openhab.binding.heos


Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp

So I tried this, but it wasnā€™t happy either

bundle:install org.eclipse.smarthome.io.transport.upnp

Or

feature:install esh-io-transport-upnp

I got this error

Error executing command: Error installing bundles:
     Unable to install bundle org.eclipse.smarthome.io.transport.upnp: org.osgi.framework.BundleException: Error reading bundle content.

As a work around, I have added the Hue binding, as it was suggested that it installs the required upnp bundle

Okay thanks!
I also started to debug my biggest problem right now with the binding, that after some time the states are not updatedā€¦ Hope I will find something.
Do you think that Debug level is enough for this? Are events logged on debug when the connection is lost ?
Basically now I can see every few seconds that a heartbeat is sent. If I can remember correctly, previously when the binding stops refreshing these events are gone. Now I want to debug further and see when the last heartbeat is sent, are there any other events right before it, which might help understand why it stopsā€¦

Hi thanks for your message
This is also something I would recommend to do. Installing the hue binding solves the issue.
I don`t know why but if you installing this binding with an external .jar file I also get an issue but installing the hue binding helps.
But I got a different error message with another Package missing:

Unresolved requirement: Import-Package: org.apache.commons.net.telnet; version="[3.3.0,4.0.0)"

If installing the binding right out of OpenHAB this doesnā€™t seems to be a problem.
So for me it doesnā€™t seems to be very predictable what causes the error

Hi. Yes normally DEBUG should be enough.
If the connection is lost you should see something like:

2020-01-05 19:09:57.194 [DEBUG] [binding.heos.internal.api.HeosSystem] - Connection to HEOS Network lost!

2020-01-05 19:09:57.206 [DEBUG] [binding.heos.internal.api.HeosSystem] - Shutting down HEOS Heart Beat

2020-01-05 19:09:57.220 [DEBUG] [binding.heos.internal.api.HeosSystem] - Stopping HEOS event line listener

2020-01-05 19:09:57.233 [DEBUG] [binding.heos.internal.api.HeosSystem] - HEOS event line is still open closing it....

2020-01-05 19:09:58.286 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://system/register_for_change_events?enable=off

2020-01-05 19:10:01.294 [DEBUG] [binding.heos.internal.api.HeosSystem] - HEOS System read failure during response. message: Can not read from client

2020-01-05 19:10:01.300 [DEBUG] [binding.heos.internal.api.HeosSystem] - HEOS failed command: heos://system/register_for_change_events?enable=off

2020-01-05 19:10:01.307 [DEBUG] [binding.heos.internal.api.HeosSystem] - HEOS System trys to send command again....

2020-01-05 19:10:01.313 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://system/register_for_change_events?enable=off

2020-01-05 19:10:01.322 [DEBUG] [binding.heos.internal.api.HeosSystem] - IO Exception during send HEOS command with message: DatenĆ¼bergabe unterbrochen (broken pipe) (Write failed)

2020-01-05 19:10:01.629 [DEBUG] [binding.heos.internal.api.HeosSystem] - Disconnecting HEOS event line
2020-01-05 19:10:01.663 [DEBUG] [binding.heos.internal.api.HeosSystem] - Reconnecting to Bridge with IP 192.168.0.4 @ port 1255

The issue I have is that I donā€™t know the problem. On my side binding is running over weeks without an issues regarding updating the states.

Ok, I will try to debug this.
Very randomly it just loses state updates. So I canā€™t see the currently played song name, artist, Control just stays at pause. However control is working (so I can for example start a favorite radio channel) and it will start it (it will even build a group of players and start on that one), but will not give any feedback on the current state. Sometimes it works for days, sometimes only a few hours.
Executing a bundle:refresh on the binding through the console solves this problem (so I think that this is clearly a problem somewhere in the binding, plus HEOS app works always).
Also my Bridge (which is an AVR) is connected through a wired connection, so there shouldnā€™t be any kind of wireless problem or something like that.

Hi

This isnā€™t anything too serious.

Apparently, when a binding is added to the main system, the maintainer can state dependencies.

Whereas when we drop Jar files into the Add-on folder, it is up to ā€˜usā€™ to ensure the dependencies are met.

Iā€™ve learnt that on this occasion, the upnp bundle is required.

Which is also a dependency of the Hue Binding, so installing that will resolve this issue.

Reference -----

@MDAR
Another way to resolve the dependency problem is to just leave the original PaperUI-HEOS binding installed and then disable it in the Karaf console. Then all dependencies are installed and you just have to drop the new .jar in the addons folder.

Now thatā€™s a good trick :slight_smile:

thanks for the update, works great (after uninstalling from paper ui and installing upnp, all via addons.cfg)

although the creation/linking of items still doesnā€™t work in paper ui, but config files are fine for me

@jakaZ
Iā€™m running OH2.5 and can link items easily in PaperUI


But saying that, I have just added my HEOS login and PaperUi now reveals my Favorites, which PaperUI doesnā€™t seem to want to link.

However, I have noticed that the ā€œProfileā€ list box is empty, so I canā€™t select a profile, which may be why PaperUI canā€™t link the items.

@Wire82
Now this is strange . Since I enabled debug logging (more than 2 days now). It works as it should. I canā€™t remember in the near future that it worked for more than 1 day.
I will leave it as it is now and maybe after a few days again I will turn off logging and see what happens.

@Wire82
ā€œFinallyā€ it stopped updating. The last message from HEOS was this:

2020-01-08 12:56:11.448 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Heos Heart Beat
2020-01-08 12:56:16.034 [DEBUG] [binding.heos.internal.api.HeosSystem] - Failure during HEOS Heart Beat command with message: Can not read from client
2020-01-08 12:56:16.366 [DEBUG] [binding.heos.internal.api.HeosSystem] - Shutting down HEOS Heart Beat
2020-01-08 12:56:16.369 [DEBUG] [binding.heos.internal.api.HeosSystem] - Stopping HEOS event line listener
2020-01-08 12:56:16.374 [DEBUG] [binding.heos.internal.api.HeosSystem] - HEOS event line is still open closing it....
2020-01-08 12:56:16.380 [DEBUG] [binding.heos.internal.api.HeosSystem] - Sending Command: heos://system/register_for_change_events?enable=off
2020-01-08 12:56:16.390 [DEBUG] [eos.internal.api.HeosEventController] - HEOS send response: {"heos": {"command": "system/register_for_change_events", "result": "success", "message": "enable=off"}}
2020-01-08 12:56:16.693 [DEBUG] [binding.heos.internal.api.HeosSystem] - Disconnecting HEOS event line

Since then there is no heart_beats or anything, but if you issue a command it will send it to the device.
It looks like the connection is lost, and it wonā€™t restore itā€¦
And it stops here. Looking at the code, it should also close the command line and then retry connecting. However it stops hereā€¦

This helps you somehow to debug this?

Yes this helps. I think I know where it stopsā€¦ And I understand why you are still able to send commands but you are not able to receive updated.
There are to connections to the HEOS system. One connection (the event line) receives the updates from the HEOS system and updates the states, and on line (the command line) which send the commands.
If the binding shall close the connection it starts with closing the event line first and second the command line. But in your case is seems that the system is not able to close the event line, and stuck there without restarting the connection.
I will have a closer look into it and give you some feedback.

Yes I already saw that there is two (Telnet object) connection.
Which I couldnā€™t understand, that where it stops, hope you can find somethingā€¦

What I would like to do is sending you a version of the binding with some additional DEBUG messages. Do you think you can try this one and send me the log? This should give me some more information where it stops?
Thanks. :slight_smile:

Yes for sure!
Iā€™m using right now the latest available from repo, but I can install any versionā€¦ Iā€™m on 2.5 stable

Please find the latest version of the binding here:

The release shall fix an issue during closing the Telnet connection.

1 Like

Hi everybody
I installed now stable 2.5 and installed via paperui the heos plugin. Everyging works and i have every groups and bridges online and i can listen to heos.
One thing which worked before (with 2.4 and manually installed plugin)
-whenn i wanted to change radio channel from favorites i ha to do it in the rules like this:
Select in the bridge item the main player
On the bridge item i had every favorit dynamic generated and i made the one i needed to on and unselect main player.

Now i habe after putting my heos credential in NO dynamic items in the bridge (but i have the favorites in every player items and also in the group item, but not in the bridge)

How can i now change radio channel via a openhab rule?

Thank you in advance

Hello,

Lately, I have busy with tuning the HEOS binding, I changed some of the inner workings but also some of the channels which are exposed.

A summary of the most relevant changes:

  • Add favorites select channel
  • Add queue select channel
  • Add playlists select channel
  • Add clear queue channel
  • Tuned heartbeat / reconnect logic
  • Removed dynamic Favorite channels
  • Playlist channel no longer supports numeric indexes
  • Correct the name of Shuffle channel from Shuffel to Shuffle (was already correct for group but not for players)

I also recorded a short demo of the new channels:

I would really love some feedback, especially testing or (small) feedback on the new/changed features.

Please note that when installing the new version you might have to recreate your thing to use the new features. Depending on how you linked your channels you might have to recreate (some of) the links. Feel free to also share experience with upgrading.

You can download the binding the new binding: https://download.martinvw.nl/org.openhab.binding.heos-2.5.2-SNAPSHOT-6099.jar