Heos Group support

Hi all,
It would be great if Home Assistant could manage Groups with Heos devices!
Please, add it :slight_smile:

@andrewsayre: sorry to bother, but any chance HEOS grouping would be supported any time in near future? :slight_smile: Really missing this feature. Thanks for the great work so far!

1 Like

@tormagj No worries! It fell to the back burner lately and yes I plan to get to it, hopefully within the next few weeks. FYI, you can control groups today (it’s just the lead player, so changing it’s volume, media, etc, will change the group). They just don’t show up as discrete entities nor are there services to join/unjoin players. Stay tuned!

2 Likes

@andrewsayre Sounds great! Thanks. Yeah, I was thinking about the join/unjoin service. Staying tuned and looking forward to it :slight_smile:

Thanks a lot for a great integration already! Looking forward to the grouping as well. Currently when I have my heos in a group I can change music for example for the whole group, but changing the volume on one of the players changes the volume only for that speaker and not for the whole group as you described. How can I manage to do this until the grouping is finished?
Thanks!

Thanks for the great work on the HEOS integration so far Andrew! Any chance I can motivate you with a beer or coffee (or two) for implementation of the grouping feature? :smiley:

1 Like

Hey @andrewsayre! Assume you’ve been busy with other things and that HEOS grouping has fallen behind on the priorities? :slight_smile: Just wanted to let you know I did a fork of your HEOS integration and managed to get grouping working when running it as a custom component. Using it together with the mini-media-player and it seems to be functioning quite well so far. Also added a turn_off feature equal to stop (since it doesn’t exist in the CLI commands), just to be sure I can use typical power buttons in cards.

My code should be expected to be rather dirty and not very well structured since I’m still a newbie in Python and even more so on HA components/integrations. But hey, it’s working :slight_smile: Anyway, please let me know if I could do anything to contribute, share it or participate in any further developing the official version.

1 Like

Hi @tormagj: could you share your custom component? Want to do some testing if you like…

Thanks
Cadish

Of course! I’m still learning github too, so bare with me if I’m doing this wrong, but I put my little hack here:

1 Like

How can I group/ungroup speakers? :roll_eyes:
Can I do it via a service, or do I need to use the GUI?

hi! the services should work, but I did most of the testing with the mini media card that I linked to above. check the grouping option in the installation guide. let me know if it’s working for you!

I get this error when I’m trying to group through the GUI

Unable to join: Missing Command arguments (3)

Hum, strange. Just tested it here again, and working fine both with mini-mediacard and by using services. Here’s my card setup

cards:
  - type: vertical-stack
    cards:
      - type: custom:mini-media-player
        entity: media_player.heos5_office
        artwork: cover
        source: icon
        toggle_power: false
        hide:
          power_state: false
          icon: true
        speaker_group:
            platform: heos
            show_group_count: true
            entities:
              - entity_id: media_player.heos5_office
                name: HEOS5 Office
              - entity_id: media_player.heos1_kitchen
                name: HEOS1 Kitchen
              - entity_id: media_player.heos1_flex
                name: HEOS1 Flex
              - entity_id: media_player.heos_stue
                name: HEOS LivingRoom

And here is how it looks (notice the +1 on the name after I grouped two of the speakers):
image

Does your setup look somehow similar?

You could also group your speakers with the HEOS app and then call the service ‘heos.groupinfo’ which will basically just print some debugging groupinfo in the log, like this:

2019-11-27 21:12:11 INFO (MainThread) [custom_components.heos.services] HEOS Groups are: ['name: heos5_office + heos1_flexmembers: heos5_office,heos1_flex']

Had more or less the same config, but copy-pasted yours now (with my entities of course), and still the same error…

That’s weird. Do you find any details in the log indicating that the component is not properly loaded? Or perhaps some more info on what goes wrong?

No, no other details in the log, except for the general one

2019-11-27 21:33:37 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for heos which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

BTW, I’m also logged in into my Heos device, as I can see its favorites etc…

Ok. I can’t think of anything obvious right now, but probably something silly I guess. I installed the mini-media card via HACS, but I guess that shouldn’t matter. Do you have the latest version of both card and Home assistant? By the way, I’m running hass.io but I guess that shouldn’t matter as well as long as it is the latest Pyheos in the background.

Did you try to call the heos.join service manually?

Hummmm! I got the same message when I tried to call the service with incorrect parameters for the call:

2019-11-27 22:28:48 DEBUG (MainThread) [pyheos.connection] Command failed 'heos://group/set_group?sequence=489&pid=': {'command': 'group/set_group', 'result': 'fail', 'message': 'eid=3&text=Missing Command arguments&sequence=489&pid='}
2019-11-27 22:28:48 ERROR (MainThread) [custom_components.heos.services] Unable to join: Missing Command arguments (3)

That happened for me when I used the default example data for calling the service, or in other words when the names couldn’t be found and mapped into a playerid (number) which the Heos system needs.

Following my setup in previous posts, I call the service like this - then its working.
image

Yes indeed, really strange. I also am running hassio and have the mini-media card installed via HACS too.

Heos.join service is giving me the exact same error…