EHylands / homebridge-anthemreceiver

Homebridge Plugin for Anthem Receiver
Apache License 2.0
6 stars 2 forks source link

Physical volume buttons on phone with apple remote app don't adjust volume on MRX 540 #14

Closed pponce closed 1 year ago

pponce commented 1 year ago

Describe Your Problem:

<!-- A clear and concise description of what problem you are trying to solve. -->
Hi Great plugin!
When using the Apple Remote in Control Center i used to be able to use the physical volume buttons on my phone to change the MRX540 volume.  That no longer works.  I xan hit the up and down button on the screen for the remote app. That works.  But the physical buttons no longer changes the volume on the receiver.
My suspicion is iOS17 or iOS17.01.  Just wanted to report this.
Everything else seems to work just fine.
Thanks again for this great plugin!

Logs:

Plugin Config:

        {
            "Host": "192.168.84.18",
            "Port": 14999,
            "PanelBrightness": true,
            "Zone1": {
                "Active": true,
                "Name": "MRX Zone 1",
                "Power": true,
                "Mute": true,
                "MultipleInputs": true,
                "ALM": true,
                "ARC": true,
                "Volume": true,
                "DolbyPostProcessing": true
            },
            "Zone2": {
                "Active": false,
                "Power": false,
                "Mute": false,
                "MultipleInputs": false,
                "Volume": false,
                "DolbyPostProcessing": false
            },
            "_bridge": {
                "username": "50:1E:2D:43:D6:44",
                "port": 51836
            },
            "platform": "AnthemReceiver"
        }

Screenshots:

Environment:

EHylands commented 1 year ago

Hi, thank you for reporting this issue.

I did multiple tests on my production server and I was not able to reproduce this issue for the moment (iOS 17, Homebridge 1.6.1) I was able to remove and pair the external television accessory without problems. Physical volume buttons in control center remote are reporting proper events in Homebridge and to MRX740

Also tried adding the external television accessory on my devel server. I can get the accessory to show up in Home App, but I don't get any remote in control center yet ... (May be related to my internal MDNS config and not necessarily related to iOS 17)

Have you tried running Homebridge in Debug mode to check if plugin was receiving any commands from Homekit remote ?

Will try to further investigate on my side.

pponce commented 1 year ago

Interesting that it's not reproducible I'll see if i can enable debug and pull logs. Need to remember how to do all that but i'll figure it out. It's strange that the up and down software buttons on the software remote work to change the receiver volume.
I would have guessed that if there was an issue with volume controls that this would also not work. But go figure. The play pause also mutes correctly and unmutes. But when i click on the actual mute button in the remote that does not work. But i never actually used that before i started seeing my issues. So don't know if the official mute button ever worked.

EHylands commented 1 year ago

Interesting that it's not reproducible

I'll see if i can enable debug and pull logs. Need to remember how to do all that but i'll figure it out.

It's strange that the up and down software buttons on the software remote work to change the receiver volume.

I would have guessed that if there was an issue with volume controls that this would also not work. But go figure.

The play pause also mutes correctly and unmutes.

But when i click on the actual mute button in the remote that does not work. But i never actually used that before i started seeing my issues. So don't know if the official mute button ever worked.

Home app Television accessory is created in Homebridge by configuring the 2 following services:

1- Televison service that manages the power button, input selector, control center remote buttons

2- TelevisionSpeaker service that manages the physical up and down buttons

Problem isolated to the TelevisionSpeaker service could explain your situation.

You can run Homebridge un debug mode with the -D flag in your console / terminal

If running Homebridge UI, do you see the following 2 accessories in your accessory page ?

image

pponce commented 1 year ago

Thanks for the explanation. I do see both those icons in my accessories list within homebridge-ui. They both work as expected. I can turn on and off the receiver and I can also adjust volume with the slider and mute and unmute.

EHylands commented 1 year ago

Thanks for the explanation.

I do see both those icons in my accessories list within homebridge-ui.

They both work as expected. I can turn on and off the receiver and I can also adjust volume with the slider and mute and unmute.

I was thinking about your situation:

1- try to run the plugin in debug mode with -D flag to check if the plugin is registering any events from the up and down physical keys

2- For testing purposes, maybe try adding the power input external television accessory for zone 2 and check if you can get physical keys to work for zone 2.

pponce commented 1 year ago

thanks for thinking further about my case. Latest update: I got things to work this morning. I'm still not sure exactly what happened. Right now i think somewhere along the way my homekit config may have gotten corrupted. There were two updates in succession to iOS 17 then 17.01.
Something must of just gotten messed up somehow during those updates. I just upgraded my phone and migrated to to the new phone and updated to 17.02. I have the "controller" app that allows me to make backups of my homekit setup and noticed that it was not up to date. The inputs + AML + Dolby modes were not synced correctly. I had to re-associate them all. After that things seemed to work again!

I'll close the ticket for now. I'm still not sure how the messed up config happened. I'll chalk it up to bad luck for now. Next time it happens i'll try the debug option and provide some more info. thanks again for the work on a great plug-in for this receiver. Amazing work.

pponce commented 1 year ago

Actually before closing out this ticket. One suggestion based on a hunch for what may have caused my issues.

Would it be possible to make the Dolby modes accessory, ALM modes accessory and inputs accessory have unique serials? Maybe there are other accessories that also don’t have unique serial numbers but I noticed at least those three share the same one. I think this causes issues with some HomeKit tools that can create HomeKit backups for example.

I’m wondering if maybe this may have caused the issue for me since I do use some other HomeKit tools like Controller, home+ and perhaps I messed up my HomeKit config somehow when restoring a backup or something.

EHylands commented 1 year ago

I will look into that. I made the change for another plugin I wrote exactly for Homekit controller app backup concern.

ALM, Dolby and Input really are 1 accessory presenting multiple services. Serial number is bounded to the accessory.

I will check if I can get a unique serial number attached to the service rather than to the accessory.

I wonder why Homekit backup apps needs unique serial numbers. Accessories and services are mainly identified with their uuid.

pponce commented 1 year ago

This is the message I get in the controller app. Probably not very helpful to undertand exactly why though. IMG_0004

I think the backups feature may have caused my issues. Perhaps there are cases where UUID’s can change and with unique serial numbers you can associate the unique serial number to a changed uuid? But I’m just guessing here. 😄

pponce commented 1 year ago

My mute, arc, power, volume and brightness accessories in the home app show up as: “ALM1B00432O139 ARC” “ALM1B00432O139 Mute” “ALM1B00432O139 Power” “ALM1B00432O139 Volume” “ALM1B00432O139 Brightness”

EHylands commented 1 year ago

My mute, arc and power accessories in the home app show up as:

“ALM1B00432O139 ARC”

“ALM1B00432O139 Mute”

“ALM1B00432O139 Power”

ARC, Mute and Power are all a single accessory containing a single service.

ALM, Input and Dolby are a single accessory containing multiple switch services sharing the same serial number.

Will try creating unique serial

EHylands commented 1 year ago

My mute, arc, power, volume and brightness accessories in the home app show up as: “ALM1B00432O139 ARC” “ALM1B00432O139 Mute” “ALM1B00432O139 Power” “ALM1B00432O139 Volume” “ALM1B00432O139 Brightness”

ALM , Dolby and Input accessory were indeed sharing the same serial number. Can you try installing beta version 0.8.1 to see if it properly fixes the issue ?

pponce commented 1 year ago

Sure. Will give it a go and report back.

pponce commented 1 year ago

Looks good! I see Unique serial numbers. My remote volume (using physical volume buttons) still working as well. I'm still not sure if the serial numbers not being unique was the cause to my issue earlier but probably still good to have this slight fix in. Thanks for the support!