Custom Component: Yamaha (YNCA)

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

Just for info, I can confirm that this works with the RX-A3080 as well (it’s not on the list) but I don’t have scene control as in, I can’t send a command to tell the amp to change to a particular scene. It’s a pain though, not a problem as that’s about the only reason I have an IR blaster now. :wink:

Thanks for the update, I added it to the list.

For the scenes, did you try the workaround as mentioned in the Q&A section of the readme?

Basically you use the Remote entity offered by the integration to send the command to activate a scene instead of using the scene buttons offered by the integration (or maybe the buttons do not show if your receiver does not indicate support).

An example service call looks like the one below, just change the entity name.
You can call this from automations, buttons or many other ways in Home Assistant.
Check the readme for more details.

service: remote.send_command
data:
  command: scene_1
target:
  entity_id: remote.rx_a810_main_remote

No problem and thanks, I did see that but not before I found a way around it to do what I needed without having to mess with the code.

Prety much, the coponent as is can do everything I need it to so I’m more than happy with that and appreciate the effort put into it.

Just for the record, you don’t have to use the yaml code. You can also configure it through the frontend. It is just that the yaml code is easier to copy-paste :slight_smile:

For example you could build buttons like below by adding a button card per button and configure it as shown in the screenshots. Configuring it from automations is basically the same. You select the “Remote: Send sommand” action and you get the same options.

But if your current solutions works for you that is also fine. Home Assistant is all about options.
Just wanted to make clear it is not required to use yaml.

image


Thanks for that and, in some regards, that might be better for when I finally get time (after sorting out a truckload of things) to build a proper dashboard as opposded to my current “just make it work” effort! :wink: