grzegorz914 / homebridge-denon-tv

Homebridge plugin for Denon/Marantz AV Receivers, publish as independent external platform accessory.
MIT License
73 stars 15 forks source link

Apple TV Music + Denon AVR Scenes don't work for Apple TV in Sleep State #147

Closed Mr-Pitalo closed 2 years ago

Mr-Pitalo commented 2 years ago

Hi, my combination of Apple TV 4K/Apple Music + Denon AVR-X1500H doesn't play music on Scenes.

This only happens when the Apple TV is in sleep state.

The AVR does turn on, and sets itself to the right input, but the Apple TV doesn't wake.

I can tell it tries to play tho, as I always choose my bespoke Apple made "User's Apple Music Station (which is random), and every time I trigger the scene from sleep, the current song changes, although it is paused. I see this if I wake the Apple TV to see what is it doing.

If I run the scene while the Apple TV is awake, the music plays with no issues.

Seems as if it would select the playlist, but stops as it found no speakers connected (the AVR takes longer to turn on).

This wouldn't be so important if it weren't the only way to play music on home arrival with an automation, where same thing happens.

I know I can do a similar thing, by selecting the AVR as a direct HomeKit Speaker to play the music on arrival; but that's not ideal, as I then loose control to play music from the Apple TV, and need to change input again from Airplay to Apple TV.

Any suggestions?

Thanks

grzegorz914 commented 2 years ago

Its not plugin issue, check HDMI-CEC betwen AVR and Apple TV.

Mr-Pitalo commented 1 year ago

Hi grzegrz914,

I've noticed it works when triggering the scene to the official Denon device in Homekit, but it does it through the AirPlay input!

When using the Homebridge Denon device in Homekit with the standard HDMI input, no sound is received.

I checked again with this configuration, and yes, the Apple TV scene is playing music, it just doesn't reach the Denon because of the wrong input selected on the AVR, due to how the Apple automation works.

The Airplay input command is not listed in the technical documents I have with the standard ones: BD, TV, SAT/CBL, MPLAY, GAME, BT, etc...

Would you be so kind as to let me know which is the Airplay command I need to use as "reference" in the JSON configuration?

Thanks

grzegorz914 commented 1 year ago

Is on the choice list, NETWORK/AIRPLAY, reference: NET

Mr-Pitalo commented 1 year ago

Thanks.

I tried it and even enabled the Extra Input Tile, which says that if enabled can be used with automations… but with no success.

I can get the Denon to change to the HEOS/Network/AirPlay input, but AirPlay isn’t triggered on the device, despite the Apple TV playing, it just stays in HEOS.

With Homebridge, I’ve only managed to make it work by manually waking the Apple TV after the Arriving Home Scene is triggered which sets the Denon to its Apple TV HDMI input (this still would be my preferred option over AirPlay), but that is pointless as is not automated.

HDMI-CED is active on the AVR and Apple TV. The ATV turns on the AVR when the ATV is turned on, but not the other way around which is what I really need.

I’ve given up and will use the official Denon Homekit device just for this arriving home automation, and your Homebridge plugin all the other times.

Thanks so much for your help and time tho! :)

grzegorz914 commented 1 year ago

Apple TV have broken HDMI-CEE and always switch to its input, try disconnect HDMI cable from Apple TV and check again. In other case no need to create extra button, just add it to Inputs and use with automations,