Skip to content
This repository has been archived by the owner on Dec 9, 2021. It is now read-only.

Not adding additional zones as entities #8

Open
benjycov opened this issue Sep 14, 2020 · 10 comments
Open

Not adding additional zones as entities #8

benjycov opened this issue Sep 14, 2020 · 10 comments

Comments

@benjycov
Copy link

Hi,

Good work on this.

There appears to be a problem where one multi-zone physical device presents multiple musiccast devices, for example if I use the standard yamaha_musiccast:

media_player:

  • platform: yamaha_musiccast
    host: 10.0.51.22

I see the following entities:

media_player.living_room_main
media_player.living_room_zone3

Once I change to the musiccast_yamaha:

media_player:

  • platform: musiccast-yamaha
    host: 10.0.51.22

I only see one entity:

media_player.living_room_main

Hopefully its an easy fix!

Thanks... Ben

@JoeStratton
Copy link

I am also experiencing this issue

@timberwolf444
Copy link

This is just what I was looking for for, great work. Is there any way to get to additional zones to show on single devices as benjycov described. I have a zone 2 for the patio that I can control if I set it up as yamaha_musiccast, but once I switch it to musiccast_yamaha for the grouping to work it causes the 2nd zone on the receiver to disapear.

Thanks

@arikflorida
Copy link

anyone got luck to see the additional zone?

@arikflorida
Copy link

Fixed it by:
media_player:

  • platform: musiccast_yamaha
    host: 192.168.1.29
  • platform: yamaha_musiccast
    host: 192.168.1.29

@timberwolf444
Copy link

Hi arikflorida, are you sure that this fixed the issue? your 1st line is configuring the entity for the new musiccast integration, and your 2nd line is configuring the same device to the original musiccast integration. Are you actually able to group all these speakers? I am still unable to get the zone 2 on my receiver to show in the as an entity unless I use the original musiccast integration yamaha_musiccast but that platform does not give the join/unjoin speaker features that the musiccast_yamaha does.

Thanks

@darthdurden
Copy link

@timberwolf444 have you had any luck with this? I'd really love for my zone2 to show as an additional entity.

@darthdurden
Copy link

Looking into this a little bit with the HASS debug output. It looks like part of the problem is we're getting a null pointer here:

return self._distribution_info.get('role') == 'server' and \

distribution_info is null:

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 432, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 550, in async_device_update await task File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/musiccast_yamaha/media_player.py", line 306, in update self.refresh_group() File "/config/custom_components/musiccast_yamaha/media_player.py", line 378, in refresh_group client_entities = [e for e in entities File "/config/custom_components/musiccast_yamaha/media_player.py", line 379, in <listcomp> if e.ip_address in self._zone.group_clients] File "/config/custom_components/musiccast_yamaha/pymusiccast.py", line 103, in group_clients if not self.group_is_server: File "/config/custom_components/musiccast_yamaha/pymusiccast.py", line 97, in group_is_server return self._distribution_info.get('role') == 'server' and \ AttributeError: 'NoneType' object has no attribute 'get'

@timberwolf444
Copy link

I have not had any luck getting the zone 2 working. It looks like someone is working on a new version.

home-assistant/core#51561

@darthdurden
Copy link

@timberwolf444 that is awesome! I'll definitely be looking into that. In the meantime, I have sort of been able to get zone2 to work on mine. A couple of minor code tweaks (checking that distribution_info isn't null above), and then fixing this line:

You need to pass the zone_id into the super class.

This allows the second zone to be added, but it doesn't seem to work with the grouping functionality :-/ Not sure why that is just yet, but I'll keep toying with it, while I keep my eye on the rewritten integration. Thanks for the heads up!

@darthdurden
Copy link

@arikflorida @timberwolf444 I just tried out the new version and grouping works great for everything, including zone2!

Installed the component from this branch while I wait on official release:
https://github.com/vigonotion/home-assistant/tree/musiccast-grouping-2

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

No branches or pull requests

5 participants