Newbie and can’t find a full example

I’m coming over from OpenHAB and still really struggling with the differences in the two systems. Chipping away bit by bit.

I have a compatible Yamaha amp and found some examples where I added this to config.yaml"


media_player:
  - platform: yamaha
    name: "Lounge Amp"
    host: 192.168.1.190
    source_ignore:
    source_names:
      HDMI1: "Kodi"
      TUNER: "Tuner"
    zone_ignore:
    zone_names:
      Main_Zone: "Lounge"
      Zone_2: "Zone 2"
      Zone_3: "Zone 3"


I saved and restarted. But…… now what?

I don’t have a device or entity I can see that matches anything.

Can someone point me to an end to end guide on how to get my amp in, show what to do next and ideally end up with a volume slider in Lovelace

You should have a media player entity. If not visible in Devices and Services → Entities then check Settings → System → Logs for related errors.

Hi, welcome. First steps are hard, especially if there’s yaml involved. Luckily it is needed less and less.

I assume you mean configuration.yaml? Have you looked at the log to see if there are any errors in your configuration file? If there are not: was the receiver on when you restarted HA? It is a wild guess, but maybe if the IP is not reachable during the first configuration, the entity does not get created?

You should have a media player entity after a restart. How did you check to determine the entity is not there?

sorry - configuration.yaml
So I should have an entity called “Lounge Amp” corrrect?
I dont have one of those and there seems nothing in logs to suggest theres an issue - seems to just be ignoring?

is this what the integration should look like?

image

No it should have a number of entities listed (one in your case). Mine:

brave_screenshot_96zke8stt3d3i25a3vbdumw0vrkeb2ie.ui.nabu.casa

Th entity should be media_player.lounge_amp

Can you ping the IP address?

Can you open the IP address in a web browser?

What model amp is it?

Yes, address is pingable and have verified this from ha console as well

I can get to the web interface of amp on port 80
It’s an RX-V3900

Any other ideas?

What do you get when you visit:

http://192.168.1.190/YamahaRemoteControl/desc.xml

I get this:

<scpd>
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
</scpd>

What about:

http://192.168.1.190/YamahaExtendedControl/v1/system/getDeviceInfo

Nothing at that URL

Then it is not using the required API.

This is what mine returns:

{
  "response_code": 0,
  "model_name": "RX-V685",
  "destination": "A",
  "device_id": "44FE3B251051",
  "system_id": "0051DB83",
  "system_version": 2.14,
  "api_version": 2.15,
  "netmodule_generation": 2,
  "netmodule_version": "1909    ",
  "netmodule_checksum": "BFF7716F",
  "serial_number": "Y495579PR",
  "category_code": 1,
  "operation_mode": "normal",
  "update_error_code": "00000000",
  "net_module_num": 1,
  "update_data_type": 0,
  "analytics_info": {
    "uuid": "6266700f-f425-4108-beda-dd452252cc71"
  }
}

hmmmm - is the url you gave me needing a file on the end like the first link?

No, the first one was a file, the second is an api response.

OK - im coming from Openhab and the yamaha binding worked well for me - I fond the the docs here maybe I can use REST commands…

Looks like that particular receiver is a bit special. There are discovery issue topics about it on Openhab, Homey and github. e.g. [FEAT] Add support for RX-V3900 · Issue #16 · lucasvdh/com.yamaha.receiver · GitHub

You could open an issue here: Issues · home-assistant/core · GitHub but I suspect you may be asked to open a feature request on these forums instead.

thanks for your help - I will invstigate REST calls and see how I go

https://community.home-assistant.io/t/yamaha-restful-commands/235523

Actually probably this: https://community.home-assistant.io/t/yamaha-restful-commands/235523/14?u=tom_l

Legendary - that was what I just started writing up! I will contribute back to that thread once I get the zone stuff added in to hat thye started.

1 Like

OK I am back to the original question - thanks @tom_l for your help - I have now got working rest commands to set and get values from my RX-V3900.

So - now what I want to do is getr these rest values and have them shoing on a dashboard for control.

Ive tried to follow and modify the yaml from the linked above thread but I am still learning and its written as if you know what you are doing (whbich I dont).

My goal for learning is to have an on/off switch for the Amp and a slider for the volume - both showing the current state of the amp.

my YAML REST commands to set values are:

yamaha_main_zone_vol:
  url: 'http://192.168.1.190/YamahaRemoteControl/ctrl'
  method: POST
  payload: '<?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Vol><Lvl><Val>-340</Val><Exp>1</Exp><Unit>dB</Unit></Lvl></Vol></Main_Zone></YAMAHA_AV>'  
yamaha_main_zone_power_on:
  url: 'http://192.168.1.190/YamahaRemoteControl/ctrl'
  method: POST
  payload: '<?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Power_Control><Power>On</Power></Power_Control></Main_Zone></YAMAHA_AV>' 

my YAML REST command for getting the current values are:

yamaha_get_main_zone:
  url: 'http://192.168.1.190/YamahaRemoteControl/ctrl'
  method: POST
  payload: '<?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="GET"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>'  

this returns the XML

content: >-
  <YAMAHA_AV rsp="GET"
  RC="0"><Main_Zone><Basic_Status><Power_Control><Power>On</Power><Sleep>Off</Sleep></Power_Control><Vol><Lvl><Val>-390</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute></Vol><Input><Input_Sel>DVD</Input_Sel><Input_Sel_Title>KODI</Input_Sel_Title></Input><Surr><Pgm_Sel><Straight>Off</Straight><Pgm>7ch
  Stereo</Pgm></Pgm_Sel></Surr></Basic_Status></Main_Zone></YAMAHA_AV>
status: 200

I tried this in configuration.yaml but there is no entity appearing. I’m not sure if its the format, the value or otherwise.

sensor:
  - platform : rest
    resource: http://192.196.1.190/YamahaRemoteControl/ctrl
    method: POST
    payload: '<?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="GET"><Main_Zone><Volume><Lvl><Val>GetParam</Val></Lvl></Volume></Main_Zone></YAMAHA_AV>'
    scan_interval: 15
    name: "Main_Zone_Volume"
    value_template: '{{ value_json.YAMAHA_AV.Main_Zone.Basic_Status.Vol.Lvl.Val }}' 

I also have this in my Log - no mor edetail other than this a lot

[homeassistant.components.sensor] Setup of sensor platform rest is taking over 10 seconds.```