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

Input selector jumps to top #181

Closed badgertastic closed 1 year ago

badgertastic commented 1 year ago

https://github.com/grzegorz914/homebridge-denon-tv/issues/170#issue-1581224656 Is back

grzegorz914 commented 1 year ago

Can you post the debug during switch input?

badgertastic commented 1 year ago

I switched from radio 1 to radio 2. Switched AVR ok, but then the input selected jumped back and displayed radio 1 (radio 2 still playing).

[2/23/2023, 6:04:52 PM] [Homebridge UI] Homebridge log truncated by admin. [2/23/2023, 6:04:52 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:04:56 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Input, Name: BBC Radio 1, Reference: SMART1 [2/23/2023, 6:04:56 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Power: ON [2/23/2023, 6:04:57 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:05:01 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, set Input, Name: BBC Radio 2, Reference: SMART2 [2/23/2023, 6:05:02 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:05:06 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Power: ON [2/23/2023, 6:05:06 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Input, Name: BBC Radio 1, Reference: SMART1 [2/23/2023, 6:05:07 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:05:12 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:05:17 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] }

badgertastic commented 1 year ago

[2/23/2023, 6:04:52 PM] [Homebridge UI] Homebridge log truncated by admin. [2/23/2023, 6:04:52 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:04:56 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Input, Name: BBC Radio 1, Reference: SMART1 [2/23/2023, 6:04:56 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Power: ON [2/23/2023, 6:04:57 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:05:01 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, set Input, Name: BBC Radio 2, Reference: SMART2 [2/23/2023, 6:05:02 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:05:06 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Power: ON [2/23/2023, 6:05:06 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Input, Name: BBC Radio 1, Reference: SMART1 [2/23/2023, 6:05:07 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:05:12 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] } [2/23/2023, 6:05:17 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, debug: State: { "Power": [ { "value": [ "ON" ] } ], "InputFuncSelect": [ { "value": [ "NET" ] } ], "VolumeDisplay": [ { "value": [ "Relative" ] } ], "MasterVolume": [ { "value": [ "-40" ] } ], "Mute": [ { "value": [ "off" ] } ] }

badgertastic commented 1 year ago

Video

grzegorz914 commented 1 year ago

As You see Smart 1 and Smart 2 report from AVR sameInput reference NET, so the reported state is correct and the wheel spring to the input with reference NET.

badgertastic commented 1 year ago

All inputs are Smart selects. Yes each smart select triggers an internet radio, but Different stations. inputs used to stay on selected one. Don’t anymore. Cheers

grzegorz914 commented 1 year ago

You are wrong, smart select are just programmable buttons not input itself and AVR report this as NET. How we can know on which input is AVR. The Smart buttons do not report this just switch AVR to NET and change station internally.

badgertastic commented 1 year ago

So you have no way to check which smart select is active?

grzegorz914 commented 1 year ago

No, the AVR not report this.

badgertastic commented 1 year ago

Ok, so assume then that before (when I thought was working) it was just leaving input on HomeKit selector on last selected one, and never rechecking AVR (like fire and forget) ? Maybe?

Any suggestion on how to trigger different radio stations? With ‘favourites’ somehow?

Cheers

grzegorz914 commented 1 year ago

You can create buttons with Tuner Presets Memory 0 to 5,

badgertastic commented 1 year ago

I've rolled back to 3.20.3, as looks like input behaviour changed in 3.21.

Working again as I'm used to. It's important to me as I have input state based automations/shortcuts -- changing scenes based on station playing.

I'll look at other options when have more time. cheers

grzegorz914 commented 1 year ago

Try 3.25.22-beta.2 and let me know

badgertastic commented 1 year ago

You can create buttons with Tuner Presets Memory 0 to 5,

Tuner Presets are only available to select as button on Main Zone, yet my 'Bathroom' is Zone 3.

And those are FM/analogue tuner presets, yet I'm trying to use NET (TuneIn internet radio) HEOS favourites.

Seems I'm stuck unless can somehow interact with HEOS directly.

Or would there be a way to expose those Tuner Presets Memory on Zone 3? AVR is capable right (SR8012). I think BBC streams are ceasing on TuneIn this year anyway so could be an option.

Cheers

badgertastic commented 1 year ago

Try 3.25.22-beta.2 and let me know

will try and let you know tomoz. thanks.

grzegorz914 commented 1 year ago

Warning!!! - after update to 4.x.x the properties buttonsMainZone, buttonsZone2 and buttonsZone3 are changed to buttons. The inputs.displayType and surrounds.displayType properties are removed.

Changes

v4.x.x-beta.4 available to test.

badgertastic commented 1 year ago

Try 3.25.22-beta.2 and let me know

Excellent, thanks! It's reinstated the input switching behaviour I'm used to on 3.20.3.

v4.x.x-beta.4 available to test

Will it help my issue? Is the release stable? Thanks again.

grzegorz914 commented 1 year ago

Yes, actually beta.21 here You can create all possible functions for all zones as buttons.

grzegorz914 commented 1 year ago

latest changes

Changes

badgertastic commented 1 year ago

installed v4.0.0-beta.21, created some buttons for smart select, and grouped them as single tile with zone 3 device. In case the operate any differently from the input selector UI.

Will give it a good workout over weekend, cheers.

Quick question, I guess it's probably an Apple/HomeKit issue, but all buttons default to the name of the zone device. Is it possible for the names to come from homebridge? Changing them in Home app is really odd/slow/funky/hit-and-miss :D

grzegorz914 commented 1 year ago

Regarding name of the buttons is HomeKit issue but you can change it ease deleted its name and set new looking on the placeholder.

grzegorz914 commented 1 year ago

@badgertastic can you enable debug in plugin config advanced section and post complete debug log please?

badgertastic commented 1 year ago

Regarding name of the buttons is HomeKit issue but you can change it ease deleted its name and set new looking on the placeholder.

for me I have to change it like 3-4 times before it will stick

can you enable debug in plugin config advanced section and post complete debug log please?

here

grzegorz914 commented 1 year ago

One question, if you use as reference SMART1 then is switch to Smart Select 1 or not?

grzegorz914 commented 1 year ago

After You change the name need little wait, after few seconds the name will be updated. The problem occurred since iOS16 and no auto solution Yet.

badgertastic commented 1 year ago

One question, if you use as reference SMART1 then is switch to Smart Select 1 or not?

Switching between Smart Selects is working as expected in 4 beta 21 and also 4.0.1, thanks.

Config:

"inputs": [
                {
                    "name": "BBC Radio 1",
                    "reference": "SMART1",
                    "mode": "MS"
                },
                {
                    "name": "BBC Radio 2",
                    "reference": "SMART2",
                    "mode": "MS"
                },
                {
                    "name": "BBC Radio 6",
                    "reference": "SMART3",
                    "mode": "MS"
                },
                {
                    "name": "BBC 3CR",
                    "reference": "SMART4",
                    "mode": "MS"
                }
            ],

Input selector stays on last selected input ok. And JFYI, I removed the Smart Select buttons for same use case, as they didn't seem to add anything.

One nice-to-have enhancement (if you're bored ;) ) would be if a button action fails as the receiver is off, to retry maybe a couple of times at say 5 second intervals. Example, I see in logs:

[2/27/2023, 2:36:07 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, set Button error: power OFF, send command skipped.

This is when I try to turn on Z3STBY2H using HomeKit shortcut automation and receiver is still powering on. Can't seem to get it to wait despite using 'wait' command in the shortcut. Probably another Apple bug. Cheers.

<do some stuff, including setting scene with AVR power on>
Wait 5
Set 2hr Standby
        "buttons": [
            {
                "name": "2hr Standby",
                "reference": "Z3STBY2H",
                "displayType": 1
            },
grzegorz914 commented 1 year ago

One nice-to-have enhancement (if you're bored ;) ) would be if a button action fails as the receiver is off, to retry maybe a couple of times at say 5 second intervals. Example, I see in logs:

try 4.0.2-beta and let me know

badgertastic commented 1 year ago

There's no log entries for button presses, so had to physically watch the AVR display...

There's no error now, but unfortunately the Z3STBY2H is not activated either (button press just 1sec or so after AVR Z3 on command sent)

grzegorz914 commented 1 year ago

In which zone you created the button? during set Z3STBY2H command was the Zone 3 ON or OFF?,

grzegorz914 commented 1 year ago

try.49 need to be working as you want

badgertastic commented 1 year ago

In which zone you created the button? during set Z3STBY2H command was the Zone 3 ON or OFF?,

Z3

during set Z3STBY2H command was the Zone 3 ON or OFF?

button press just 1sec or so after AVR Z3 on command sent Edit: the power on, including circuit protection checks etc) take 3-4 secs. So it was 'powering on' I guess.

try.49 need to be working as you want

trying..

badgertastic commented 1 year ago

I think it's working as requested. It will turn on Z3STBY2H when AVR Z3 is starting (even during the circuit protection period between on command and audible music). Confirmed by AVR front display.

But I've since changed button to use the Sleep 60m function Z3SLP060 -- I only just realised there are separate functions and sleep is what I really want. Z3STBY2H is always on permanently now.

What's confusing for testing is that the buttons (be it Standby Auto/Off or Sleep 60/Sleep Off) are sometimes in conflicting states in Home app. No biggie, as I only added the opposite 'off' state buttons for testing but confusing nonetheless.

If you're happy with what you did for Z3STBY2H and can roll out same button behaviour changes to Z3SLP060 we're all good ;) maybe ;) :D Thanks again.

grzegorz914 commented 1 year ago

done, try beta.50

badgertastic commented 1 year ago

Beta 50. Looks like I’m up and running. Massive thanks!

Maybe glitch, but have seemingly a few disconnects today, more than usual I’d say.

[2/28/2023, 2:39:13 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, State error: AxiosError: timeout of 10000ms exceeded, reconnect in 15s.
[2/28/2023, 2:39:13 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Disconnected.
[2/28/2023, 2:39:28 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, Connected.
badgertastic commented 1 year ago

updated to 4.0.1. Noticed button function changed from Z3SLP060 to 1SLP060. No issue, corrected my end.

But switching AVR (Z3) on from off using a HomeKit Scene (with stored input), throws:

[homebridge-denon-tv] Device: 10.0.20.63 Bathroom, set Input error: power OFF, send command skipped.

Presumably trying to set input before the AVR is On. Cheers

grzegorz914 commented 1 year ago

Try 4.1.1 beta and let me know

badgertastic commented 1 year ago

Try 4.1.1 beta and let me know

Different error:

[3/2/2023, 5:02:10 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, set Input error: power State: false, Command: Z3SMART2, send command skipped.
[3/2/2023, 5:02:10 PM] [homebridge-denon-tv] Device: 10.0.20.63 Bathroom, set Power: Z3ON
grzegorz914 commented 1 year ago

Ah OK its Input, fixed in beta.3

badgertastic commented 1 year ago

Nailed it! Thanks! :)

grzegorz914 commented 1 year ago

I think we can close this issue as resolved. If some other issues occur please open new one.