Yamaha Receiver (official intergration) works 1-2 times and then looses control. Update Problem

Hi petro,
the firmware on my avr is the latest, but wasnt changed for years. Im quite not sure if this can be a reason, because if I have here 2 identical installations and one is not working… There must something on the installation… But this getting more complicate if the installation is a fresh install like in my case :slight_smile:

Hey,
sounds like you have really the same problem? did you try the custom components from petros post?

I got my Yamaha v475 (old amp that doesn’t support Musiccast) opening NET Radio favourites again using HTTP Post Requests.
I had help from this GitHub - christianfl/av-receiver-docs: Documentation for remote controlling Yamaha AV-Receivers. They which showed you could capture the HTTP POST requests the Yamaha Android App is making when you navigate through the menus and load a NET Radio Station. using an app called MITMproxy. Then recreated the sequence of post requests that the app makes.

I ended up using a Node-Red flow to replicate the steps you do on the app

  1. Turn on Amp
  2. Switch to Net Radio
  3. Goto Bookmarks
  4. Goto Your bookmark folder name
  5. Select the bookmark you want

I hope this might help someone in the future. So I am leaving the node red flow here

[{"id":"01c738743d199034","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":2510,"y":4540,"wires":[["845971e20de6eb69"]]},{"id":"217d10470dea87a9","type":"change","z":"3d9125fd.0a2f6a","name":"Send turn on amp http request","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">   <Main_Zone>     <Power_Control>       <Power>On</Power>     </Power_Control>   </Main_Zone> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2270,"y":4540,"wires":[["01c738743d199034"]]},{"id":"75cdcf5d4d5029d2","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 2 (BBC Radio 4)","props":[{"p":"fav","v":"2","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":390,"y":4700,"wires":[["c28fef1b1b7c9287"]]},{"id":"845971e20de6eb69","type":"change","z":"3d9125fd.0a2f6a","name":"Send Switch input to NET Radio HTTP Request","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">     <Main_Zone>         <Input>             <Input_Sel>NET RADIO</Input_Sel>         </Input>     </Main_Zone> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2320,"y":4620,"wires":[["f6438f71a9fccd5c"]]},{"id":"f6438f71a9fccd5c","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":2590,"y":4620,"wires":[["ab106eecc3343e3c"]]},{"id":"ab106eecc3343e3c","type":"change","z":"3d9125fd.0a2f6a","name":"Get Menu List (doesnt work without this)","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"GET\">   <NET_RADIO>     <List_Info>GetParam</List_Info>   </NET_RADIO> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":4760,"wires":[["d7be3954e47fa148"]]},{"id":"d7be3954e47fa148","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1170,"y":4760,"wires":[["6269c9b6a5abb1ef","505102e8b5ac31d1"]]},{"id":"de2deb817000c8d4","type":"switch","z":"3d9125fd.0a2f6a","name":"<Menu_Layer> ?","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Menu_Layer>1</Menu_Layer>","vt":"str"},{"t":"cont","v":"<Menu_Layer>2</Menu_Layer>","vt":"str"},{"t":"cont","v":"<Menu_Layer>3</Menu_Layer>","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":1670,"y":4760,"wires":[["ac70beef4a3a5f70"],["ac70beef4a3a5f70"],["bf1c70f84d35e12f"]]},{"id":"6269c9b6a5abb1ef","type":"switch","z":"3d9125fd.0a2f6a","name":"Menu loaded yet?","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Menu_Status>Ready</Menu_Status>","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1450,"y":4760,"wires":[["de2deb817000c8d4"],["f2c48329dba73d7e"]]},{"id":"f2c48329dba73d7e","type":"delay","z":"3d9125fd.0a2f6a","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"x":880,"y":4840,"wires":[["ab106eecc3343e3c"]]},{"id":"ac70beef4a3a5f70","type":"change","z":"3d9125fd.0a2f6a","name":"Select line 1 of menu","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">   <NET_RADIO>     <List_Control>       <Direct_Sel>Line_1</Direct_Sel>     </List_Control>   </NET_RADIO> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2020,"y":4760,"wires":[["6dfcab8d82492401"]]},{"id":"6dfcab8d82492401","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":2530,"y":4760,"wires":[["ab106eecc3343e3c"]]},{"id":"64b3a1aa24f08ef4","type":"change","z":"3d9125fd.0a2f6a","name":"Get Amp Basic Status","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"GET\">   <Main_Zone>     <Basic_Status>GetParam</Basic_Status>   </Main_Zone> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1640,"y":4580,"wires":[["492253c7cb1c371d"]]},{"id":"492253c7cb1c371d","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1830,"y":4580,"wires":[["4da91384494de5ed","06c5b0fb2739bb75"]]},{"id":"4da91384494de5ed","type":"switch","z":"3d9125fd.0a2f6a","name":"Power on?","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Power>Standby</Power>","vt":"str"},{"t":"cont","v":"<Power>On</Power>","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":4580,"wires":[["217d10470dea87a9"],["845971e20de6eb69"]]},{"id":"83cde9e9b2258591","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 1 (BBC 6Music)","props":[{"p":"fav","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":390,"y":4660,"wires":[["c28fef1b1b7c9287"]]},{"id":"a6884f5f0979ce3e","type":"comment","z":"3d9125fd.0a2f6a","name":"Menu Select","info":"Menu 1 = Bookmarks, Locations, Genres etc\nMenu 2 = Name of your Bookmarks folder on ytuners.com\nMenu 3 = Favorites list\n\nI want Menu 1 \"Bookmarks\" > Menu 2 \"Bookmarks\" > Menu 3 \"fav 1\"\n\nSo for me it was option 1 on the first two menus and then menu 3 takes the msg.fav number to choose which one to play ","x":830,"y":4720,"wires":[]},{"id":"06c5b0fb2739bb75","type":"debug","z":"3d9125fd.0a2f6a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2050,"y":4500,"wires":[]},{"id":"505102e8b5ac31d1","type":"debug","z":"3d9125fd.0a2f6a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1370,"y":4840,"wires":[]},{"id":"9faa83187b512891","type":"template","z":"3d9125fd.0a2f6a","name":"Create URL from msg.ip","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"http://{{ip}}/YamahaRemoteControl/ctrl","output":"str","x":1070,"y":4580,"wires":[["45aa144ae3bc2ef8"]]},{"id":"c28fef1b1b7c9287","type":"change","z":"3d9125fd.0a2f6a","name":"Set IP of Yamaaha Amp","rules":[{"t":"set","p":"ip","pt":"msg","to":"192.168.86.36","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":4580,"wires":[["9faa83187b512891"]]},{"id":"f88e56a8aecf02b9","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 11","props":[{"p":"fav","v":"11","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":120,"y":4780,"wires":[["c28fef1b1b7c9287"]]},{"id":"3b0406169861725f","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 8","props":[{"p":"fav","v":"8","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":120,"y":4660,"wires":[["c28fef1b1b7c9287"]]},{"id":"d015ae1a6ed9dbdd","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 9","props":[{"p":"fav","v":"9","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":120,"y":4700,"wires":[["c28fef1b1b7c9287"]]},{"id":"0a773f73c6955273","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 10","props":[{"p":"fav","v":"10","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":123,"y":4736.4443359375,"wires":[["c28fef1b1b7c9287"]]},{"id":"8b99101fc7e07918","type":"template","z":"3d9125fd.0a2f6a","name":"Select Jump_Line from msg.fav","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">   <NET_RADIO>     <List_Control>       <Jump_Line>{{{Jump_Line}}}</Jump_Line>     </List_Control>   </NET_RADIO> </YAMAHA_AV>","output":"str","x":2330,"y":4820,"wires":[["6dfcab8d82492401"]]},{"id":"f6e1a9f7464d1fb3","type":"template","z":"3d9125fd.0a2f6a","name":"Select Direct_Sel line","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">   <NET_RADIO>     <List_Control>       <Direct_Sel>Line_{{{Direct_Sel}}}</Direct_Sel>     </List_Control>   </NET_RADIO> </YAMAHA_AV>","output":"str","x":2300,"y":4900,"wires":[["a0ccdbab23c8e101"]]},{"id":"a0ccdbab23c8e101","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":2490,"y":4900,"wires":[[]]},{"id":"45aa144ae3bc2ef8","type":"function","z":"3d9125fd.0a2f6a","name":"Work out which page the favorite is on ","func":"// if msg.fav is in first eight\nif (msg.fav >= 1 && msg.fav <= 8) {\n   msg.Jump_Line = 1\n   msg.Direct_Sel = msg.fav\n\n// if msg.fav is in 9-16   \n} else if (msg.fav >= 9 && msg.fav <= 16) {\n   msg.Jump_Line = 9\n   msg.Direct_Sel = msg.fav - 8\n\n// if msg.fav is 17-25\n} else if (msg.fav >= 17 && msg.fav <= 25) {\n   msg.Jump_Line = 17\n   msg.Direct_Sel = msg.fav - 16\n} \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1350,"y":4580,"wires":[["64b3a1aa24f08ef4"]]},{"id":"567e4a29075d916b","type":"switch","z":"3d9125fd.0a2f6a","name":"Current_Line = 9","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Current_Line>9</Current_Line>","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":4860,"wires":[["f6e1a9f7464d1fb3"],["8b99101fc7e07918"]]},{"id":"6e19fef074c8f189","type":"switch","z":"3d9125fd.0a2f6a","name":"Current_Line = 17","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Current_Line>17</Current_Line>","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":4900,"wires":[["8b99101fc7e07918"],["f6e1a9f7464d1fb3"]]},{"id":"dc706ed3ce386bae","type":"switch","z":"3d9125fd.0a2f6a","name":"Current_Line = 1","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Current_Line>1</Current_Line>","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":4820,"wires":[["f6e1a9f7464d1fb3"],["8b99101fc7e07918"]]},{"id":"bf1c70f84d35e12f","type":"switch","z":"3d9125fd.0a2f6a","name":"Msg.Jump_Line","property":"Jump_Line","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"17","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":1780,"y":4860,"wires":[["dc706ed3ce386bae"],["567e4a29075d916b"],["6e19fef074c8f189"]]},{"id":"c710b54ca8beccf4","type":"comment","z":"3d9125fd.0a2f6a","name":"Play 6music on Yamaha v475 amp - Using HTTP POST requests","info":"I was previously using the https://www.home-assistant.io/integrations/yamaha/ integration, and still do for everything apart from turning on the internet radio stations. It did work but I think it must have been updated to use the rest api that comes with more recent models. but the only bit that seemed to break was NET Radio\n\nwith that integration I used to be able to do all this with a service call that just contained...\n\n```\n'1550095734231':\n  alias: 'BBC 6Music on HiFi '\n  sequence:\n  - data:\n      entity_id: media_player.yamaha_rx_v475\n    service: media_player.turn_on\n  - data:\n      entity_id: media_player.yamaha_rx_v475\n      media_content_id: Bookmarks>Bookmarks>BBC Radio 6 Music\n      media_content_type: NET RADIO\n    service: media_player.play_media\n```\n","x":270,"y":4360,"wires":[]}]

P.S. @pLeX I tried the custom component but it didn’t work for me unfortunately

EDIT (23-08-21): Updated Node-red flow to work with more than eight favorite bookmarks

I am joining in on this topic.
Having the same exact problem with my scripts and being stuck on the “Bookmarks folder” since some versions.
I think this was working before it was necessary to supply the “Content type” in the play media command:

this is my non-functional script that has been working for several years until now :frowning:

alias: Yamaha SWR1
sequence:
  - service: media_player.turn_on
    data:
      entity_id: media_player.yamaha_receiver
  - service: media_player.volume_set
    data:
      volume_level: 0.44
    target:
      entity_id: media_player.yamaha_receiver
  - service: media_player.select_source
    data:
      source: NET RADIO
    target:
      entity_id: media_player.yamaha_receiver
  - service: media_player.play_media
    data:
      media_content_id: Lesezeichen>Radio>SWR1 Baden-Württemberg
      media_content_type: music
    target:
      entity_id: media_player.yamaha_receiver
mode: single

i also tried media_content_type: NET RADIO without any luck…

Hello @c_wolsey your script works fine, only in my case you can add 8 radio stations, more does not work for you?from what I noticed when connecting yamahe to tv in the judge only 8 stations are displayed on the screen, to select items, e.g. 9, you need to take a down arrow, then it is like another station displayed with your favorite stations, i.e. station, e.g. xxx from your favorites from page 1 works, but the favorite station on position 9 becomes position 1, now the question is how to properly handle the next pages with favorite stations and not only 8 from 1 page?

You are correct it does seam like anything above fav 8 needs more commands I will see if I can work it out tonight and get back to you

I think I have fixed the node red flow to allow you to recall more than eight favourite bookmarks.

@djmalin you try again with this flow?

[{"id":"01c738743d199034","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":2510,"y":4540,"wires":[["845971e20de6eb69"]]},{"id":"217d10470dea87a9","type":"change","z":"3d9125fd.0a2f6a","name":"Send turn on amp http request","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">   <Main_Zone>     <Power_Control>       <Power>On</Power>     </Power_Control>   </Main_Zone> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2270,"y":4540,"wires":[["01c738743d199034"]]},{"id":"75cdcf5d4d5029d2","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 2 (BBC Radio 4)","props":[{"p":"fav","v":"2","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":390,"y":4700,"wires":[["c28fef1b1b7c9287"]]},{"id":"845971e20de6eb69","type":"change","z":"3d9125fd.0a2f6a","name":"Send Switch input to NET Radio HTTP Request","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">     <Main_Zone>         <Input>             <Input_Sel>NET RADIO</Input_Sel>         </Input>     </Main_Zone> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2320,"y":4620,"wires":[["f6438f71a9fccd5c"]]},{"id":"f6438f71a9fccd5c","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":2590,"y":4620,"wires":[["ab106eecc3343e3c"]]},{"id":"ab106eecc3343e3c","type":"change","z":"3d9125fd.0a2f6a","name":"Get Menu List (doesnt work without this)","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"GET\">   <NET_RADIO>     <List_Info>GetParam</List_Info>   </NET_RADIO> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":4760,"wires":[["d7be3954e47fa148"]]},{"id":"d7be3954e47fa148","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1170,"y":4760,"wires":[["6269c9b6a5abb1ef","505102e8b5ac31d1"]]},{"id":"de2deb817000c8d4","type":"switch","z":"3d9125fd.0a2f6a","name":"<Menu_Layer> ?","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Menu_Layer>1</Menu_Layer>","vt":"str"},{"t":"cont","v":"<Menu_Layer>2</Menu_Layer>","vt":"str"},{"t":"cont","v":"<Menu_Layer>3</Menu_Layer>","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":1670,"y":4760,"wires":[["ac70beef4a3a5f70"],["ac70beef4a3a5f70"],["bf1c70f84d35e12f"]]},{"id":"6269c9b6a5abb1ef","type":"switch","z":"3d9125fd.0a2f6a","name":"Menu loaded yet?","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Menu_Status>Ready</Menu_Status>","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1450,"y":4760,"wires":[["de2deb817000c8d4"],["f2c48329dba73d7e"]]},{"id":"f2c48329dba73d7e","type":"delay","z":"3d9125fd.0a2f6a","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"x":880,"y":4840,"wires":[["ab106eecc3343e3c"]]},{"id":"ac70beef4a3a5f70","type":"change","z":"3d9125fd.0a2f6a","name":"Select line 1 of menu","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">   <NET_RADIO>     <List_Control>       <Direct_Sel>Line_1</Direct_Sel>     </List_Control>   </NET_RADIO> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2020,"y":4760,"wires":[["6dfcab8d82492401"]]},{"id":"6dfcab8d82492401","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":2530,"y":4760,"wires":[["ab106eecc3343e3c"]]},{"id":"64b3a1aa24f08ef4","type":"change","z":"3d9125fd.0a2f6a","name":"Get Amp Basic Status","rules":[{"t":"set","p":"payload","pt":"msg","to":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"GET\">   <Main_Zone>     <Basic_Status>GetParam</Basic_Status>   </Main_Zone> </YAMAHA_AV>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1640,"y":4580,"wires":[["492253c7cb1c371d"]]},{"id":"492253c7cb1c371d","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1830,"y":4580,"wires":[["4da91384494de5ed","06c5b0fb2739bb75"]]},{"id":"4da91384494de5ed","type":"switch","z":"3d9125fd.0a2f6a","name":"Power on?","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Power>Standby</Power>","vt":"str"},{"t":"cont","v":"<Power>On</Power>","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":4580,"wires":[["217d10470dea87a9"],["845971e20de6eb69"]]},{"id":"83cde9e9b2258591","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 1 (BBC 6Music)","props":[{"p":"fav","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":390,"y":4660,"wires":[["c28fef1b1b7c9287"]]},{"id":"a6884f5f0979ce3e","type":"comment","z":"3d9125fd.0a2f6a","name":"Menu Select","info":"Menu 1 = Bookmarks, Locations, Genres etc\nMenu 2 = Name of your Bookmarks folder on ytuners.com\nMenu 3 = Favorites list\n\nI want Menu 1 \"Bookmarks\" > Menu 2 \"Bookmarks\" > Menu 3 \"fav 1\"\n\nSo for me it was option 1 on the first two menus and then menu 3 takes the msg.fav number to choose which one to play ","x":830,"y":4720,"wires":[]},{"id":"06c5b0fb2739bb75","type":"debug","z":"3d9125fd.0a2f6a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2050,"y":4500,"wires":[]},{"id":"505102e8b5ac31d1","type":"debug","z":"3d9125fd.0a2f6a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1370,"y":4840,"wires":[]},{"id":"9faa83187b512891","type":"template","z":"3d9125fd.0a2f6a","name":"Create URL from msg.ip","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"http://{{ip}}/YamahaRemoteControl/ctrl","output":"str","x":1070,"y":4580,"wires":[["45aa144ae3bc2ef8"]]},{"id":"c28fef1b1b7c9287","type":"change","z":"3d9125fd.0a2f6a","name":"Set IP of Yamaaha Amp","rules":[{"t":"set","p":"ip","pt":"msg","to":"192.168.86.36","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":4580,"wires":[["9faa83187b512891"]]},{"id":"f88e56a8aecf02b9","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 11","props":[{"p":"fav","v":"11","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":120,"y":4780,"wires":[["c28fef1b1b7c9287"]]},{"id":"3b0406169861725f","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 8","props":[{"p":"fav","v":"8","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":120,"y":4660,"wires":[["c28fef1b1b7c9287"]]},{"id":"d015ae1a6ed9dbdd","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 9","props":[{"p":"fav","v":"9","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":120,"y":4700,"wires":[["c28fef1b1b7c9287"]]},{"id":"0a773f73c6955273","type":"inject","z":"3d9125fd.0a2f6a","name":"Favorite 10","props":[{"p":"fav","v":"10","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":123,"y":4736.4443359375,"wires":[["c28fef1b1b7c9287"]]},{"id":"8b99101fc7e07918","type":"template","z":"3d9125fd.0a2f6a","name":"Select Jump_Line from msg.fav","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">   <NET_RADIO>     <List_Control>       <Jump_Line>{{{Jump_Line}}}</Jump_Line>     </List_Control>   </NET_RADIO> </YAMAHA_AV>","output":"str","x":2330,"y":4820,"wires":[["6dfcab8d82492401"]]},{"id":"f6e1a9f7464d1fb3","type":"template","z":"3d9125fd.0a2f6a","name":"Select Direct_Sel line","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <YAMAHA_AV cmd=\"PUT\">   <NET_RADIO>     <List_Control>       <Direct_Sel>Line_{{{Direct_Sel}}}</Direct_Sel>     </List_Control>   </NET_RADIO> </YAMAHA_AV>","output":"str","x":2300,"y":4900,"wires":[["a0ccdbab23c8e101"]]},{"id":"a0ccdbab23c8e101","type":"http request","z":"3d9125fd.0a2f6a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":2490,"y":4900,"wires":[[]]},{"id":"45aa144ae3bc2ef8","type":"function","z":"3d9125fd.0a2f6a","name":"Work out which page the favorite is on ","func":"// if msg.fav is in first eight\nif (msg.fav >= 1 && msg.fav <= 8) {\n   msg.Jump_Line = 1\n   msg.Direct_Sel = msg.fav\n\n// if msg.fav is in 9-16   \n} else if (msg.fav >= 9 && msg.fav <= 16) {\n   msg.Jump_Line = 9\n   msg.Direct_Sel = msg.fav - 8\n\n// if msg.fav is 17-25\n} else if (msg.fav >= 17 && msg.fav <= 25) {\n   msg.Jump_Line = 17\n   msg.Direct_Sel = msg.fav - 16\n} \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1350,"y":4580,"wires":[["64b3a1aa24f08ef4"]]},{"id":"567e4a29075d916b","type":"switch","z":"3d9125fd.0a2f6a","name":"Current_Line = 9","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Current_Line>9</Current_Line>","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":4860,"wires":[["f6e1a9f7464d1fb3"],["8b99101fc7e07918"]]},{"id":"6e19fef074c8f189","type":"switch","z":"3d9125fd.0a2f6a","name":"Current_Line = 17","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Current_Line>17</Current_Line>","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":4900,"wires":[["8b99101fc7e07918"],["f6e1a9f7464d1fb3"]]},{"id":"dc706ed3ce386bae","type":"switch","z":"3d9125fd.0a2f6a","name":"Current_Line = 1","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Current_Line>1</Current_Line>","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":4820,"wires":[["f6e1a9f7464d1fb3"],["8b99101fc7e07918"]]},{"id":"bf1c70f84d35e12f","type":"switch","z":"3d9125fd.0a2f6a","name":"Msg.Jump_Line","property":"Jump_Line","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"17","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":1780,"y":4860,"wires":[["dc706ed3ce386bae"],["567e4a29075d916b"],["6e19fef074c8f189"]]},{"id":"c710b54ca8beccf4","type":"comment","z":"3d9125fd.0a2f6a","name":"Play 6music on Yamaha v475 amp - Using HTTP POST requests","info":"I was previously using the https://www.home-assistant.io/integrations/yamaha/ integration, and still do for everything apart from turning on the internet radio stations. It did work but I think it must have been updated to use the rest api that comes with more recent models. but the only bit that seemed to break was NET Radio\n\nwith that integration I used to be able to do all this with a service call that just contained...\n\n```\n'1550095734231':\n  alias: 'BBC 6Music on HiFi '\n  sequence:\n  - data:\n      entity_id: media_player.yamaha_rx_v475\n    service: media_player.turn_on\n  - data:\n      entity_id: media_player.yamaha_rx_v475\n      media_content_id: Bookmarks>Bookmarks>BBC Radio 6 Music\n      media_content_type: NET RADIO\n    service: media_player.play_media\n```\n","x":270,"y":4360,"wires":[]}]

as you said I needed to goto the next page of bookmarks. It should work upto 25 favourite bookmarks. I have tested upto 11 which is how many I have.

1 Like

@c_wolsey this improved script works great, thank you very much for your help and best regards :handshake: :beers:

2 Likes

Hello @c_wolsey i have a question, how else is a button to open a given station in any lovelance tab? I tried the switch but something did not work

What I do is have an empty script in home assistant that does nothing. Then in node red have a state node pointing to the script (if state “on”). Then a change node in node red that sets the msg.fav for the favourite bookmark that you would like to recall.

You can then add the script as a button in Lovelace and when it is triggered it will trigger the node red flow. :+1:

same thing here, did you find a solution?

Unfortunately not. There is a github issue, but nobody seems to work on this issue (yet)

it’s malformatted xml from the receiver. The issue should be written up against rxv, not home assistant core.

That issue would be like asking google to fix Philips hue’s app. The responsibility is on the hue side, not google side. Same goes for this error. The responsibility is on the referenced library, not home assistant.

Also, another unfortunate truth behind this is: A dev of rxv needs to replicate the issue. I’ve personally delivered changes to rxv in the past and would be willing to do the work, however I can’t replicate the issue as my rxv receiver does not have the issue. So, you need to wait for someone with python skills and the error to pop into that library and offer up a PR to fix the issue.

You can follow the RXV issue listed here:

For me the yamaha integration and net radio is now working again. The custom integration from wuub on github was changed! The new version is not working for me. But there was a other version with a different modification date from may:

This old version is working fine for me. I couldnt find the old version on github, so Ive decided to zip these files and uploaded here: https://easyupload.io/ojtr9f

i believe this will make it in one of the next releases of home assistant:

@pLeX Thanks for sharing.
I downloaded it and put it into custom integrations?!
Was that wrong? Do you have to overwrite the current integration (where?

Hi blautob,
youre welcome! You have to put these files to the config\custom_components\yamaha folder:

image

Ive also an entry on the configuration.yaml:

media_player:
  - platform: yamaha

This is the configuration which is still working for me. Im currently on core-2021.9.7. I know its not the latest released, but at the moment the home assistant crew is releasing to fast for me :smiley:

thanks! I have good news. the new rxv made it into the nov release. works like a charm for me :slight_smile:

Broken again. Issue already opened and closed:

and may have created duplicate entries (did for me)

check the states tab in the developer tools. The orphaned original instance needs to be deleted. Restart Home assistant and everything is fine again.