Closed maxime-killinger closed 3 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"
@maxime-killinger Can you please post your config?
@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
Looks fine. Please try to remove the external TV from HomeKit, set the value for onOffTvName
in the config, and re-add it again.
Done. And the unsupported accessory is still here. I have also cleaned the cache, nothing change.
Good evening! I've got the exact same issue, the "switch" option works fine
Open the details view of the unsupported accessory and scroll down. Does it say "Remove device" or is there a "Bridge" button?
Good evening! There is a "bridge" button
same here
Hey Lukas. Auch ich habe das selbe Problem.
Beste Grüße und schöne Feiertage!
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"
}
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.
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 ?
Sorry, I overlooked the PR. It is now merged, new version on NPM.
@lukasroegner @jdebardi thank's, it's fix
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. 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.