Has this happened to anyone else? Just updated today and I noticed zone_2 is no longer seen via:
media_player:
- platform: yamaha
Has this happened to anyone else? Just updated today and I noticed zone_2 is no longer seen via:
media_player:
- platform: yamaha
Log:
2018-02-12 22:18:06 INFO (SyncWorker_10) [homeassistant.components.media_player.yamaha] Receivers: [<RXV model_name="RX-V677" zone="Main_Zone" ctrl_url="http://192.168.1.119:80/YamahaRemoteControl/ctrl" at 0x73358df0>, <RXV model_name="RX-V677" zone="Zone_2" ctrl_url="http://192.168.1.119:80/YamahaRemoteControl/ctrl" at 0x744a8e70>]
The response looks correct, so the zone is there. But HA no longer creates the state object.
I’m also getting this in the log twice:
018-02-12 22:18:06 DEBUG (SyncWorker_10) [homeassistant.components.media_player.yamaha] Ignoring duplicate receiver Yamaha RX-V677`Preformatted text
I’m also able to connect to 192.168.1.119:80 and use zone 2 through the web interface.
Ok, I just followed the path and I’m pretty sure the removal of the unique_id property in yamaha.py is causing this bug. How do I report this to get it fixed? How can I add the property back for my own use in my installation of Hassio? If this wasn’t hassio, I would know how to do it…
It’s pretty clear that the discovery is finding both recievers because of this line in yamaha.py:
receivers = rxv.RXV(
ctrl_url, model_name=model, friendly_name=name,
unit_desc_url=desc_url).zone_controllers()
_LOGGER.info("Receivers: %s", receivers)
And my log is:
Receivers: [<RXV model_name="RX-V677" zone="Main_Zone" ctrl_url="http://192.168.1.119:80/YamahaRemoteControl/ctrl" at 0x73358df0>, <RXV model_name="RX-V677" zone="Zone_2" ctrl_url="http://192.168.1.119:80/YamahaRemoteControl/ctrl" at 0x744a8e70>]
It’s also clear that when iterating the receviers, it thinks its filtering out duplicates but it’s really filtering the second zone. Directly after creating the receivers is this:
for receiver in receivers:
if receiver.zone in zone_ignore:
continue
device = YamahaDevice(name, receiver, source_ignore,
source_names, zone_names)
# Only add device if it's not already added
if device.unique_id not in hass.data[DATA_YAMAHA]:
hass.data[DATA_YAMAHA][device.unique_id] = device
devices.append(device)
else:
_LOGGER.debug('Ignoring duplicate receiver %s', name)
The unique id’s for both receivers are the same, here’s the proof:
[homeassistant.components.media_player.yamaha] Ignoring duplicate receiver Yamaha Receiver
On Jan 30th, @balloob and @pvizeli removed the unique_id that helps distinguish between the main zone and zone 2. This is pulled from the change log on 1/30/2018, the minus signs indicate it was removed:
self._name = name
self._zone = receiver.zone
- @property
- def unique_id(self):
- """Return an unique ID."""
- return '{0}:{1}'.format(self.receiver.ctrl_url, self._zone)
-
def update(self):
"""Get the latest details from the device."""
self._play_status = self.receiver.play_status()
With the old unique_id, the name for the two recievers would have been Yamaha Receiver:Main_Zone and Yamaha Receiver:Zone_2, now they both come in as Yamaha Receiver.
Update for anyone that is interested. This indeed was a bug. The fix was added to the 0.63.2 milestone. You can view the fix here: