lukasroegner / homebridge-apple-tv-remote

Plugin for controlling Apple TVs in homebridge.
MIT License
131 stars 13 forks source link

Latest update broke the Off switch #83

Open aberthil opened 3 years ago

aberthil commented 3 years ago

Following the update, the Off switch does not work anymore, Power On seems to work but the off state is broken

lukasroegner commented 3 years ago

Please provide debug logs, otherwise, it is impossible to find the root of the issue.

aberthil commented 3 years ago

How do I do this? Let me know which command you want me to use to get you the information to bring back the Off button

Here is what I can get: [12/6/2020, 10:48:40 AM] [Apple TV Platform] [GarageATV] On/off switch changed to false [12/6/2020, 10:48:40 AM] [Apple TV Platform] [GarageATV] Getting power state... [12/6/2020, 10:48:40 AM] [Apple TV Platform] [GarageATV] Returning cached value false for power state [12/6/2020, 10:48:48 AM] [Apple TV Platform] [GarageATV] On/off TV changed to 0 [12/6/2020, 10:48:48 AM] [Apple TV Platform] [GarageATV] Getting power state... [12/6/2020, 10:48:48 AM] [Apple TV Platform] [GarageATV] Returning cached value false for power state [12/6/2020, 10:48:55 AM] [Apple TV Platform] [GarageATV] On/off TV changed to 1 [12/6/2020, 10:48:55 AM] [Apple TV Platform] [GarageATV] Getting power state... [12/6/2020, 10:48:55 AM] [Apple TV Platform] [GarageATV] Returning cached value false for power state [12/6/2020, 10:48:55 AM] [Apple TV Platform] [GarageATV] Pressing key topmenu... [12/6/2020, 10:49:01 AM] [Apple TV Platform] [GarageATV] On/off TV changed to 0 [12/6/2020, 10:49:01 AM] [Apple TV Platform] [GarageATV] Getting power state... [12/6/2020, 10:49:01 AM] [Apple TV Platform] [GarageATV] Returning cached value false for power state [12/6/2020, 10:49:20 AM] [Apple TV Platform] [GarageATV] Current bundleIdentifier is now: com.att.tv [12/6/2020, 10:49:34 AM] [Apple TV Platform] [GarageATV] On/off TV changed to 1 [12/6/2020, 10:49:34 AM] [Apple TV Platform] [GarageATV] Getting power state... [12/6/2020, 10:49:34 AM] [Apple TV Platform] [GarageATV] Returning cached value false for power state [12/6/2020, 10:49:34 AM] [Apple TV Platform] [GarageATV] Pressing key topmenu... [12/6/2020, 10:49:52 AM] [Apple TV Platform] [GarageATV] On/off TV changed to 0 [12/6/2020, 10:49:52 AM] [Apple TV Platform] [GarageATV] Getting power state... [12/6/2020, 10:49:52 AM] [Apple TV Platform] [GarageATV] Returning cached value false for power state

aberthil commented 3 years ago

OK after uninstall and reinstall the plug in and playing with the config, it seems that after you set it up in the config, do the pairing, you now have to reboot the ATV for it to work. I will continue to test it on my three ATVs. The last issue though is that only the switch is in Home App, just can not get the TV to appear in my accessories on the HomeApp??

"platform": "AppleTvPlatform", "devices": [ { "name": "Garage AppleTV4k", "credentials": "16591C61-0EE1-441E-BBCB-55D112A59A48:66646138663865342d343837302d346633322d623762652d323037616633363565346365:35633261313733372d363235652d343330312d393737382d376139343637643530636131:9963e8d035db634c283c133557048082fc1c2374e2c740850157068980bc2df5:52234a9c8e811b983fbe41a87fb2afed6db9db3d9d2e7c524865e347e447fce7", "isOnOffSwitchEnabled": true, "onOffSwitchName": "Garage AppleTV", "isOnOffTvEnabled": true, "onOffTvName": "Garage AppleTV", "isPlayPauseSwitchEnabled": false, "playPauseSwitchName": "Garage AppleTV" }, { "name": "Family AppleTV4k", "credentials": "A516D043-9847-410D-8660-D06E4F62A6DC:31333739376231352d336138622d346637352d623738642d323131343239303161653235:32373838633366652d356333372d346432632d613030332d656332386161313362373630:65346eb98c6131c877296446b1d8d214f074d0472ddfab6996d541fea833462d:ef838d4cb52ad81ef9cd3b1b16dcdd886b459589f402d89c1682b32349fd011b", "isOnOffSwitchEnabled": true, "onOffSwitchName": "Family AppleTV", "isOnOffTvEnabled": true, "onOffTvName": "Family AppleTV", "isPlayPauseSwitchEnabled": false, "playPauseSwitchName": "Family AppleTV" } ], "isApiEnabled": false, "apiPort": 40304, "apiToken": "0611" }

Any idea on how to force that to show up?

aberthil commented 3 years ago

I played with it again this morning, and definitively it broke something as once again, the off does not work, it seems that the new update is unable to get the state of the ATV...

[12/7/2020, 10:32:48 AM] [AppleTvPlatform] [Garage AppleTV4k] On/off switch changed to true [12/7/2020, 10:32:48 AM] [AppleTvPlatform] [Garage AppleTV4k] Getting power state... [12/7/2020, 10:32:48 AM] [AppleTvPlatform] [Garage AppleTV4k] Returning cached value false for power state [12/7/2020, 10:32:48 AM] [AppleTvPlatform] [Garage AppleTV4k] Pressing key topmenu... [12/7/2020, 10:32:52 AM] [AppleTvPlatform] [Garage AppleTV4k] On/off switch changed to false [12/7/2020, 10:32:52 AM] [AppleTvPlatform] [Garage AppleTV4k] Getting power state... [12/7/2020, 10:32:52 AM] [AppleTvPlatform] [Garage AppleTV4k] Returning cached value false for power state [12/7/2020, 10:33:00 AM] [AppleTvPlatform] [Garage AppleTV4k] On/off switch changed to true [12/7/2020, 10:33:00 AM] [AppleTvPlatform] [Garage AppleTV4k] Getting power state... [12/7/2020, 10:33:00 AM] [AppleTvPlatform] [Garage AppleTV4k] Returning cached value false for power state [12/7/2020, 10:33:00 AM] [AppleTvPlatform] [Garage AppleTV4k] Pressing key topmenu... [12/7/2020, 10:33:09 AM] [AppleTvPlatform] [Garage AppleTV4k] On/off switch changed to false [12/7/2020, 10:33:09 AM] [AppleTvPlatform] [Garage AppleTV4k] Getting power state... [12/7/2020, 10:33:09 AM] [AppleTvPlatform] [Garage AppleTV4k] Returning cached value false for power state [12/7/2020, 10:33:15 AM] [AppleTvPlatform] [Garage AppleTV4k] On/off switch changed to true [12/7/2020, 10:33:15 AM] [AppleTvPlatform] [Garage AppleTV4k] Getting power state... [12/7/2020, 10:33:15 AM] [AppleTvPlatform] [Garage AppleTV4k] Returning cached value false for power state [12/7/2020, 10:33:15 AM] [AppleTvPlatform] [Garage AppleTV4k] Pressing key topmenu... [12/7/2020, 10:33:16 AM] [AppleTvPlatform] [Garage AppleTV4k] On/off switch changed to false [12/7/2020, 10:33:16 AM] [AppleTvPlatform] [Garage AppleTV4k] Getting power state... [12/7/2020, 10:33:16 AM] [AppleTvPlatform] [Garage AppleTV4k] Returning cached value false for power state [12/7/2020, 10:33:37 AM] [AppleTvPlatform] [Garage AppleTV4k] On/off switch changed to true [12/7/2020, 10:33:37 AM] [AppleTvPlatform] [Garage AppleTV4k] Getting power state... [12/7/2020, 10:33:37 AM] [AppleTvPlatform] [Garage AppleTV4k] Returning cached value false for power state [12/7/2020, 10:33:37 AM] [AppleTvPlatform] [Garage AppleTV4k] Pressing key topmenu... [12/7/2020, 10:33:47 AM] [AppleTvPlatform] [Garage AppleTV4k] On/off switch changed to false [12/7/2020, 10:33:47 AM] [AppleTvPlatform] [Garage AppleTV4k] Getting power state... [12/7/2020, 10:33:47 AM] [AppleTvPlatform] [Garage AppleTV4k] Returning cached value false for power state [12/7/2020, 10:34:14 AM] [AppleTvPlatform] [Garage AppleTV4k] Current bundleIdentifier is now: com.apple.TVHomeSharing

Is there a way to roll back to the previous version which was working perfectly?

aberthil commented 3 years ago

Some more debugging it seems like there is the menu press command but not the long press so it does not go to the sleep menu that is usually coming next... Maybe something to do with some delay here....

aberthil commented 3 years ago

BTW to check a few thing, what is the command syntax exactly here: "commandSwitches": [ { "name": "", "commands": [...] } ]

Let's say I want to send the following commands with the switch: menu, top menu, select. Do I write: "commands": [menu, top menu, select] or something else?

MikeDeltaHH commented 3 years ago

Same problem here!

Nastras commented 3 years ago

Hello Lukas, I hope you are well and healthy?

I also have the problem. With me it is so that I can turn off the Apple TV but it can not be turned on again via the power button.

When I want to turn on the Apple TV it shows me in the log but nothing happens:

Dez 19 08:26:00 SHS homebridge[623]: [AppleTvPlatform] [Spiegel Flur] On/off switch changed to true Dez 19 08:26:00 SHS homebridge[623]: [AppleTvPlatform] [Spiegel Flur] Getting power state... Dez 19 08:26:00 SHS homebridge[623]: [AppleTvPlatform] [Spiegel Flur] Returning cached value true for power state

The switch is then set to on in HomeKit but the Apple TV is still off. When I turn off the Apple TV in HomeKit, it turns on.

Dez 19 08:28:51 SHS homebridge[623]: [AppleTvPlatform] [Spiegel Flur] Getting power state... Dez 19 08:28:51 SHS homebridge[623]: [AppleTvPlatform] [Spiegel Flur] Returning cached value true for power state Dez 19 08:28:51 SHS homebridge[623]: [AppleTvPlatform] [Spiegel Flur] Pressing key topmenu... Dez 19 08:28:52 SHS homebridge[623]: [AppleTvPlatform] [Spiegel Flur] Pressing key select...

If I can help you fix the bug let me know.

Greetings Danny

MikeDeltaHH commented 3 years ago

Any updates for this issue?

lukasroegner commented 3 years ago

The latest version update introduced a single line of enhanced debug output (https://github.com/lukasroegner/homebridge-apple-tv-remote/commit/01426bb691c920a54a2bf48fa68d5320a83fb981), are you sure that the root of the issue is the new version? Or maybe just another change of the Apple TV behavior due to an update? Have you reverted to version 0.12.0 to check whether that version works?

aberthil commented 3 years ago

Thanks for coming back to me,

It used to work before the upgrade like a charm, since the upgrade it does not… I have three ATV 4k on the network here. I could indeed revert, but you will have to explain the process on how to do this.

Regards, Alexis

On Jan 20, 2021, at 3:02 AM, Lukas Rögner notifications@github.com wrote:

The latest version update introduced a single line of enhanced debug output (01426bb https://github.com/lukasroegner/homebridge-apple-tv-remote/commit/01426bb691c920a54a2bf48fa68d5320a83fb981), are you sure that the root of the issue is the new version? Or maybe just another change of the Apple TV behavior due to an update? Have you reverted to version 0.12.0 to check whether that version works?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lukasroegner/homebridge-apple-tv-remote/issues/83#issuecomment-763524702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR476WLUNLIO3XEQHVDIQYDS22Z55ANCNFSM4UPQUUDQ.

Nastras commented 3 years ago

I can't tell exactly when it started but I think it's because of an update from Apple that changed the behavior of the apple tv. If the problem had occurred after an update of your plugin, I would have noticed it earlier and notified you.

Cyrille556 commented 3 years ago

Good evening, I also have the same problem, I can perfectly turn on Apple TV but when I want to turn off nothing happens on Apple TV .... yet in the homebridge activity log the plug-in looks like work normally ... maybe the latest Apple TV updates are the cause of the problem ??