lukasroegner / homebridge-apple-tv-remote

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

Removing accessory with unique ID #9

Closed Nastras closed 4 years ago

Nastras commented 4 years ago

Hello Lukas,

I have now repeatedly observed the following problem.

If the plugin is restarted and the integrated Apple TV is not available in the network at that moment, it will be deleted by the plugin.

This causes the Apple TV to disappear from Homekit for a short time and then be added again. All automations where it has been mounted are destroyed.

In addition, the device must be renamed in Homekit.

Do you have a way to prevent this? Thank you!

Feb 7 02:26:46 SHS homebridge[618]: #033[36m[AppleTvPlatform]#033[39m Scanning for AppleTVs completed. 0 device(s) found. Feb 7 02:26:46 SHS homebridge[618]: #033[36m[AppleTvPlatform]#033[39m AppleTV with unique ID B3EDE0F6-CEAF-4E1B-B4AD-2803D9FFD3A7 (Spiegel Flur) not found. Feb 7 02:26:46 SHS homebridge[618]: #033[36m[AppleTvPlatform]#033[39m Removing accessory with unique ID B3EDE0F6-CEAF-4E1B-B4AD-2803D9FFD3A7 and kind SwitchAccessory. Feb 7 02:26:46 SHS homebridge[618]: #033[36m[AppleTvPlatform]#033[39m API started.

IMG_0065

lukasroegner commented 4 years ago

Hi @Nastras,

I also have some issues with Apple TVs that don't show up when searching for them. I have to further investigate why sometimes Apple TVs are not found during the discovery process. Maybe, just increasing the timeout solves the issue.

Nastras commented 4 years ago

Ok, good thing you noticed the behavior.

If you have something to test, let me know 😉

CooperCGN commented 4 years ago

Good to know I am not alone. I have one more problem, after a few days my Apple TV stops responding when I send a URL to the API. I need to restart homebridge to make it work again.

gtg465x commented 4 years ago

Good to know I am not alone. I have one more problem, after a few days my Apple TV stops responding when I send a URL to the API. I need to restart homebridge to make it work again.

This seems to be happening to me now as well. Worked perfect a million times in the first few days, but suddenly the commands stopped working when I hit the API and a reboot of home bridge seems to fix it temporarily. The API still returns 200 as if the command worked though, even though it didn't.

CooperCGN commented 4 years ago

I moved the plugin to a separate homebridge instance for now which I restart during my good night automation shortcut using the ssh command.

lukasroegner commented 4 years ago

New version on the development branch, feel free to give it a try. I restructured the code, automatic reconnections are now implemented. I'll try this new version for a few days, it should solve the following issues:

Nastras commented 4 years ago

@lukasroegner Cool stuff, I'd like to try it. What is the command to install the beta?

lukasroegner commented 4 years ago
npm install -g https://github.com/lukasroegner/homebridge-apple-tv-remote.git#development
Nastras commented 4 years ago

Test has started .-) I will give you feedback within the next few days. Thank you!!!

Nastras commented 4 years ago

Hello Lukas, here a short feedback after 24 hours.

The plugin is running great now, I think you can publish it 👍👌👌

lukasroegner commented 4 years ago

@Nastras I had issues this morning and thus added some more fixes. I'll try them the next few days.

Nastras commented 4 years ago

Really 🤔?

I'm good so far, let me know if I can help you test it.

Nastras commented 4 years ago

I wanted to ask how the plugin is currently working for you?

lukasroegner commented 4 years ago

It seems that my issue is a particular one. I updated the master branch with the version @Nastras tested. New version is also on NPM.