Yamaha Network Receivers

Ok, seems my indentation was messed up; getting a green tick now;

BUT, the names still have not changed

media_player:
  - platform: Yamaha
    name: "Living Room Stereo"
    host: 192.168.190.11
    source_names:
    HDMI1: "Living Room TV"
        
  - platform: Yamaha
    name: "Bedroom Stereo"
    host: 192.168.190.12
    source_names:
    HDMI1: "Fire TV"
    AV4: "BedRoom Alexa"

So after removing, restart, readd.

I now get nothing.

How can I see the logs?

Not sure if this has anything to do with it?


Log Details (ERROR)
Thu Aug 09 2018 18:26:09 GMT+1000 (Australian Eastern Standard Time)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 210, in async_update_ha_state
    state = self.state
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 394, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/hue.py", line 268, in is_on
    return self.light.state['any_on']
  File "/usr/local/lib/python3.6/site-packages/aiohue/groups.py", line 44, in state
    return self.raw['state']
KeyError: 'state'

Also this ;

Testing configuration at /config
Failed config
  General Errors: 
    - Platform not found: media_player.Yamaha

Successful config (partial)

Try

media_player:
  - platform: yamaha

Notice the lower-case ‘y’ in Yamaha?

Python and Linux are both case sensitive.

you need to use lower case and you need correct indenting. This is my conifg:

media_player:
  - platform: yamaha
    host: !secret yamaha_host
    source_ignore:
      - AV1
      - AV2
      - AV3
      - AV4
      - AV5
      - AV6
      - Pandora
      - Rhapsody
      - SiriusXM
      - Spotify
      - Tuner
      - USB
      - V-AUX
    source_names:
      HDMI1: "Xbox One"
      HDMI2: "Playstation 4"
      HDMI3: "Wii U"
      HDMI4: "PC"
      HDMI5: "Switch"
      AUDIO1: "Phone"
      AUDIO2: "Echo"

OK,

I think I got it now, I had copied it from the web and it seems the config files are super sensitive. So pasting into notepad before pasting into the config file seems to have worked better.

So I have the name right and I seem to be able to control and name the inputs so, all good.

Now I have to work out how this works with alexa :slight_smile:

Thanks all for your help, I really appreciate it!

Hi, I wonder if you could help me a bit. I have an automation that detects when the Yamaha AV amplifier is switched on and selects a light scene which works perfectly thus:

configuration.yaml:

media_player:
  - platform: yamaha
    host: '192.168.0.102'

automations.yaml:

- alias: TV On Turn On light Scene
  initial_state: true
  trigger:
    platform: state
    entity_id: media_player.yamaha_receiver
    to: 'on'
  condition:
    - condition: state
      entity_id: sun.sun
      state: below_horizon
  action:
    service: scene.turn_on
    entity_id: scene.tv_viewing

I want to create some more light scenes based on the input that’s selected, for example a different lighting scene for the Playstation or the Apple TV, so I used the same logic, but its not working, so it seems the method of detecting the selected input may be different from the “on” indication. Has anyone any ideas where I’m going wrong?

automations.yaml:

- alias: Apple TV Scene
  initial_state: true
  trigger:
    platform: state
    entity_id: media_player.yamaha_receiver
    to: 'HDMI1'
#  condition:
#    - condition: state
#      entity_id: sun.sun
#      state: below_horizon
  action:
    service: scene.turn_on
    entity_id: scene.hdmi01

Many thanks for anyone with an Idea of what I’ve missed. BTW The scenes work perfectly if manually selected, the issue is detecting the status from the Amplifier.

Best regards,

Justin

the source is not the main state of an entity, which is the root cause of your problem. You’ll need a template trigger for that.

- platform: template
  value_template: >
    {{ is_state_attr('media_player.yamaha_receiver', 'source', 'HDMI1') }}
2 Likes

Petro, many thanks, I’ll give that a go.

Justin

Petro, many thanks indeed! Worked perfectly, You’ve also given me a clue to how to do a few more things too. Many thanks indeed. :slight_smile: Justin

1 Like

Hi guys,

I’m struggling with lovelace mediaplayer card. I think, like Hass says me, that I don’t have a unique entity id for my receiver and that’s probably the cause of this mess.

Have you done anything similar or do you have a way to fill an entity id for a yamaha receiver ? I whish to get my mediaplayer card working.

Here is my yaml declaration:

- platform: yamaha
  host: 10.10.1.39
  name: "Yamaha RX-775 Salon"
  source_ignore:
    - "AUX"
    - "AV1"
    - "AV2"
    - "AV3"
    - "AV4"
    - "AV5"
    - "AV6"
    - "AUDIO1"
    - "AUDIO2"
    - "PHONO"
    - "V-AUX"
    - "HDMI4"
    - "HDMI5"
    - "Napster"
    - "Spotify"
    - "TUNER"
  source_names:
    HDMI1: "Mibox 3S"
    HDMI2: "PlayStation 3"
    HDMI3: "Wii U"
    SERVER: "Serveurs"
    NET RADIO: "Web Radios"
  zone_ignore:
    - "Zone2"
  zone_names:
    Main: "Salon"

Best regards,
Ismaël

I have pretty much the same configuration you do above and have no issue with the core Lovelace media player card or this one (my preferred):

2 Likes

I’m conforted that you have similar configuration ! It should be working then … I’ll give it another try with both default lovelace media player and the Mini Media Player :slight_smile: Maybe it’s my cards that are not well configured …

Thanks

Post your Lovelace card config here if you have any issues.

Thanks tom_l, I made it work based on your Mini Media Player link ! Now I have plenty time to make it more usefull than default behaviour :slight_smile:

I have an RX-V3085 which is mostly working ok except I can’t select any of the HDMI sources? Here is my configuration.yaml

discovery:
  ignore:
    - yamaha

media_player:
  - platform: yamaha
    host: 192.168.1.235   
    source_names:
      HDMI1: "BluRay Player"
      HDMI2: "Kodi"
      HDMI3: "ChromeCast"
    source_ignore:
      - "AV3"
    zone_ignore:
      - "Zone_3"
      - "Zone_4"
    zone_names:
      Main_Zone: "Rumpus"
      Zone_2: "Alfresco"

When I look at the attributes no HDMI listed? I just added ignore AV3 to see if that worked which it does. Ideas?
media_player.yamaha_receiver_rumpus

source_list:
  - AUDIO1
  - AUDIO2
  - AUDIO3
  - AUDIO4
  - AUX
  - AV1
  - AV2
  - AV4
  - AV5
  - AV6
  - AV7
  - AirPlay
  - Alexa
  - Amazon Music
  - Bluetooth
  - Deezer
  - MusicCast Link
  - NET RADIO
  - PHONO
  - SERVER
  - Spotify
  - TIDAL
  - TUNER
  - USB
sound_mode_list:
  - Hall in Munich
  - Hall in Vienna
  - Hall in Amsterdam
  - Church in Freiburg
  - Church in Royaumont
  - Chamber
  - Village Vanguard
  - Warehouse Loft
  - Cellar Club
  - The Roxy Theatre
  - The Bottom Line
  - Sports
  - Action Game
  - Roleplaying Game
  - Music Video
  - Recital/Opera
  - Standard
  - Spectacle
  - Sci-Fi
  - Adventure
  - Drama
  - Mono Movie
  - Enhanced
  - Surround Decoder
  - 2ch Stereo
  - 9ch Stereo
  - Straight
volume_level: 0.75
is_volume_muted: false
media_content_type: music
media_title: ''
media_artist: ''
media_album_name: ''
source: Spotify
sound_mode: 9ch Stereo
friendly_name: Yamaha Receiver Rumpus
supported_features: 84925

Your device needs to report those sources if you intend to use them, if it doesn’t… there isn’t much you can do. To be honest, AV1 - AV7 seem like they’d be your HDMI sources. You can verify this by setting the source on your receiver and looking at what the media player reports.

1 Like

Good idea I’ll try that tomorrow!

Yes those AV sources are the HDMI inputs. Thanks for the point in the right direction!