Custom Component: Yamaha (YNCA)

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:

I just want to say THANK YOU. This is a great Custom Integration as the Yamaha MusicCast integration doesn’t have options for enabling/disabling HDMI Out form the AVRs.

My setup is overly complex as all my sources actually start their HDMI run through a RX-A4A that goes to a 4K HDR TV using HDMI Out 1- while simultaneously using HDMI Out 2 to feed an older RX-A3060 that outputs to an older, less often used, 1080P non-HDR Projector with a 5.2.4 speaker setup (and even one more 1080P TV in a second Zone).

Even though it has no problem sending Dolby Atmos to the A3060 through that confusing mess my 4K Blu-Ray player craps itself if I try to send it DTS:X content when both HDMI Outs are enabled on the A4A. So for years I’ve been manually toggling one of the HDMI ports off…and forgetting to toggle it back on every time I used the Projector.

Now I can just automatically have this Integration disable the HDMI Out to the Main TV entirely every time I power on the A3060 to watch something on the Projector- and turn it back on when I’m finished.

Perfection.

1 Like

Not having any luck with this. I have 3 Yamaha receivers, 2 of which are listed as working and I’m pretty sure the other one should also.

However, when I try to add the integration, using network connection and enter the hostname of the device, it just produces error:-

“Failed to connect, check settings and make sure this is the only application connecting to the receiver with the YNCA protocol.”

I was using HomeBridge, but that’s all disconnected now.

Any suggestions as to why it cannot connect?

Finds it using IP address but not using (fully resolvable) hostname. When trying to add the integration, the entry box states address OR hostname.

Why is it unable to resolve the hostname?

Hard to tell. I don’t seem to have any debug logging that helps with diagnosing this :slightly_frowning_face: (I put a note on the todo list to improve that).

What do you enter in the hostname field?
It should just be the bare IP address or hostname e.g. “192.167.178.21”

Is HomeBridge also using the YNCA protocol? Do you have a link to it so I can compare?

And out of interest, which receiver are you trying?

Apparently I type too slow :slight_smile:

Good to hear it works with the IP address.

I added hostname on request a long time ago in October 2022 and it was confirmed working back then. Maybe something changed/broke? I don’t use it myself, but have not had other issues reported.

What kind hostname are you using?
An mDNS (so with .local) or a “real” one?

Also in what environment do you run Home Assistant?
HAOS/Core/Docker/Supervised

I have:-

RX-A3050
RX-V777
RX-A810

All 3 have those exact hostnames.
The first is not listed for this integration, but works, only if I use the IP address. The second one is listed and also works only with IP address.

The last one is listed as working, but fails with that error when using either IP address or hostname.

Hmm, weird I also have an RX-A810 and it works fine for me (with IP address)

I will see if I can setup a hostname for my receiver to do some further debugging.

Your response is super fast, so your typing is not an issue. :grinning:

I run my own DNS and those are the actual hostnames. There are some CNAMES, but same problem.

The A810 is in another building, but I can ping it perfectly. I’ll check tomorrow if the port has been changed.