[Withdrawn] Yamaha Network Receivers Basic Integration

As all I wanted was on/off status indication I ended up doing this in Node-Red (as I don't like setting up polling devices in Hubitat) and am dumping the result to a virtual switch via MakerAPI.

But thanks for the driver - it pointed me in the right direction!!!

I didn't realize that these receivers sent out UPNP messages. Their apps poll. Maybe I'll improve the drivers to subscribe to UPNP events assuming HE supports that. That would be neat.

I couldn't get mine to work with the upnp node connection type (it gave a null error on my receiver). I just poll it every 15s.

I just swung back around to this over the last couple of days and neither of my three receivers seem to be doing a UPNP broadcast when they turn on or off. I didn't find anything in searches for official documentation either. Maybe the UPNP messages are only for very specific receivers or for MusicCast events.

Either way, no changes to the drivers at this time to pick up on/off switch changes automatically. :frowning:

@codahq - Very nice work my man! Finally had it with my vast assortment of Denon crap AVR's. Beginning the move to the Yamaha's... Should-a-known better... my wife loves her FZ1 (moto) and frankly I can't blame her a solid performer without all the BS, this too seems to just work, not sure if it's device driver or the yamaha 'home automation' direction, but either way it's groovy baby and wanted to express my thanks for your work. Helping work through scene rule with pictures... above and beyond.!
:beer:
Had a weird setup issue with my zone 2 but it worked out in the end.

Was the setup issue caused by the multi-select zone preference in the receiver driver? If so, can't do anything about that. Talk to the HE devs about getting multi-select preferences officially supported in drivers.

I'm not sure it wasn't just me not being able to read or if the info wasn't there... I got the main device and "main zone"sub-device, but couldn't figure out how to 'make' the zone 2, random pecking drove me to the main driver and just change main to zone 2 and bing-bam-boom zone2 sub-device showed and operates well.

Okay, cools. Thanks for the thanks and thanks for the update!

Is there a way to set a sleep timer per zone automagically?
i.e. I'd like to add such for zone 2 in a RM.

I'm not exactly sure what you mean but let me take a stab.

Each zone shows up as a switch device in HE. Because of that you can have a rule in RM that watches for switch on and then does anything after that. It will only detect switch on if the zone is turned on from HE or HE polls the zone for updates though.

Nevermind... I'm dumb.

Nah, we're all learning and progressing together. Sounds like you got it sorted whatever it was. Good job!

1 Like

Appreciate the vote of confidence, but,... no I'm stupid.... i 'forgot' that hubitat is more than a dashboard interface! So of coarse I can tell HE to turn it off x min after it turns on. But I was looking at the Yamaha manual and saw "sleep timer" and thought 'how can I use that feature?'. Total target fixation. :scream:
I feel better now.:+1:

2 Likes

Nope, I'm still holding onto the vote of confidence. It takes time to learn any system. And sometimes holding onto wanting to use hardware features and coming at problems from a different direction is very valuable.

If I poll every 1 min, how much is that likely to slow down the hub/is that not recommended? I want faster polling in general because I have a rule that activates a Harmony "listen to music" activity if the receiver's source changes to Spotify

There is no recommended by HE for polling network devices and I won't give one either. It's every person for themself because what can be handled by each user's hub is dependent on what is already going on in the hub.

Myself, I have completely stayed away from polling. I would make sure that I was able to trigger the Spotify Harmony activity from HE with a switch or a scene or a rule or something and then in the same rule or triggering off the switch I would also change the input on the Yamaha.

For example, I have many virtual switches for different modes where my receivers are. When one of those switches changes to on (for example theater movie mode) the Yamaha turns on, switches to a certain input, the lights dim to 1% with 1500k color and the project turns on. When I turn that switch off the lights go to 99% at 2700k color, and the Yamaha and projector turn off. I never have to poll for the Yamaha's status because my "activity" (I realize it's not a Harmony activity but you can get these in HE) was triggered from HE. Make sense?

If you want to poll though, just start trying intervals and see how it goes.

Thanks but you misunderstood what I was trying to do.

Quite often, I use Spotify cast from my phone to play Spotify on my Yamaha receiver. When that happens, my Harmony remote isn't aware of that change so doesn't change the activity to the "Listen to Music" activity. So, my goal is to detect when the Yamaha receiver's source changes to Spotify and use that as a trigger in RM 4 to start the "Listen to Music" activity on my Harmony remote. That way, my Harmony remote would stay up to date.

The only way I can detect when the Yamaha receiver's source changes to Spotify is by polling. That's why I was asking the question. I've used it with 1 min polls all day today and haven't noticed performance worsening. I have a job to reboot my hub every other day so I think 1 minute works fine for me.

Thanks!

No, I get it. You want to perform an action some place else and poll for it to figure out it happened in HE on the Yamaha. I will in turn repeat the same thing I did before. I wouldn't poll for the result of anything I initiated anywhere regardless of where. Ask yourself if what you are doing makes sense. I don't think it does. You are willing to tap all over the Spotify app to start a stream but you wouldn't tap an additional 2 or 3 more times to a dashboard link and a switch to turn on a scene?

Turning on a scene with a dashboard link is one click to open the dashboard and 1 click to turn on the scene. I still wouldn't even do that.

I ask my phone (Google Assistant) to play music and then I immediately ask it one more simple phrase... "Turn on theater music mode" or "turn on whole home audio mode" or "turn on family room audio mode". It's literally five or six more words to ask a voice assistant to set a scene. And with multiple actions (because I use Google Home) I can say...

"Play music from [music source] on [destination] and turn on office music mode"

Then it starts the stream from Spotify or Google Play Music or YouTube Red and additionally turns on the Yamaha and sets it to the correct source.

Why don't you at least check to see if there is some kind of multicast LAN event when the Spotify stream starts from the Yamaha. In fact, redloro has another SmartThings app and device for MusicCast. Does anybody know what it does? I never used it.

I couldn't disagree with that logic more. I think the whole point of a home automation system is to automate things to minimize the amount of actions a user has to take. So it's hard for the right solution to be, do it manually if it's possible for it to be done automatically. I'd argue that's the whole point of rules existing.

Regardless, for me, a huge benefit of having a system like this is to simplify things for my family also. As such, I'm not trying to get them to develop new behavior. Rather, I try to get a solution around their behavior. This is one such case where I don't want them to have to bother about keeping the Logitech Harmony remote in sync but I'd like it kept in sync (using HE).

I don't want this to escalate. Before you add anything else it feels like you are adding to the requirements until I somehow eventually tell you that polling makes sense. You don't need to say anything else.

Every current home automation protocol has moved away from polling and every single modern notification service works on callbacks/observers. This is the release thread for a driver I created and since that (unfortunately) inherently places a responsibility on me to support the driver I will continue to enforce here that polling (anything) is not the recommended solution.

It doesn't matter what the point of a home automation system or anything is if you implement it incorrectly. You have your answer and you have sound advice that you are going to ignore.