Working around mafunctioning Zone B discovery for Yamaha RX-V581 receiver

Unfortunately zone discovery doesn’t work with my Yamaha RX-V581 receiver and i can’t activate Zone B through the Yamaha component. Yamaha put a YNC_Tag="Main_Zone" on both the Main Zone and Zone B, which makes a little sense, since Zone B can only play what the Main Zone is playing. I opendend an issue over at rxv, hoping that someone more capable than me will someday fix this.

https://github.com/wuub/rxv/issues/37

Meanwhile i worked around the issue with the help of two command line switches.

- platform: command_line
  switches:
    yamaha_zone_1_power:
      command_on: 'curl -d "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Power_Control><Power>On</Power></Power_Control></Main_Zone></YAMAHA_AV>" http://192.168.1.73/YamahaRemoteControl/ctrl'
      command_off: 'curl -d "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Power_Control><Power>Standby</Power></Power_Control></Main_Zone></YAMAHA_AV>" http://192.168.1.73/YamahaRemoteControl/ctrl'
      command_state: 'curl -d "<YAMAHA_AV cmd=\"GET\"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>"  http://192.168.1.73/YamahaRemoteControl/ctrl | xmllint --format --noent --xpath "//Power/text()" -'
      value_template: '{{ value == "On" }}'
      friendly_name: Yamaha Zone 1
    yamaha_zone_2_power:
      command_on: 'curl -d "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Power_Control><Zone_B_Power>On</Zone_B_Power></Power_Control></Main_Zone></YAMAHA_AV>" http://192.168.1.73/YamahaRemoteControl/ctrl'
      command_off: 'curl -d "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Power_Control><Zone_B_Power>Standby</Zone_B_Power></Power_Control></Main_Zone></YAMAHA_AV>" http://192.168.1.73/YamahaRemoteControl/ctrl'
      command_state: 'curl -d "<YAMAHA_AV cmd=\"GET\"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>"  http://192.168.1.73/YamahaRemoteControl/ctrl | xmllint --format --noent --xpath "//Zone_B_Power_Info/text()" -'
      value_template: '{{ value == "On" }}'
      friendly_name: Yamaha Zone 2

(192.168.1.73 is the internal ip address of my Yamaha receiver)

This basicly lets me switch and automate zone power control. However the state query response seems a little slow, so after turning one of the zone switches on (or off), it turns right off again. it takes another 30 seconds, until the next switch status query, that the switch really turns on.

1 Like