[RELEASE] Yamaha Receiver On/Off

Very simple device handler to allow powering on/off and changing volume/mute for a Yamaha Receiver connected to the same LAN as your ST Hub.

Tested with an RX-V477, but probably works with any receiver listed here.

Device Handler and README are at smartthings-yamaha-receiver/devicetypes/davidn/yamaha-receiver.src at main · davidn/smartthings-y

1 Like

You may want to edit your GitHub installation instructions to point to https://account.smartthings.com instead of the graph.api URL or many users will find the code will not work for them as it will be loaded on an incorrect SHARD :slight_smile:

1 Like

Thanks, done!

1 Like

Awesome! Please add more functionality… and Zone 2 capability. We need a working version of this again. Thank you!!!

I have added support for different zones. It only supports one zone, but you can now choose the zone in the settings for the device. I only have one zone myself, so please test it out and let me know if it works! If it doesn’t, please share the output of the live logging when you try using it.

This is great! Got it added to my ActionTiles!

THANK YOU for working on this davidn! I just installed this and haven’t got a chance to test out the second zone yet because I am getting an error with Main Zone when I try to adjust the volume of the receiver from smartthings. The power functionality is working fine .

This is the error it is showing in live logging:

java.lang.NullPointerException: Cannot get property 'Main_Zone' on null object @line 127 (parse)

Any suggestions? Again, I really appreciate you working on this!

I have found and fixed several bugs, can you try again with the latest code?

For reference, the bugs I found were:

  1. if no zone was set, I would send invalid XML resulting in the above error for all requests
  2. I was sending invalid XML for set volume in particular, resulting in the above error changing volume regardless of zone setting
  3. I was doing percent->dB conversion wrong
  4. mute did not work
  5. The UI was always showing the volume as 0 because of a type error.

I’ll test with our RXA-730 and RXV-773 this week.

One suggestion, could you not use SSDP to find the device on the network and get the IP address/port setup that way?

SmartThings supports SSDP, or did in the past. Building the Service Manager — SmartThings Classic Developer Documentation

Both our Yamaha receivers that are on the LAN show up as “Personal Devices” under SmartThings, so it sees them likely via SSDP already.

@csstup, I appreciate all the testing it can get! I think you are correct that discovery is possible, and it’s probably the best user experience, however it’s likely a substantial bit of effort to develop/test so I probably won’t be able to do it any time soon. I’ve added a GitHub issue for it so I don’t forget.

SmartThings is going to get rid of groovy based apps in the next year-ish, so I’m probably going to have to prioritize rewriting for SmartThings Edge. This supports discovery too (although the documentation is pretty sparse at the moment) so it should still be possible.

@davidn This device handler stopped working for me a couple of days ago on both of my Yamaha receivers. I am wondering if anyone else is experiencing the same issue?

First of all, check that the receiver is still online (e.g. test using the yamaha android app).

But a more likely issue is that the IP address of the receiver has changed. This is not rare (in fact it cause the integration to stop working for me once, too) because of the way routers dynamically allocate IP addresses to devices on their network.

The ideal fix for this is for the integration to use discovery like @csstup suggests. I do hope to do that at some point, but right now I’m not devoting a lot of time to this project. A workaround is to make the router always assign the same IP address to the device (in the router admin this can be called “reserved IP” “fixed DHCP”, “static DHCP” or something like that).

Hi @davidn,

Yes, I should have thought of that. We had a power outage for several hours. When that happens, the router will reassign IPs which is exactly what happened.

I will try the static DHCP workaround… thank you for that suggestion!

BTW, this add-on helps me out a lot. I have nine logitech harmony hubs in my house that are integrated with smartthings. Three of those hubs have Yamaha receivers associated with them. For some reason, the IR Power on/off commands do not seem to be discreet for the Yamaha receivers. The only way I can get them to turn on/off properly and consistently is by using this device handler in conjunction with Harmony. I set the receivers in Harmony to have no power on/off commands then I use this DH to power them on/off instead.

I really appreciate the work you put into this. Thanks davidn!

1 Like

Earlier, you mentioned that you probably was going to rewrite for Smartthinfs Edge. You are my hero if you fix this :slight_smile:

Hi folks. I have migrated from smartthings to home-assisstsnt, for unrelated reasons. I no longer have a smartthings system to test on, nor do I need this myself. So apologies for leaving you, but I will not be doing further development here.