lukasroegner / homebridge-apple-tv-remote

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

Not supported accessory #78

Closed maxime-killinger closed 3 years ago

maxime-killinger commented 4 years ago

I added the TV accessory from the plug-in, it’s working well. But from then I have an additional accessory not supported on the Home app that I can’t remove. 24DF4BBB-AB84-4711-AC9C-A15774A1DCE7 I already tried to remove the accessory, but it come back even after clearing the cache. I’m running the last version of the plug-in with an Apple TV on TvOS 14.

maxphour commented 4 years ago

Hey @maxime-killinger, I don't know a way to remove it either, but I discovered that you can at least move it if you enable the switch in the config. By the way: How did you manage to add the TV accessory? If I try to add it and enter pin 8x zero, I'm getting an error. It says something like: "device is not ready for connection"

lukasroegner commented 4 years ago

@maxime-killinger Can you please post your config?

maxime-killinger commented 4 years ago

@lukasroegner there is my config for the plugin

        {
            "name": "Apple TV Platform",
            "devices": [
                {
                    "name": "Apple TV",
                    "credentials": "26963CF6-B070-4ABC-B7DD-8374E3B45828:34363337663436332d633637392d343665622d396435642d373132393632616438313861:64373833333335612d363430332d343338662d613236622d336632643439386630643935:3139da1c6163c9530f3b0ae7cdf14354256eac1909c3668faf4c5418850d550e:64fa05d32ec63006f52113b31121f057bb30d1abb378eb594c1634096c596b05",
                    "isOnOffSwitchEnabled": false,
                    "isOnOffTvEnabled": true,
                    "onOffTvName": "Apple TV",
                    "isPlayPauseSwitchEnabled": false
                }
            ],
            "platform": "AppleTvPlatform"
        }

@maxphour I didn't have your problem, I just used my Homebridge code to add the tv without any problem

lukasroegner commented 4 years ago

Looks fine. Please try to remove the external TV from HomeKit, set the value for onOffTvName in the config, and re-add it again.

maxime-killinger commented 4 years ago

Done. And the unsupported accessory is still here. I have also cleaned the cache, nothing change.

reapziq commented 4 years ago

Good evening! I've got the exact same issue, the "switch" option works fine

lukasroegner commented 3 years ago

Open the details view of the unsupported accessory and scroll down. Does it say "Remove device" or is there a "Bridge" button?

reapziq commented 3 years ago

Good evening! There is a "bridge" button image

jjuuzzii commented 3 years ago

same here

idominiki commented 3 years ago

Hey Lukas. Auch ich habe das selbe Problem.

Beste Grüße und schöne Feiertage!

jdebardi commented 3 years ago

Did anyone manage to solve this? I just install this plugin today and have the same issue.

My config;

{
            "name": "Apple TV Platform",
            "devices": [
                {
                    "name": "Lounge Apple TV",
                    "credentials": "<removed>",
                    "isOnOffTvEnabled": true
                }
            ],
            "isApiEnabled": true,
            "apiToken": "homebridgeappletv",
            "platform": "AppleTvPlatform"
        }
jdebardi commented 3 years ago

I worked out the issue.

If you ONLY enable the extra TV Accessory the code still adds a stub 'normal' accessory but never associates any switches with it (as you didn't as it to).

The quick fix I did was to add an if statement in apple-tv-controller.js around the stub accessory statement so it only does it if any of the child switches are to be created;

if (deviceConfiguration.isOnOffSwitchEnabled || deviceConfiguration.isPlayPauseSwitchEnabled || (deviceConfiguration.appPlayPauseSwitches && deviceConfiguration.appPlayPauseSwitches.length > 0) || (deviceConfiguration.commandSwitches && deviceConfiguration.commandSwitches.length > 0) ) {
            var accessory = platform.useAccessory(deviceConfiguration.name, client.id);
            accessory.setInformation({
                manufacturer: 'Apple',
                model: 'Apple TV',
                serialNumber: client.id,
                firmwareRevision: null,
                hardwareRevision: null
            });
}

I have created pull request #90 for this so hopefully will get merged.

maxime-killinger commented 3 years ago

I worked out the issue.

If you ONLY enable the extra TV Accessory the code still adds a stub 'normal' accessory but never associates any switches with it (as you didn't as it to).

The quick fix I did was to add an if statement in apple-tv-controller.js around the stub accessory statement so it only does it if any of the child switches are to be created;


if (deviceConfiguration.isOnOffSwitchEnabled || deviceConfiguration.isPlayPauseSwitchEnabled || (deviceConfiguration.appPlayPauseSwitches && deviceConfiguration.appPlayPauseSwitches.length > 0) || (deviceConfiguration.commandSwitches && deviceConfiguration.commandSwitches.length > 0) ) {

            var accessory = platform.useAccessory(deviceConfiguration.name, client.id);

            accessory.setInformation({

                manufacturer: 'Apple',

                model: 'Apple TV',

                serialNumber: client.id,

                firmwareRevision: null,

                hardwareRevision: null

            });

}

I have created pull request #90 for this so hopefully will get merged.

@lukasroegne any news about this fix ?

lukasroegner commented 3 years ago

Sorry, I overlooked the PR. It is now merged, new version on NPM.

maxime-killinger commented 3 years ago

@lukasroegner @jdebardi thank's, it's fix