Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add LMS to Speaker group object #182

Closed
BrownC0de opened this issue Oct 25, 2019 · 7 comments
Closed

Feature request: add LMS to Speaker group object #182

BrownC0de opened this issue Oct 25, 2019 · 7 comments

Comments

@BrownC0de
Copy link

Hello!
Logitech media server has good support for multi-room players. But unfortunately in HA it is now extremely inconvenient to manage their synchronization. In fact, you can only turn it on and off, but synchronization is turned on only in the LMS web interface itself. Is it possible to add support similar to sonos?

@kalkih
Copy link
Owner

kalkih commented Oct 25, 2019

Hey,
I looked at the squeezebox HA component source and it wouldn't work, there are features missing that would have to be implemented in the component before I could add support for it in this card.

@kalkih kalkih closed this as completed Oct 25, 2019
@kalkih
Copy link
Owner

kalkih commented Oct 25, 2019

What would be required,
Service calls for join/unjoin and an attribute that expose the current group composition.
The Sonos component is a great example.

@BrownC0de
Copy link
Author

What would be required,
Service calls for join/unjoin and an attribute that expose the current group composition.
The Sonos component is a great example.

Today, friends shared automation that includes synchronization:
` - service: media_player.squeezebox_call_method
data_template:
entity_id: media_player.raspiplayer
command: sync
parameters: ["ab:cd:ef:12:34:56"]

  • service: media_player.squeezebox_call_method
    data_template:
    entity_id: media_player.raspiplayer
    command: sync
    parameters: ["74:da:38:41:f8:1d"]
  • service: media_player.squeezebox_call_method
    data_template:
    entity_id: media_player.raspiplayer
    command: sync
    parameters: ["f2:b4:29:58:f2:df"] `

And automation disabling synchronization:
` - service: media_player.squeezebox_call_method
data_template:
entity_id: media_player.sqq
command: sync
parameters: ["-"]

  • service: media_player.squeezebox_call_method
    data_template:
    entity_id: media_player.orange
    command: sync
    parameters: ["-"]
  • service: media_player.squeezebox_call_method
    data_template:
    entity_id: media_player.lede
    command: sync
    parameters: ["-"]`

Can this help in this situation?

@kalkih
Copy link
Owner

kalkih commented Oct 26, 2019

Possibly, but those examples doesn't provide me with much information, what is the function of the parameters? looks like a MAC address, how does "multiroom/sync" work in LMS? Is there a master device and then slaves or is the server the master and the devices/speakers slaves? Is there a way to get the "speaker group" / sync composition of an entity?

I don't own any squeezebox devices and am not familiar with the API.
Would be great if someone with experience of LMS/HA and also want this functionality could submit a PR.

@BrownC0de
Copy link
Author

Yes, this is the MAC address.
Technically, there is 1 - LMS server, and clients connect to it. In HA we add only the server at the address, clients appear there automatically. But apparently information on poppy addresses is not transmitted to HA
Screenshot_1
The server itself provides the following information on connected devices:
Screenshot_2

@BrownC0de
Copy link
Author

BrownC0de commented Oct 26, 2019

This is what the CLI API looks like.
cli-api_7.6.zip
the truth is there are commands to control via telnet, but they work fine if you transfer them in json format. Example:
$playlist = 'http://192.168.20.20/playlist.m3u'; callMethod('PlayerBedroom.Play',array('playlist' => $playlist));
There is also a REST API, but on it, I have not yet found the necessary information

@kalkih
Copy link
Owner

kalkih commented Oct 26, 2019

Alright, in my opinion this should be made more abstract by implementing additional service calls in the HA LMS component, one call for join and one for unjoin, similar to how most other multiroom components does it. This would not only benefit this project but also the general HA user when interacting with LMS.

See the Sonos source for a great example.

There would also need to be a way to get the current group composition through the entity's attributes, the Sonos component has this implemented as well and is a great example.

When/if that is done I would be happy to add support for it in this card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants