Custom Component: Yamaha (YNCA)

This is a custom integration for Home Assistant to support Yamaha AV receivers with the YNCA protocol (serial and network connections). I made it because the protocol which is used by the standard Home Assistant yamaha integration was unstable with my receiver (it just stops working at some point and needs a receiver powercycle)

I used this integration for years over serial and now for a bit over network (moved HA server further away) which has also been working fine. The integration is Local Push so changes are instant.

The repo is available in HACS (search for YNCA) or can be installed manually

Excerpt from the README, check the Github link for the latest version and more details

Features

  • Full UI support for adding devices
  • Connect through serial cable, TCP/IP network or any URL handler supported by PySerial
  • Local Push, so updates are instant
  • Support for zones
  • Power on/off
  • Mute/Unmute
  • Volume control
    • Standard Home Assistant media player
    • Separate number entity with Volume in dB like on the receiver
  • Source selection
  • Source names are taken from receiver (if supported by receiver)
  • Soundmode selection
  • Control playback state (depends on source)
  • Provide metadata like artist, album, song (depends on source)
  • Activate scenes (like the buttons on the front)
  • Presets for radio or other sources
  • Send remote control commands
  • Several controllable settings (if supported by receiver):
    • CINEMA DSP 3D mode
    • Adaptive DRC
    • Compressed Music Enhancer
    • HDMI Out enable/disable
    • Initial volume
    • Max volume
    • Sleep timer
    • Surround Decoder
    • Pure Direct
    • Speaker bass/treble (default disabled)
    • Headphone bass/treble (default disabled)

Models

Unfortunately, Yamaha does not mention in the manuals if a model supports the YNCA protocol that this integration uses. The list of working models below is based on reports from users and info found on the internet.

Based on this info, it seems that receivers in the mentioned series from 2010 onwards are likely to work. So even if your model is not listed, just give it a try.

Series Models
AVANTAGE RX-A2A, RX-A4A, RX-A6A
RX-A660
RX-A700, RX-A710, RX-A720, RX-A740, RX-A750
RX-A800, RX-A810, RX-A820, RX-A830, RX-A840, RX-A850, RX-A870
RX-A1000, RX-A1010, RX-A1020, RX-A1030, RX-A1040
RX-A2000, RX-A2010, RX-A2020, RX-A2030, RX-A2040, RX-A2070
RX-A3000, RX-A3010, RX-A3020, RX-A3030, RX-A3040, RX-A3070, RX-A3080
RX-V RX-V475, RX-V477, RX-V481D, RX-V483
RX-V500D, RX-V573, RX-V575
RX-V671, RX-V673, RX-V675, RX-V677, RX-V679, RX-V681, RX-V685
RX-V771, RX-V773, RX-V775, RX-V777
RX-V867, RX-V871
RX-V1067, RX-V1071, RX-V1075, RX-V1077, RX-V1085
RX-V2067, RX-V2071, RX-V2075, RX-V2077
RX-V3067, RX-V3071, RX-V3075, RX-V3077
HTR HTR-6064 , HTR-4065, HTR-4071
TSR TSR-700, TSR-7850
Other CX-A5000, R-N500, RX-S600D

Hello.

I have added the integration within HACS, restarted HA, but when I go to the Home Assistant integrations menu, and press the Add button, I donā€™t see Yamaha (YNCA) in the list. Do I miss something?

Thanks.

Hmm, that should just work.

Maybe the browser is caching to good and you need to refresh the browser cache?
In most browsers this is done by reloading the dashboard with ctrl+F5 or holding the ctrl key while clicking the reload button of the browser.

If that does not help, please check the Home Assistant logs to see if there are any errors.

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?