SmartThings Community

[RELEASE] Yamaha Network Receiver Basic Integration


(Mathew Shelby) #203

What line in the code is this? I am not finding the **log.debug "Refreshing Yamaha AVR entry in the code

(cjcharles) #204

Right you are, sorry! I think I must have tweaked my version of the device handler to see why it wasnt automatically polling.

You can put it after this line:
sendCommand("<YAMAHA_AV cmd=“GET”><Party_Mode>GetParam</Party_Mode></YAMAHA_AV>")

(search for Party_Mode and put it after the line which contains GetParam )

(Chris) #206

Is there any way to implement scene control for the receiver? My remote currently has BD-DVD, TV, NET and RADIO which I’ve mapped to switch everything to the correct input between my receiver and TV. It’d be great to be able to voice control receiver scene changes.

EDIT: Never mind! I found the appropriate commands, now I just need to work on integrating it.

(Robert Morgan) #207

Hello, thanks to @redloro for this, which is working and really great, thank you. I’ve got a couple of points:

  1. I wanted to use the current source in a webCoRE condition (don’t switch off if TV is playing etc), and also capture the current volume level into a variable. Those properties don’t seem to be available - the only thing webCoRE can see is switch ACTIVE/INACTIVE.

Would you expect me to be able to do this?

  1. There’s a problem some others mentioned where I think ST/webCoRE thinks the amp is off when it’s actually on, so does nothing. I can solve this by turning it Off then On, but Refresh doesn’t help. Shouldn’t Refresh do this?

  2. SmartThings think the Amp is a bulb, so it has brightness rather than volume. I saw someone else mention it, so I guess we’re stuck with that. Why’s that, out of interest?

I have a RX-675 amp, i.e. one of the older ones.


(Gene Clark) #208

Does this allow for playing SmartThings notifications through the speakers connected to receiver?

(Jonathon) #209

Just started playing with this last night. I have a Yamaha RX-779 and out of the box it does not play the smarthings notifications. I currently have webcore working with it so I might have it switch to a usb drive with notification or alarm sound.

(Gene Clark) #210

I’m hoping to find a stereo receiver where I can also play SmartThings announcements overlaying any music that might be playing.

(Peter Schultze) #211

Just bought a smart hub today - mostly for the water sensor. Really cool stuff. For an complete noob is this project do-able? I have a musiccast Yamaha Recvr and I’d love to control it with the app etc. but I haven’t ever built a new SmartApp or created a new device handler. I can find the unit on my router etc and get it’s IP address. My receiver is a RX-V579.

Addendum 3/1/2018 - ok this was a fantastic experience - was actually able to do this with no help but the excellent guidance in the first post. Thank you!

(Peter Schultze) #212

Older Vizio TV that I only can get to turn on when Yamaha Function “Scene 2” is pressed on remote.
Would there be an easy way to do “Scene 2” as a “source” ?

Appreciate any guidance on this.

(Peter Schultze) #213

Were you able to get Zone B working?

(Peter Schultze) #214

Were you able to get Scene control? Would help me a ton to be able to command TV Scene instead of TV.

(Chris) #215

I ended up not really needing it. I setup a Google Home shortcut that will power on both my TV (because I have a chromecast hooked up to it) and my receiver at the same time. I then used WebCORE attached to some routines so I can say things like “Switch to chromecast” or “switch to xbox one” and it’ll trigger the right input in the receiver smartapp.

That having been said, I did play around with trying to map one of the buttons to control a scene and more or less got it working. For instance, I commented out the Party Mode button and replaced it with this:

def partyModeOn() {
//sendCommand("<YAMAHA_AV cmd=“PUT”><Party_Mode>On</Party_Mode></YAMAHA_AV>")
sendCommand("<YAMAHA_AV cmd=“PUT”><Main_Zone><Scene_Sel>Scene 1</Scene_Sel></Main_Zone></YAMAHA_AV>")
//sendCommand("<YAMAHA_AV cmd=“PUT”><${getZone()}><Scene_Load>Scene 1</Scene_Load></${getZone()}></YAMAHA_AV>")
sendEvent(name: “partyMode”, value: “on”)

(Peter Schultze) #216

I’m using Smartthings and Alexa. Using the above app and device handler w smartthings I’m able to turn receiver on and off and control volume. My Zone B functionality does not work to turn on or off. Alexa, using musiccast, is much better but I can’t automate functions w/o smartthings.
I’d like to use smartthings to tell my Yamaha RX-V579 to 1)turn on /off zone B 2)pick a scene (since picking “TV SCENE” also turns on my “dumber” TV) 3)choose between 3 inputs. [I know that’s alot!]
I’m able to get all of my web controls {commands} for the receiver by typing: “
but alas I’m too inexperienced to know how to use that information in my smart app? or would it be the device handler?
Cool work you did using the Party mode button - was that all in your device handler?
Should I be learning WebCORE? Would that allow me to better control smartapps or edit device handlers?

addendum: I believe the Party mode changes you made were in the device handler. When I go to make changes in the device handler in IDE can I somehow keep the old work there so that if I screw it up I can go back to the previous iteration? Thanks for your trouble!

(Chris) #217


All the changes I made to the Party Mode code were done in the device handler. If you want to keep the old code just comment out each line with a “//” before it (without the quotes). My initial intent was to add a custom button (rather than replacing one, like I did with Party Mode), but I gave up on trying to figure that part out.

The nice thing about WebCORE is you can easily invoke all the underlying functions of a smartapp. You could easily create either a routine (like I did) or create a virtual switch. When you turn on the routine or switch with Alexa/Google Home, you can have a WebCore piston that essentially says “If switch turns on, then press this button for my Yamaha Receiver”.

I’m by no means an expert in any of this, nor am I familiar with the Alexa side of things, but I’ll do what I can to help. If someone has a more elegant solution, by all means let us know!

(Peter Schultze) #218

So by pressing “party mode” in the app you would get Scene 1. I’m trying to get Scene 2 (or maybe it’s “Scene TV” so I’ll try this. When you make device handler changes do you have to delete app and start again or do anything else or simply “save” and “publish - to me”?
I don’t have google home but would be interested in any other homemade apps/ Device handlers you used for the yamaha.

(Chris) #219

I didn’t have to delete the app. I just saved and published the changes to the device handler and everything updated fine. I think the scenes are just in numerical order, either starting at 0 or at 1, but you can just change it and test it in the app until it does what you’d prefer.

Other than that slight modification I haven’t done any other customizations to the code. I’ve used it as is and have made it work via voice how I’d like with WebCORE

(Peter Schultze) #220

Really cool work. Have had really good luck with this app except for getting Zone_B to turn on. Using Chris “ynksbsbll2” method to use the Party mode button in the app and have tried numerous iterations to have that be a direct Zone_B on / off switch.
I feel that:
sendCommand("<YAMAHA_AV cmd=“PUT”><Zone_B><Power_Control>On</Power_Control></Zone_B></YAMAHA_AV>")
should work but something about my syntax is wrong. Jazzed that I was able to get the Party mode button to do other things “mute” for example by copying and pasting.
How can I find out what exact command my musiccast app sends to turn on zone B of my RX-V579?

(Chris) #221


I don’t have a Zone B, but try this syntax:
sendCommand("<YAMAHA_AV cmd=\“PUT\”><Zone_B><Power_Control>On</Power_Control></Zone_B></YAMAHA_AV>")

Edit: It disappears when I type it, but there should be Power and /Power command around the “On” command. I suspect you already have it and it didn’t show up for you either.

(Peter Schultze) #222

Based on one of the threads above I wanted to see if I can succeed (getting Zone B to turn on using Http commands.
All of these commands work for me:

Would this info help anyone to help me switch Zone B on and off using this great app?
I could use party mode button or (better) I’d like to change the syntax of the DH to accomadate using either Zone B or Zone 2 the way it’s intended. Remember the app is switching main on and off without modification.

I’ve tried a LOT of combinations and I still can’t get zone B functionality from the app. (even with the above scripts) I have however learned some things - which is cool.

(Peter Schultze) #223

I have gotten Postman and would like to run tests to figure out my zone B syntax. Daunting program - any recs on how you figured out postman?

Chris - I tried numerous iterations of that and it still wouldn’t work with the party mode on button. :frowning: