grzegorz914 / homebridge-denon-tv

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

Inputs in scenes change on every update of the plugin. #115

Closed Jordenjj closed 2 years ago

Jordenjj commented 2 years ago

Hi Grzegorz, First of all thank you for your continuous effort on this wonderful plugin. I seem to have had an issue over the last few updates, where when I update through Homebridge UI all scenes shift to another plugin. This means that whenever I update I have to go through every scene to make sure my PS4 scene is still set to GAME and my TV scene is still set to STB.

grzegorz914 commented 2 years ago

Hmm, I have many scenes created and don’t observed this behavior.

Jordenjj commented 2 years ago

Still happening, what's interesting is: It always goes exactly one down in the inputs list in the scene. Anything I can do to give you more info?

rooi commented 2 years ago

Something similar seems to occur at my setup. When I turn on the tv using the HDMI remote it switches to the TV Audio input instead of the first input specified in the configuration file (which is Apple TV). The home app still, incorrectly, states that the Apple TV is chosen as input.

This is the output when turning on the TV: [10/22/2021, 20:11:38] [DenonTv] Device: 10.0.1.65 Marantz SR-6015 Main Zone, get Input successful, name: Apple TV, reference: TV [10/22/2021, 20:11:38] [DenonTv] Device: 10.0.1.65 Marantz SR-6015 Main Zone, get Power state successfull, state: ON

When I switch inputs using the home app, the following lines are added (notice that the Apple TV, reference: TV is changed to reference: SIMPLAY (it is connected to the MediaPlayer HDMI, so seems correct to me)

[10/22/2021, 20:17:16] [DenonTv] Device: 10.0.1.65 Marantz SR-6015 Main Zone, get Input successful, name: Apple TV, reference: TV [10/22/2021, 20:17:16] [DenonTv] Device: 10.0.1.65 Marantz SR-6015 Main Zone, get Power state successfull, state: ON [10/22/2021, 20:17:19] [DenonTv] Device: 10.0.1.65 Marantz SR-6015 Main Zone, set Input successful, name: Mac mini, reference: SI8K [10/22/2021, 20:17:23] [DenonTv] Device: 10.0.1.65 Marantz SR-6015 Main Zone, set Input successful, name: Apple TV, reference: SIMPLAY

In a previous version of 2-3 weeks ago, I unfortunately do not know which version specifically, it did work correctly. I did notice an undefined input in the home app, listed before/above the Apple TV. After another update, say 2 weeks ago, I noticed that the input dial was gone after (unfortunately I do not know which version specifically). A day after that you published a new update and the input list in the home app was back again, but without the previously undefined input.

I hope this helps somewhat in tackling the issue. I could post a debug log if it helps. If I can find the time, I may try to debug the code. Either way thanks you very much for sharing this plugin and the work put in with all the frequent updates, I hope this helps tackling this issue.

Roy

BTW: Im running on raspbian using an LG Oled with webos 3.5 (for in case there are some CEC issues causing this @Jordenjj what TV are you using?) This is my configuration: { "devices": [ { "name": "Marantz SR-6015", "host": "10.0.1.65", "port": "8080", "refreshInterval": 5, "zoneControl": 0, "volumeControl": 0, "masterPower": false, "masterVolume": false, "masterMute": false, "switchInfoMenu": false, "disableLogInfo": false, "inputs": [ { "name": "Apple TV", "reference": "MPLAY", "mode": "SI" }, { "name": "Mac mini", "reference": "8K", "mode": "SI" }, { "name": "Nintendo", "reference": "GAME", "mode": "SI" } ], "manufacturer": "Marantz", "modelName": "SR-6015", "serialNumber": "MBCL072172031" } ], "platform": "DenonTv" }

grzegorz914 commented 2 years ago

If You switch using HDMI CEC then the receiver switch to the input set from HDMI CEC, in most cases is TV Audio. It cannot be switched to Your first configured Input in HB Plugin. As I see in Your config the TV Audio input not exist. Please add it then after power ON TV using HDMI CEC the correct input will be displayed in Home app.

rooi commented 2 years ago

Thanks @grzegorz914 adding the TV Audio and remove/re-add the receiver fixes the inputs. The receiver still switches to TV Audio instead of the Apple TV, but that is probably a CEC issue which I can now solve using you plugin.

grzegorz914 commented 2 years ago

It will newer switch to first input on Your list if U enable it over HDMI CEC. The AVR receive command from HDMI CEC and switch it to the TV Audio and the plugin present correct actually selected Input on AVR. I have same issue here, my LG TV alway after power ON set the AVR to the TV Audio Input.