Denos HEOS support

My error log is peppered with these warnings when it’s running

Executing <Task finished coro=<_handle_async_response() done, defined at /usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/decorators.py:14> result=None created at /usr/local/lib/python3.7/site-packages/homeassistant/core.py:291> took 0.270 seconds

and
Executing <TimerHandle _async_create_timer.<locals>.fire_time_event created at /usr/local/lib/python3.7/site-packages/homeassistant/core.py:1260> took 0.124 seconds

Try to copy the aioheos.py file over as i mentioned earlier. I believe there is still a version numbering issue with lampy’s aioheos. You can either remove the aioheos directory’s in \config\deps\lib\python3.7\site-packages and it’ll pull the new one after a restart or you can copy that file over manually and it should fix the warning messages.

Yep moving the files fixed the warnings in the log, nice!

Would this work for Homeassistant on Docker too?
What steps do i have to take?
Where do the files go?

thx!

Hi all,

I’ve fixed the 0.88.x issues (thanks to @skynet01, @Cadish and maybe more?) and I also implemented a better way to play favourites. You can get it here: https://github.com/Lampy09/hass.aioheos.media_player

See the readme file for an automation example to play a favourite when coming home.
Let me know if I broke something (I’m not a python/homeassistant developer)!

:zipper_mouth_face:

3 Likes

Thanks for your work. Just tested it and it works good. One question about configuring the heos player entitity in the UI.

That’s how it looks for me:

How do I make the volume control visible? Or get a list of my favorite channels?
My main problem though is, when I press ‘stop’ the entitity goes offline and it’s not possible to hit play again. :thinking:

1 Like

Can somebody give me an uncomplicated instruction how can i get this to work? I have paste the heos.py file to the location homeassitant->component->media player and made the entry in the configuration.yaml file. But after restart the HA indicates about invalid config. Have I forgot something?

@zhe , Hast du noch etwas anderes bei dir gemacht dass es bei dir geklappt hat? Vielleich muss ich noch etwas dazu installieren?

I have modified the aesink code for both the HA component and the aioheos api to allow for multiple speakers. I am not sure if anyone else has done this and if not how I would get this out? I don’t want to setp on aesink’s toes. It still has some issues when speakers are linked and if the speakers goes “off” there is no way to bring it back unless you use the heos app (people have mentioned this in the past)

Somewhere in this thread it was mentioned that dependencies ain’t installed correctly, because this is a custom plugin. You have to install it manually:

pip3 install https://github.com/Lampy09/aioheos/archive/v0.1.6.zip#aioheos==0.1.6

I don’t know if your folder is correct. Maybe someone else knows it. This one worked for me:
“Home Assistant\custom_components\media_player\heos.py”

Home Assistant version >= 0.88 is needed too.

Check your config syntax with http://www.yamllint.com/.

ps: ich bleib beim englisch damit es auch alle verstehen :grinning:

edit:
Actually the log file complains about the directory, because it will stop working soon. The correct path working for future as well version is:
“Home Assistant\custom_components\heos\media_player.py”

I just made a small change, to make it possible to hit play again after pressing pause:

@property
def state(self):
    self._state = self.heos.get_play_state()
    if self._state == 'stop':
        return STATE_PAUSED #change this from Off to Paused
    elif self._state == 'pause':
        return STATE_PAUSED
    elif self._state == 'play':
        return STATE_PLAYING
    else:
        return STATE_UNKNOWN

Can someone recommend a good custom media player ui for heos speakers?

Hi,

I am getting an error when I try to install dependencies through:
pip3 install https://github.com/Lampy09/aioheos/archive/v0.1.6.zip#aioheos==0.1.6
Could you tell me what I am doing wrong?

Here is the log:

Thanks!

Error log is asking for libxml2. Mabye you should try to install it. Otherwise, I have no idea now.

i use this: GitHub - kalkih/mini-media-player: Minimalistic media card for Home Assistant Lovelace UI and love it, has many options so you can set up favorites as well

1 Like

So what is the current status?
What is working?

Is there support for groups/creating groups?

Thank you. That’s what I was looking for.
Can you share how to add favorites? I got it working with a script now, but I believe there are better ways than that. Do you maybe know how to play spotify playlists as well?

I did script way as well. Although I think you can specify favorites right in the player. For Spotify I just have that in a script as well, basically I use a spotify media player that switches input to HEOS when it starts playing.

Seems like easink is back on it again: https://github.com/easink/aioheos/commits/master

Pull request from HA: https://github.com/home-assistant/home-assistant/pull/21721

1 Like

Thanks for adding this tweak, makes it MUCH better. Hope this is included it in the official platform as well. Can’t wait!

Does anyone know how I can already test this pull request? Can I simply copy these files into custom_components/heos folder?

Hi,
I have the same question, how do I use a request from HA. I use the custom HA for over a year and want to use the added functionality. So if anyone can point me in the right direction…
And I also hope it will be included in the official platform.
One mor question: if you switch of the Heos (completely) you need to restart HA to get playing information (probably a TCP timeout). Does anyone know to fix this?
Keep up the good work.