Custom Component: Yamaha (YNCA)

Thanks. Ctrl+F5 worked.
I have an RX-V475, and the connection succeeded. Turning the receiver on and off, adjusting the volume, muting, all works. But there are four other entities that don’t do anything when I press the button beside them (see attached picture: BD/DVD, NET, RADIO, TV). Can I do something about that?
1
I admit that I am a beginner in HA and I did not managed to build a dashboard yet, so I am using the default one.

LE: after a restart the main dashboard refreshed and I have access to few more controls. So everything is OK. Thanks.

The buttons “Main:BD/DVD” etc… are the same as the Scene buttons on the front of your receiver.
Pressing the button in Home Assistant should do the same as pressing the real button on the front.

If the real buttons on the front do work, but the buttons provided by the integration do not, then please submit an issue at the link below and provide the requested info so I can try and see what is wrong.

I had the same issue. I was able to add it with the debug console open on Chrome (f12). By default this does not use any cache.

@Michel - thanks a lot for this integration! The “standard one” for my RX-V637 was practically useless. Your give me s omany options and (just installed) it works instantly (at least main functions now)!
Thank You!

1 Like

@Michel … great integration! So much better then the legacy Yamaha platform (YAML) or the MusicCast integration. I’m using your integration with an RX-V481 receiver and I do have one question. In the list of features “Hide unused inputs per zone” is mentioned. I used to use this with the Yamaha platform by using the “source_ignore” option. How can I hide sources/inputs with your integration?

Thanks,
Arjen

You can change integration settings by clicking the Configure button on the integration card
image

That will guide you through some screens for general settings and settings per zone. Note that you will have to go through the whole sequence. The last screen has a Submit button and after submitting the integration will reload with the new settings.

Thank you so much! I guess I could have seen this myself :blush:

1 Like

Hi @Michel Thanks very much for providing this integration! I’ve been using the yaml version with my Yamaha RX-V675 since I started using Home Assistant, and it’s ‘done the job’ - however I’ve only just come across this integration, so had to test it out. It looks MUCH more useful than what I have been using so far!

One question - I know there is an existing issue/question regarding the use of ‘idle’ rather than ‘on’ as a state, which after reading through, I understand the complexity. I was hoping to use this integration with the Ampli-panel-card like i do with my existing yaml Yamaha integration, however due to the status of the main zone no longer being ‘on’, but ‘idle’, the ampli panel card does not see the receiver as being on. Using the old integration, this is how it shows:

So I’m trying to think of a way around that, so I can still use this card - I’m going to have a look at the cards code to see if there is any scope for this.

Secondly, could you explain how the volume level works please? I notice that, for example, when my receiver volume is set at -47.5dB, the YNCA integration shows:

media_player.rx_v675_main = volume_level of 0.3402061855670103
number.rx_v675_main_volume = -47.5

Under my YNCA integration ‘Controls’ section, the top volume slider shows as 34 and the bottom volume slider shows -47.5dB

Again, this seems to prevent me from using the ampli-panel-card as I can only specify a media_player entity, which contains the 0.34… volume_level, as opposed to the correct -47.5 as provided in the number.rx_v675_main_volume entity.

Oddly, the yaml integration of my yamaha provides a different and incorrect volume level of volume_level: 0.525 for some strange reason! Hopefully I can remove that old integration and use the one you have provided instead, if I can figure out how to continue to use the card I want, or alternatively I might have to create or use a different card.

It has been a while since I looked into the On vs Idle situation and don’t recall the details. Maybe the card could get updated to see Idle as On? Or maybe the other way around is easier, Off and Standby are Off and the rest is On.

So for the volume…
Volume_level in Home Assistant mediaplayer is always from 0 to 1. For some reason they show it multiplied by 100 in the frontend card. So the 34 in your screenshot is the rounded value 0.34 of volume_level in the mediaplayer.

The Yamaha receivers have a volume range from -80.5dB to 16.5dB so this integration maps that full range onto the 0 to 1 range for the mediaplayer volume_level in Home Assistant. There is a small catch as some receivers support setting a MAXVOL value. If that is supported then the range from -80.5 to MAXVOL is scaled to the 0 to 1 range. Not sure if the RX-V675 has configurable MAXVOL.

The range from 0 to 1 in Home Assistant is hard to use as it is not the range the receiver shows and the conversion is not trivial. So recently I added the “Volume” number entity which exposes the volume in the dB unit so it is the same as shown by the receiver.

I am not entirely sure why there would be a mismatch in volume from the official Yamaha integration and Yamaha (YNCA). But from a quick look at the code I get the impression that it scales a range of -100dB to 0dB to the HA range of 0 to 1 (which seems incorrect, but works as long as you stay below 0dB). But that would explain why the HA integration value is different from the YNCA one.

1 Like

Thanks very much for the explanation, that’s really helpful. I’ll see what i can do in regards to the card and raise the question with the code owner. Thanks again for this integration!

Hello!
I just want to add ONLY the “POWER button” to the dashboard. How can I do this?

I can only select the whole medi-control

You can add a button card to the dashboard and select the mediaplayer entity. By default pressing the button will toggle the mediaplayer on/off. You can tweak the behavior by changing the Tap Action.

1 Like

Hi MIchel, thanx for the work you’ve put into this.
Do you know if it’s possible to use the Yamaha CRX-N560? It’s in my network but when I’mI try to access it at its IP-address the integration can’t connect.
greetz Johan

All known working devices are in RX, HTR or TSR model ranges, I never got a report that a device from the CRX model range works, also a quick search on the internet did not give any results.

So I think it is very unlikely it supports the YNCA protocol that this integration uses.

Is this integration local push or local polling?
I have a Denon receiver at the moment and it reacts to changes instantly. Will this component work as fast? For example, does the power state update instantly in Home Assistant?

Have to replace my Denon receiver as there’s a hardware issue and I am looking at an RX-V673

The integration is local push, changes are instant.

(I updated the intro to mention that now).

That’s amazing! I don’t like that it is not possible to disable the AirPlay, Spotify connect and such on my Yamaha receiver. That’s why I am thinking of using the serial connection to control the AVR instead. From what I understand this application does support serial control?
What type of adapter do I need to go from serial to Ethernet and being able to control it from my Home Assistant server on the same network?

I used to have my receiver connected with a serial cable to a USB-to-serial converter directly on the Raspberry Pi that ran Home Assistant at the time. Later I moved to a more powerful machine further away and switched to network since then. Never used a network-to-serial converter so can’t really recommend one.

Btw, the RX-V673 does not seem to have a serial port according to the manual, but it does have a network connection. Why not just use that?
The integration also supports network connection.

Yes, you are right about the RX-V673, but I am looking at a RX-A830 instead of the V673. And as I said, the reason is that I hate that devices that I don’t want to use will populate the AirPlay/Chromecast/DLNA/Spotify Connect without any options to turn it off.
That’s the reason I looked into serial communication, and I found an old post by you which pointed me in this direction:

Ah indeed, the RX-A830 seems to still have a serial connector.

I have a RX-A810 that I had through te serial for quite some years and that worked great. I would assume it is the same for the RX-A830.

Any network-to-serial adapter should work that offers a normal (TCP) socket connection. In the integration you can then just Network connection when setting up and put in the IP and Port of the network-to-serial adapter and it should work.
I did experiment at some point with ser-2-net on a Raspberry Pi, but it was a hassle to setup in my opnion.

The info for the serial cable and settings is in the screenshot below from the protocol specification found here xttps://www.sdu.se/pub/yamaha/yamaha-ynca-receivers-protocol.pdf (note that the site gives a certificate warning for some reason so I made the link not clickable in case it is fishy. Change the x at the beginning in h if you still want to visit)
image