[RELEASE] - Denon HEOS Integration

Haha. Didn’t even think of that!

OK...well, still didn't get any of the music sources working, but I was able to meet my wife's very exacting requirements by having RM use the Play Track command to hit an M3U playlist hosted on my NAS...so, coffee purchased! :slight_smile: :slight_smile:

1 Like

Thanks! Which streaming services are you interested in? I should have time to look at your Soundcloud error tomorrow.

@jon4 @gopher.ny I can confirm this is working in 147.

@dman2306 just upgraded and confirmed on my end too...thanks!

1 Like

I'm on a C5, v: 2.2.4.158

I'm just hanging at "Please wait while your HEOS account information is validated."
Log reflects only:
2020-12-10 10:27:33.407 am [debug]Discovering HEOS devices

Any ideas?

Anything in the logs for the device named Temp HEOS Account Verifier?

Nope I'm an idiot, receiver apparently needs to be on rather than powered but on standby. As soon as a booped the power switch it cleared that dialogue.

1 Like

Interesting. I actually didn’t know that. I only have speakers (which are always on) not a HEOS receiver. My poor X7200WA is too old to have HEOS

Hi dman. Thanks again for this work, really opens up some next level jaw dropping automations for me. One issue I'm curious about. When using Rm4 to send speech as part of a rule, do you get the full audio? I think I've tried all of the options (Playtext, text and restore, text and resume, speak text, etc. god knows what the difference is there!) but they can't seem to catch the first part of the audio. As in, when a rule triggers speech "commencing Netflix, enjoy the show" I just get "eh show" like it's not fast enough to play the text after parsing it. It seems to work better when using those same actions from the device manager and running them there manually, but as soon as I try a simple RM4 rule like If button 4 pressed-> play text xyz, I just get the last few syllables. Worst case scenario I'll change the text to "One Mississippi Commencing Netflix, enjoy the show" :joy:

Hmm so it works if you do it from the device page but not RM? I have seen it get cut off before, but it happened everywhere, not just RM. One thing that I did find that caused it is clear the queue on the device. This integration is supposed to auto-clear it but maybe it isn't?

To clear the queue, go to the phone app (this is based on iOS, might be different for Android) and click the bottom right tab for the Now Playing. In the top right is an icon that shows a music note and 3 lines. Click that. Then click the trash can icon.

Cleared queue, still seems to make no difference. Any idea how either the code, hubitat, or Denon, whichever is responsible, is interpreting the text entered or how I can build a delay into the text field itself? I think I've tried "........starting Netflix" and "______starting Netflix" without effect. Time is not of the essence as it takes a good 8 seconds for the projector screen to come down. Delaying the rule action makes no difference either. I suppose I could download a speech synthesis mp3 of the text and have Denon play that file instead. Which of the play text options should I be using? Any idea on why it might be getting cut off?

Like I said, the only have experienced this when the queue had a bunch of items in it. I'm not sure if I saw an answer, are you saying the problem only happens from RM, not the device page?

Pretty much all the play text options do the same thing under the covers (not really sure why HE has so many!)

Under the covers, the way the TTS works is Hubitat uses AWS Polly (a cloud based TTS service) to convert the text to speech. We get back an mp3 stream that gets hosted on a URL on HE, then we tell HEOS to play that URL. Because it uses Polly, I haven't tried this, but you should be able to use SSML. Supported SSML Tags - Amazon Polly - <break time="3s"/> would add a 3 second pause.

Interesting thought! I'll give that a shot. Indeed, device page manually entered text seems to fire fine, but in a rule it gets cut off by several words. Will see if that code works, that'd be a solid solution, or at least a reliable workaround

Weird. I will have to play with RM, I can't think of why it would behave differently. It should be doing the exact same thing. I don't really use RM but I'll try to setup some test cases and see if I can reproduce it here.

Just reporting back that indeed using the delay code as part of the text input field does delay. So now the rule "starts the speech" waits 3 seconds, and reads the full text. Weird workaround but works perfectly for my purposes, thanks!

Well I'm glad it works, still going to try to see if I can figure out what's going on!

Hi. New to this one, and wanting to migrate my 7 Heos device away from Logitech Harmony now onto Hubitat. Managed to install the App and Driver using Package Manager, and run the setup detection. Problem is, it only found about half of my devices... When I go back into the application itself to re-run detection it says password incorrect which it shouldn't because it just stored the one I entered to do the original partially successful detection. Have uninstalled a retried a couple of times. Am I doing something wrong?

Is there anything in the logs? Do the devices get detected by the HEOS app on your phone? Sometimes the device detection is a little flaky because the devices don’t always respond right away.

Denon Heos Integration gave:
app:2582021-04-12 17:16:16.288 debugDiscovering HEOS devices

app:2582021-04-12 17:14:12.013 debuginitializing

app:2582021-04-12 17:14:12.011 debugInstalled with settings: [heosPassword:"blank-blank", albumArtWidth:100, debugOutput:true, speakers:[192.168.1.41, 192.168.1.43, 192.168.1.42, 192.168.1.45, 192.168.1.47, 192.168.1.46], heosUsername:mtate@marcnet.net, albumArtHeight:100]

app:2582021-04-12 17:13:59.638 debugDiscovering HEOS devices

app:2582021-04-12 17:13:59.634 debugverifying 192.168.1.42

app:2582021-04-12 17:13:44.679 debugDiscovering HEOS devices

app:2582021-04-12 17:13:44.676 debugverifying 192.168.1.47

app:2582021-04-12 17:13:44.646 debugverifying 192.168.1.45

app:2582021-04-12 17:13:29.505 debugDiscovering HEOS devices

app:2582021-04-12 17:13:29.502 debugverifying 192.168.1.46

app:2582021-04-12 17:13:29.444 debugverifying 192.168.1.43

app:2582021-04-12 17:13:29.384 debugverifying 192.168.1.41

Temp HEOS identifier gave:

dev:2692021-04-12 17:13:29.243 debugConnecting to HEOS

dev:2692021-04-12 17:13:29.242 debuginitializing

dev:2692021-04-12 17:13:00.428 debugTelnet Message: [heos:[result:success, message:signed_in&un=mtate@marcnet.net, command:system/sign_in]]

dev:2692021-04-12 17:12:59.763 debugTelnet Message: [heos:[result:success, message:command under process&un=mtate@marcnet.net&pw="blank-blank", command:system/sign_in]]

dev:2692021-04-12 17:12:59.725 debugSending HEOS command: heos://system/sign_in?un=mtate@marcnet.net&pw="blank-blank"

dev:2692021-04-12 17:12:54.636 debugConnecting to HEOS

dev:2692021-04-12 17:12:54.630 debugverifying HEOS account

dev:2692021-04-12 17:12:53.861 debugInstalled with settings: [debugOutput:true]