Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] All Homebridge accessories disappear form Homekit after 30seconds #280

Closed
vincentanthony opened this issue Jun 7, 2020 · 53 comments
Closed
Assignees
Labels
bug Something isn't working waiting for feedback Waiting for feedback from users

Comments

@vincentanthony
Copy link

30 seconds after homebridge restart, all accessories on home bridge disappear from HomeKit. Narrowed it down to harmony plugin. Not seeing any errors in the logs. Tried reinstalling everything, still no fix

@vincentanthony vincentanthony added the bug Something isn't working label Jun 7, 2020
@vincentanthony
Copy link
Author

Seeing this in debug mode:

[6/7/2020, 11:04:31] [Harmony Hub] (Harmony Hub)INFO - refreshCurrentActivity : Refresh needed since last update is too old or current Activity is not set : -1
[6/7/2020, 11:04:31] [Harmony Hub] (Harmony Hub)keysMap is :{"0":"{"command":"Rewind","type":"IRCommand","deviceId":"30808578"}|1","1":"{"command":"FastForward","type":"IRCommand","deviceId":"30808578"}|1","2":"{"command":"Next","type":"IRCommand","deviceId":"30808578"}|1","3":"{"command":"Prev","type":"IRCommand","deviceId":"30808578"}|1","4":"{"command":"DirectionUp","type":"IRCommand","deviceId":"30808578"}|1","5":"{"command":"DirectionDown","type":"IRCommand","deviceId":"30808578"}|1","6":"{"command":"DirectionLeft","type":"IRCommand","deviceId":"30808578"}|1","7":"{"command":"DirectionRight","type":"IRCommand","deviceId":"30808578"}|1","8":"{"command":"Select","type":"IRCommand","deviceId":"30808578"}|1","9":"{"command":"Return","type":"IRCommand","deviceId":"30808578"}|1","10":"{"command":"Home","type":"IRCommand","deviceId":"30808578"}|1","11":"{"command":"Play","type":"IRCommand","deviceId":"30808578"}|1","15":"{"command":"TopMenu","type":"IRCommand","deviceId":"30808578"}|1"}

[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - GET Characteristic.Active
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - refreshCurrentActivity : Refresh needed since last update is too old or current Activity is not set : 16571369
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - GET Characteristic.ActiveIdentifier
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - refreshCurrentActivity : Refresh needed since last update is too old or current Activity is not set : 16571369
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - refreshCurrentActivity : Cancelling refresh since a refresh is allready in progress 16571369
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - refreshCharacteristic : updating Characteristic.ActiveIdentifier to 16571369
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - GET Characteristic.CurrentVisibilityState : DEFAULT - 0
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - GET Characteristic.CurrentVisibilityState : DEFAULT - 0
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - GET Characteristic.CurrentVisibilityState : DEFAULT - 0
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - GET Characteristic.CurrentVisibilityState : DEFAULT - 0
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)keysMap is :{"0":"{"command":"Rewind","type":"IRCommand","deviceId":"30808578"}|1","1":"{"command":"FastForward","type":"IRCommand","deviceId":"30808578"}|1","2":"{"command":"Next","type":"IRCommand","deviceId":"30808578"}|1","3":"{"command":"Prev","type":"IRCommand","deviceId":"30808578"}|1","4":"{"command":"DirectionUp","type":"IRCommand","deviceId":"30808578"}|1","5":"{"command":"DirectionDown","type":"IRCommand","deviceId":"30808578"}|1","6":"{"command":"DirectionLeft","type":"IRCommand","deviceId":"30808578"}|1","7":"{"command":"DirectionRight","type":"IRCommand","deviceId":"30808578"}|1","8":"{"command":"Select","type":"IRCommand","deviceId":"30808578"}|1","9":"{"command":"Return","type":"IRCommand","deviceId":"30808578"}|1","10":"{"command":"Home","type":"IRCommand","deviceId":"30808578"}|1","11":"{"command":"Play","type":"IRCommand","deviceId":"30808578"}|1","15":"{"command":"TopMenu","type":"IRCommand","deviceId":"30808578"}|1"}
[6/7/2020, 11:04:43] [Harmony Hub] (Harmony Hub)INFO - refreshCharacteristic : updating Characteristic.Active to true

@nicoduj
Copy link
Owner

nicoduj commented Jun 7, 2020

Hi, can you share your config and environment ? What do you mean by all accessories ? In no way this plugin can interfere with devices it does not expose itself

@vincentanthony
Copy link
Author

Timezone GMT-0700
Raspbian GNU/Linux Buster (10)
homebridge
192.168.7.199
fe80::c1c8:32dd:f3cc:3841
v12.17.0
v6.14.5
pi
/var/lib/homebridge
/var/lib/homebridge/config.json
Yes

Any other info?

As an example, I have the nest and nest cam plugins installed. When harmony is uninstalled, those plugins work fine. As soon as I install Harmony, everything shows up fine for 30 seconds, then everything disappears from the home app

@nicoduj
Copy link
Owner

nicoduj commented Jun 7, 2020

Are you using regular homebridge ? What is your config.json file ?

@vincentanthony
Copy link
Author

{
"bridge": {
"name": "Homebridge 17B1",
"username": "0E:7C:7F:6E:17:B1",
"port": HIDDEN,
"pin": "HIDDEN"
},
"accessories": [],
"platforms": [
{
"name": "Config",
"port": HIDDEN,
"auth": "form",
"theme": "auto",
"tempUnits": "f",
"lang": "auto",
"platform": "config"
},
{
"name": "Nest",
"googleAuth": {
"issueToken": HIDDEN,
"cookies": HIDDEN,
"apiKey": HIDDEN
},
"platform": "Nest"
},
{
"googleAuth": {
"issueToken": HIDDEN,
"cookies": HIDDEN,
"apiKey": HIDDEN
},
"ffmpegCodec": "libx264",
"options": {
"alertCheckRate": 10,
"alertCooldownRate": 180,
"motionDetection": true,
"streamingSwitch": true,
"doorbellAlerts": true,
"doorbellSwitch": true,
"disableAudio": false
},
"platform": "Nest-cam"
},
{
"name": "Harmony Hub",
"hubIP": "192.168.7.77",
"hubName": "Harmony Hub",
"platform": "HarmonyHubWebSocket"
}
]
}

@nicoduj
Copy link
Owner

nicoduj commented Jun 7, 2020

when you say disapeear, they are no more there ? DO you see harmony exposed activities at all ? Do you have any devices on an old ios version that could cause some Icloud sync issues ?

@vincentanthony
Copy link
Author

They aren't there anymore. I don't see them anywhere in the Home App. Don't know if there's any old devices causing issues, but again, everything with home bridge seems to work fine when I uninstall Harmony.

@nicoduj
Copy link
Owner

nicoduj commented Jun 7, 2020

i would need the full log while in debug mode when it happens, and check if it is on all your ios device or only one. Please also check if you have any old device (priori to ios 10) on your icloud account with home syn enabled. But once again, if oher devices disappears than the one exposed form harmony, it seems very strange ... Such kind of issue was never reported ...

@nicoduj
Copy link
Owner

nicoduj commented Jun 7, 2020

And by the way, is it a standard homebridge or hoobs install ?

@vincentanthony
Copy link
Author

I believe it's just the standard

@vincentanthony
Copy link
Author

Also had one device on iOS connected to iCloud / Homekit, so took it off.

@vincentanthony
Copy link
Author

Removed the iOS device, still been having the same problem since yesterday. Have removed all plugins to make sure there's nothing else causing the issue.

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

Hi, I am sorry but I don’t know what to do with this . Are they still visible in homebridge itself (config ui ?) did you try eve app ? It could be some cache messed up issue but you would see in your log some removers accessory , still you can try deleting the cached accessory folder .

@vincentanthony
Copy link
Author

They are still visible in Homebridge and turn on / off. I've deleted cached accessories multiple times. Anything else I can try? definitely something specific with the Harmony plugin.

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

reboot your phone ? Do you have multiple ios device in your home ? Or maybe you have some problem with permission, what are the settings of your home app concerning access autorization (everyone, users of the same network, users of the same home, any code ? )

@vincentanthony
Copy link
Author

only 2 iPhones in the house, both with full permissions. Two Apple TVs and 3 HomePods that are hubs.

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

and both iphones have the same behavior ? one thing however in your config : remove hubName if you have hubIP set (and fixed on your network)

@vincentanthony
Copy link
Author

same behavior on all of our devices. Even computers with home app. Will try the removing hub name

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

and I'd like to know the version of your homebridge / Hap by the way.

@vincentanthony
Copy link
Author

1.1.1. Same behavior after removing the name

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

last thing you can do is to launch homebridge on full log (DEBUG=*) and check events when it disappears but like I said first time I hear of such issue.

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

1.1.1 ? It is not released, only 1.1.0 . You checked that it is not back in another room / default room ? Do you have any file named harmony* in the root dir of your homebridge ? If yes you can try to delete them. Also, you did not make multiple trials and error on the same install with config change like publishAsExternalAccessory ?

@vincentanthony
Copy link
Author

Sorry. 1.1.0. Attached a log.

I've tried a number of different settings with the config, still the same thing. Haven't checked for any files in the toor directory. Not in another room either.

testlog copy.docx

@vincentanthony
Copy link
Author

No harmony file in the root dir

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

Everything seems fine in your homebridge log as far as I can tell .
You could try to stop homebridge (first), modify your config to add cleanCache to true, start again. (if it works, set the option back to false, without stopping homebridge)
If that doe not work, stop again, and set publishAllTVAsExternalAccessory to true, and launch .
Then, in home app, add a new device, by code, and enter the code that was in homebridge log.

You can also try to not publish a tv at first, but only switches (see corresponding options)

@vincentanthony
Copy link
Author

Not publishing as a TV and just publishing as an external accessory did it. It seems to be working now. Wonder why that would be the issue. It was working like that before for about a month or so.

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

I don't understand what you did. If you don't publish as tV it will not publish anything at all if you don't expose siwtches. Do you have a Tv accessory or not ? If you publish As external accessory, you have to add it manually after.

I think you have messed up your cache at some point, but I don't know in what state is your config.

@vincentanthony
Copy link
Author

I switched off TV Accessory and switched on Switches Accessory in HomeKit. On restart it published one switch with my activity options as different switches inside of it. Didn't need to add anything manually.

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

Config and screenshot in home app, not sure I understood what you said . because if I understand you don’t have any tv accessory anymore but only one switch per activity

@vincentanthony
Copy link
Author

Screen Shot 2020-06-08 at 10 51 43 AM

Screen Shot 2020-06-08 at 10 52 31 AM

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

ok, and if you try to add the option to publish a tv accessory, does it shows up and stay (don't remove switch, you can have both)

@vincentanthony
Copy link
Author

Did what you suggested and it disappeared again

@nicoduj
Copy link
Owner

nicoduj commented Jun 8, 2020

when it "appears", where does it appear ? in which room ?

@vincentanthony
Copy link
Author

Default Room. I'm looking in the home section, see it show up, then disappear. Attached a screen capture of what happens. Just hitting restart on home bridge, not doing anything else.
Screen Recording 2020-06-08 at 11.47.17 AM.zip

@vincentanthony
Copy link
Author

So, been testing this all morning. Disabled the TV Accessory and went back to the switch. Reinstalled my Nest plugins, everything is working as expected. There's clearly something up with the TV Accessory option, or at the least, the way it's interacting with my HomeKit. Not sure if you have any other suggestions, or if I should just stick with the switch options.

@jlg89
Copy link

jlg89 commented Jun 20, 2020

Same issue here, except it didn’t affect other homebridge accessories, only the Harmony accessories would disappear from the Home screen after ~30s. Disabling “TV accessory in homekit” and enabling “Publish all TV as external accessory” seems to be a workaround.

{ "platform": "HarmonyHubWebSocket", "plugin_map": { "plugin_name": "homebridge-harmony" }, "name": "Harmony Hub", "hubIP": "192.168.77.9", "hubName": "Harmony Hub", "publishAllTVAsExternalAccessory": true, "TVAccessory": false, "mainActivity": "Watch Apple TV", "switchAccessories": true, "publishGeneralMuteSwitch": true, "publishGeneralVolumeSlider": true, "linkVolumeControlToTV": true, "publishSwitchActivitiesAsIndividualAccessories": true, "publishDevicesAsIndividualAccessories": true, "publishSequencesAsIndividualAccessories": true, "publishHomeControlsAsIndividualAccessories": true, "showCommandsAtStartup": false, "addAllActivitiesToSkippedIfSameStateActivitiesList": false, "playPauseBehavior": false, "cleanCache": false, "activitiesToPublishAsInputForTVMode": [], "remoteOverrideCommandsList": [], "activitiesToPublishAsAccessoriesSwitch": [], "skippedIfSameStateActivities": [], "devicesToPublishAsAccessoriesSwitch": [], "sequencesToPublishAsAccessoriesSwitch": [], "homeControlsToPublishAsAccessoriesSwitch": [], "otherPlatforms": [] }

@beckern
Copy link

beckern commented Jul 3, 2020

Hello,
i think, i have the same issue. After installing the plugin all harmony and homematic devices disappear after a few seconds in my homekit. Sometimes the devices appear after reconnect wlan. In homebridge-config-ui-x v all devices are to controlable.
In the log file are no obviously mistkake.
Now i unistall this plugin (and install harmony plugin from @KraigM) and everythink is fine. It is very bad because this plugin is more versatile and offers more functions. I would be happy if the error can be fixed.
Please contact me for further questions.

@beckern
Copy link

beckern commented Jul 4, 2020

PS: Maybe nice to know, only the Xiaomi roborock appear in HomeKit. It is configured as Accessoires in config.json, all other devices are configured in platforms.

@nicoduj
Copy link
Owner

nicoduj commented Jul 5, 2020

Sorry to hear that it is spreading. I don’t have the issue and using a lot of accessories so I can’t figure out what is happening. Could you try downgrading the plugin maybe to the one that was not causing the issue ? Are you all on external accessory mode or bridge mode ? All platform accessories are affected ? Is it an upgrade of harmony or an upgrade of homebridge that made it happen ? Is it happening on a fresh install ?

@beckern
Copy link

beckern commented Jul 5, 2020

I don't use your plugin before, so I can't say it is caused by an upgrade/downgrade.

  • Are you all on external accessory mode or bridge mode ? I don´t know.
    All platform accessories effected. The homebridge is fresh installed this week.

@nicoduj
Copy link
Owner

nicoduj commented Jul 5, 2020

@beckern can you share your config please ?

@nicoduj
Copy link
Owner

nicoduj commented Jul 5, 2020

@ALL Try latest version, I removed AccessControl on TV accessories to see if it helps, not sur however ...

And for those who have an old IOS Device (IOS 10 or prior) in your home, please try to remove it from homekit (disable homekit on that device through settings) . Since TV Accessory was not available, it seems to mess things up.

@beckern
Copy link

beckern commented Jul 5, 2020 via email

@nicoduj
Copy link
Owner

nicoduj commented Jul 5, 2020

@beckern which version your iOS device are on ? iOS 11 at least ?

@beckern
Copy link

beckern commented Jul 5, 2020 via email

@nicoduj
Copy link
Owner

nicoduj commented Jul 5, 2020

Version 13.5.1

Am 05.07.2020 um 21:19 schrieb Nicolas Dujardin notifications@github.com:


@beckern which erosion your iOS device are on ? iOS 11 at least ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Ok, but do you have any device in your home on iOS 10 or lower ? I saw on one of your config that you set ios10 mode for a plugin

@beckern
Copy link

beckern commented Jul 6, 2020 via email

@beckern
Copy link

beckern commented Jul 6, 2020

Today I have had unistall all plugins and install the harmony plugin first.
With enableing "TV Accessory in homekit" the accessory disappear after 30 seconds. No other plugin was installed.
With disableing "TV Accessory in homekit" and enableing "Switch accessory in homkit" the switches don't disappear.
Now I have installed the other plugins and all accessorys (homematic/harmony/Roborock) no more disappear.
harmony

@nicoduj
Copy link
Owner

nicoduj commented Aug 8, 2020

Hi all, I am curious about this one, Is it still occuring for some of you ? (with Tv accessories) ?

@beckern
Copy link

beckern commented Aug 13, 2020

It only works with this configuration:

#280 (comment)

@nicoduj
Copy link
Owner

nicoduj commented Nov 1, 2020

Can you try with latest version and TV accessory as an external accessory ?

@nicoduj nicoduj added the waiting for feedback Waiting for feedback from users label Nov 1, 2020
@nicoduj
Copy link
Owner

nicoduj commented Nov 11, 2020

@beckern If you can, I would like you to test with 1.4.1 if possible. I had no other reports of this, but I played with some serialization and external accessories, so maybe it will help Please note that as an external accessory you need to add the TV manually from home app.

@nicoduj
Copy link
Owner

nicoduj commented Jan 24, 2021

no other feedback, closing since it seems not widespread. Feel free to reopen if you have new informations.

@nicoduj nicoduj closed this as completed Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for feedback Waiting for feedback from users
Projects
None yet
Development

No branches or pull requests

4 participants