homebridge / homebridge

HomeKit support for the impatient.
https://homebridge.io
Apache License 2.0
23.99k stars 1.98k forks source link

Homebridge v1.30 update kills main bridge #2820

Closed fLyRhyTHeMz closed 3 years ago

fLyRhyTHeMz commented 3 years ago

Describe The Bug:

After updating to HB v 1.30 all existing devices go unresponsive. Checking the bridge settings in the home app shows that the firmware version still shows 1.25. Interestingly, Child bridges and accessories under them work just fine, and the child bridges show correct firmware, 1.30. Seems like something in the update process is preventing HomeKit from seeing the updated main instance. To Reproduce:

  1. Open home app and watch, update homebridge, all devices unresponsive. check bridge firmware, still shows 1.25

  2. Add plugin, move to child bridge, pair bridge, plugin and accessories work. check bridge firmware, shows 1.30.

  3. Remove child bridge, downgrade homebridge to 1.25, all accessories once again respond in home app.

Expected behavior:

Main instance/bridge of homebridge should update to 1.30 and reflect updates in homekit and allow devices to interact

[Logs:]()

Logs do not throw any errors and show homebridge to be functioning fine.

Secondary Homebridge Logs here

Homebridge Config:

Show your homebridge config.json here

Screenshots:

Environment:

masterfordev commented 3 years ago

I read somewhere that you should enable and disable airplane mode to clear the cache (that on your iDevice). Try that.

oznu commented 3 years ago

Open home app and watch, update homebridge, all devices unresponsive. check bridge firmware, still shows 1.25

Add plugin, move to child bridge, pair bridge, plugin and accessories work. check bridge firmware, shows 1.30.

Remove child bridge, downgrade homebridge to 1.25, all accessories once again respond in home app.

You've just done a very round about way of clearing the cache.

fLyRhyTHeMz commented 3 years ago

Okay so I've done some further testing.

Tried both mdns options, and tried to clear iphone cache via airplane mode.

Also checked status on other devices and other homekit house members. As soon as update to 1.3 is done accessories stop responding.

Gonna leave it on 1.25 for now.

I'm running 14.5 Pb 2 on primary iphone, but other devices, other home member devices and homekit hub (apple tv) are all on current releases.

Logs don't give any useful info as everything looks like it's up and running. I feel as though if I deleted the bridge, cleared it's cache and repaired it with homekit it would probably work, but I have over 100+ accessories and cameras with numerous automations so I'm going to stay on 1.25 for now.

Let me know if there's any additional info I can provide.

jianyu-li commented 3 years ago

Thanks for opening the issue. I am having the same problem as well

thecem commented 3 years ago

Same for me.

thecem commented 3 years ago

I could manage it! Do following:

thecem commented 3 years ago

additional I had to deactivate "Ozone" and "AirPressure" in "Homebridge Weather Plus", otherwise some devices where unresponsive.

MerlinDE commented 3 years ago

I did initially switch on the child bridge option for my accessories. Only then I got into trouble. Even after switching that off, they showed up under Homebridge Settings / Unpair Bridges. Unpairing everything there didn’t get me anywhere. I now don’t have anything from Homebridge in HomeKit, Homebridge doesn’t show up as a bridge in HomeKit anymore, but I also can’t pair it again, as Apple Home either states Homebridge to already being paired or being uncertified.

MerlinDE commented 3 years ago

I've tried an install from scratch now (homebridge+ homebridge-config-ui-x+ hb-service) and still get stuck adding Homebridge as an accessory to HomeKit.

I could imagine that the issue is related to the network issues mentioned in #2781.

Reverting Homebridge to v1.25 didn't fix the issue for me.

MerlinDE commented 3 years ago

Completely nuking node from the machine and re-installing everything from scratch finally did the trick. So I assume the issues originated in some old versions of node libs somewhere on the machine.

tickez commented 3 years ago

I had to move the Weather Plus plugin to its own bridge to get the main bridge working again.

staryga commented 3 years ago

hi. same problem here (macOS). tried airplane mode with no luck. downgraded to 1.2.5 and all good. will wait for 1.3.1

DJBenson commented 3 years ago

Just upgraded my network to 1.3.0 but had to roll back almost immediately. I have 7 bridges (to segregate problematic plugins, which the child bridge feature should hopefully make redundant) so tried one bridge which has homebridge-hue and a few other "critical" plugins on and all my devices went unresponsive. Reverted to 1.2.5 and all devices sprung back to life.

Have to say this is the first upgrade (outside of betas, but even they've been solid for me) that I've had to revert so I'm glad the team made reverting so easy.

realdannys commented 3 years ago

Yes unfortunately same for me - no communication with devices. Unfortunately trying to get it work caused all kinds of issues an i've ended up rolling back to 1.2.5 but having all my devices re-added thus losing all automation and room assigning, sigh.

jianyu-li commented 3 years ago

Yes unfortunately same for me - no communication with devices. Unfortunately trying to get it work caused all kinds of issues an i've ended up rolling back to 1.2.5 but having all my devices re-added thus losing all automation and room assigning, sigh.

Same here. I used home+ to restore my HomeKit as much as it could but there was still a lot I had to manually fix

bondskin commented 3 years ago

switched to 1.3.0 Now all my devices connected via homebridge are reported as "not responding" in Homekit Homebridge running on Raspberry Pi 5.10.11-v7l. I tried Bonjour and Ciao options, same result. Within homebridge / log everything looks good except a few plugin issues like "This plugin slows down Homebridge."

Switching back to 1.2.5 via Homebridge GUI fixed the issues. That rollback was super smooth, thank you for this feature

maisun commented 3 years ago

Same problem here. Strangely all TV accessories under the same bridge seems to work....

NorthernMan54 commented 3 years ago

For folks having issues with the child bridge feature, did you read the release notes and the steps needed after enabling the feature?

After restarting Homebridge, you will need to pair the child bridge separately, either by scanning the QR code shown for the accessory or platform in the Homebridge UI; or manually:

Enabling the feature is a bit of a trade off between the pain point of pairing your accessories again, setting up your rooms and automations again versus the increased reliability, stability, and responsiveness of child bridges. For me the pain point of setting everything up again was worth the minor effort. And by knowing it was going to occur I took screen shots of my automations so I could recreate them again.

realdannys commented 3 years ago

For folks having issues with the child bridge feature, did you read the release notes and the steps needed after enabling the feature?

After restarting Homebridge, you will need to pair the child bridge separately, either by scanning the QR code shown for the accessory or platform in the Homebridge UI; or manually:

Enabling the feature is a bit of a trade off between the pain point of pairing your accessories again, setting up your rooms and automations again versus the increased reliability, stability, and responsiveness of child bridges. For me the pain point of setting everything up again was worth the minor effort. And by knowing it was going to occur I took screen shots of my automations so I could recreate them again.

Yes of course, but for many of us, it's crashing before you can even pair the new accessory. I'm having both errors.

donavanbecker commented 3 years ago

Yes of course, but for many of us, it's crashing before you can even pair the new accessory. I'm having both errors.

Do you have logs? Do you have info about your setup? What plugins? Etc.

maisun commented 3 years ago

Rollback to 1.2.5 everything works again. I'm not sure I understand child bridge, but all my accessories are under the "main" bridge.

donavanbecker commented 3 years ago

Rollback to 1.2.5 everything works again.

I'm not sure I understand child bridge, but all my accessories are under the "main" bridge.

What does your setup look like?

maisun commented 3 years ago

Rollback to 1.2.5 everything works again. I'm not sure I understand child bridge, but all my accessories are under the "main" bridge.

What does your setup look like?

I run homebridge-config-ui in docker. I have dozens of internal accessories and external accessories (cameras, TVs etc.) All internal accessories show "no response" after upgrade. I also notice some warning regarding air pressure. All TVs work fine in Home app, and via homebridge ui all accessories also seem Ok, but just not working in Home app.

fLyRhyTHeMz commented 3 years ago

All TVs work fine in Home app, and via homebridge ui all accessories also seem Ok, but just not working in Home app.

I experienced this too. My harmony accessory worked fine, while everything else wasn't. I'm guessing it's because the TV's pair independently of the main bridge and have to be added separately.

donavanbecker commented 3 years ago

All internal accessories show "no response" after upgrade. I also notice some warning regarding air pressure. All TVs work fine in Home app, and via homebridge ui all accessories also seem Ok, but just not working in Home app.

Which plugins?

Do you have logs?

Anything we can go off of to see why your setup isn't working.

maisun commented 3 years ago

All internal accessories show "no response" after upgrade. I also notice some warning regarding air pressure. All TVs work fine in Home app, and via homebridge ui all accessories also seem Ok, but just not working in Home app.

Which plugins?

Do you have logs?

Anything we can go off of to see why your setup isn't working.

Plugins: 1) Homebridge Bravia Tvos work fine 2) Homebridge Camera FFmpeg work fine 3) Homebridge Harmony work fine 4) Homebridge Mi Aqara no response 5) Homebridge Tplink Smarthome no response 6) Homebridge WoL no response 7) Homebridge Weather Plus no response 8) homebridge-yeelighter no response 9) homebridge-openhab2-complete no response 10) Homebridge Camera FFmpeg forgot to check before rolling back to 1.2.5

Basically all internal accessories stop working (with no exception), external TV accessories seem to work, I forgot to check cameras but I assume they work too. Sorry I can't post log as there are too many sensitive info there, but I checked the log the only issue is the warning of air pressure (from weather plus plugin), no other error I can find in logs. Hope it helps!

donavanbecker commented 3 years ago

@maisun 1 plugin can cause the whole bridge to go unresponsive. So you need to find the plugin that is causing it.

And reference this.

maisun commented 3 years ago

@maisun 1 plugin can cause the whole bridge to go unresponsive. So you need to find the plugin that is causing it.

I see, good point! I will dig into the old log and see if I find any other trace. Strange though in homebridge UI all accessories are listed and seem to work. I saw somebody mentioned before: "additional I had to deactivate "Ozone" and "AirPressure" in "Homebridge Weather Plus", otherwise some devices where unresponsive." Could that be the cause??

donavanbecker commented 3 years ago

@maisun if your okay with resetting up automations on that plugin. I would try disabling that plugin through homebridge UI and start there.

maisun commented 3 years ago

Just paste the warning I found in the log: .[37m[2/20/2021, 8:18:40 PM] .[39m.[36m[homebridge-roborock].[39m This plugin generated a warning from the characteristic 'On': characteristic was supplied illegal value: undefined! This might throw errors in the future! See https://git.io/JtMGR for more info.

.[37m[2/20/2021, 8:18:40 PM] .[39m.[36m[homebridge-weather-plus].[39m This plugin generated a warning from the characteristic 'Air Pressure': c haracteristic was supplied illegal value: number 1017 exceeded maximum of 255. See https://git.io/JtMGR for more info.

.[37m[2/20/2021, 8:18:42 PM] .[39m.[36m[homebridge-oh2].[39m This plugin generated a warning from the characteristic 'Current Temperature': cha racteristic was supplied illegal value: number 35.1 exceeded maximum of 35. See https://git.io/JtMGR for more info.

Other than the warnings I don't see any other obvious errors.

maisun commented 3 years ago

@maisun if your okay with resetting up automations on that plugin. I would try disabling that plugin through homebridge UI and start there.

Hi, thanks! I'd like to wait and try until the air pressure and temperature limits are "fixed". I have many automations depending on temperature (thermostat, water heater, geothermal all use temperature above 35).

donavanbecker commented 3 years ago

@maisun makes sense, an issue is open with the plugin?

Also setting up child bridges would help with any problem plugins. So if you want to slowly move plugins over to child bridges that would also help, but you would loose your automations.

maisun commented 3 years ago

Also setting up child bridges would help with any problem plugins. So if you want to slowly move plugins over to child bridges that would also help, but you would loose your automations.

Nice are the above features new in 1.3.0 (I can't disable plugin in 1.2.5)? I'm not quite sure what is child bridge and how it works, any documents on this subject? Thanks!!

maisun commented 3 years ago

Hi again, just did some quick test and I can confirm homebridge-weather-plus v3.2.4 is the root cause. After disabling it everything works now :)

fLyRhyTHeMz commented 3 years ago

Hi again, just did some quick test and I can confirm homebridge-weather-plus v3.2.4 is the root cause. After disabling it everything works now :)

Can confirm. Removed weather and weather plus, update went through without any issues and home app now shows correct firmware for main bridge. Will try to add back under child bridges and circle back, but it seems like Weather Plus is the wayward plugin . It may be prudent to add something in 1.31 with a warning screen about the plugin and have it be disabled upon updating automatically.

realdannys commented 3 years ago

Same for me, removed Weather Plus and 1.3 works now - I wasn't really using the Weather widgets and was planning to remove them anyway - I use SmartThings for weather based automations.

I however can't use any child bridges, tried a few plugins and they all result in this

[2/20/2021, 10:13:58 PM] [Tahoma] Launched external bridge with PID 23493
[2/20/2021, 10:13:58 PM] TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'ControllerStorage'
    |     property 'linkedAccessories' -> object with constructor 'Array'
    |     index 0 -> object with constructor 'ControllerStorage'
    --- property 'parent' closes the circle
    at stringify (<anonymous>:null:null)
    at writeChannelMessage (node:internal/child_process/serialization:120:20)
    at ChildProcess.target._send (node:internal/child_process:822:17)
    at ChildProcess.target.send (node:internal/child_process:722:19)
    at ChildBridgeService.sendMessage (/usr/local/lib/node_modules/homebridge/lib/childBridgeService.js:170:24)
    at ChildBridgeService.loadPlugin (/usr/local/lib/node_modules/homebridge/lib/childBridgeService.js:224:14)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/childBridgeService.js:129:26)
    at ChildProcess.emit (node:events:378:20)
    at emit (node:internal/child_process:920:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

ERROR: uncaughtException: Converting circular structure to JSON
    --> starting at object with constructor 'ControllerStorage'
    |     property 'linkedAccessories' -> object with constructor 'Array'
    |     index 0 -> object with constructor 'ControllerStorage'
    --- property 'parent' closes the circle
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'ControllerStorage'
    |     property 'linkedAccessories' -> object with constructor 'Array'
    |     index 0 -> object with constructor 'ControllerStorage'
    --- property 'parent' closes the circle
    at stringify (<anonymous>:null:null)
    at writeChannelMessage (node:internal/child_process/serialization:120:20)
    at ChildProcess.target._send (node:internal/child_process:822:17)
    at ChildProcess.target.send (node:internal/child_process:722:19)
    at ChildBridgeService.sendMessage (/usr/local/lib/node_modules/homebridge/lib/childBridgeService.js:170:24)
    at ChildBridgeService.loadPlugin (/usr/local/lib/node_modules/homebridge/lib/childBridgeService.js:224:14)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/childBridgeService.js:129:26)
    at ChildProcess.emit (node:events:378:20)
    at emit (node:internal/child_process:920:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[2/20/2021, 10:13:58 PM] Got SIGTERM, shutting down Homebridge...
[2/20/2021, 10:13:58 PM] Got SIGTERM, shutting down child bridge process...
donavanbecker commented 3 years ago

@maisun here is the info on the child bridges.

fLyRhyTHeMz commented 3 years ago

Hi again, just did some quick test and I can confirm homebridge-weather-plus v3.2.4 is the root cause. After disabling it everything works now :)

Can confirm. Removed weather and weather plus, update went through without any issues and home app now shows correct firmware for main bridge. Will try to add back under child bridges and circle back, but it seems like Weather Plus is the wayward plugin . It may be prudent to add something in 1.31 with a warning screen about the plugin and have it be disabled upon updating automatically.

Did some more testing. Tried installing weather plus and segregating to child bridge. The installation threw a bunch of errors and failed commands. When trying to pair child bridge, HomeKit threw and error: "accessory is out of compliance". Weather plus seems non-functional for now.

donavanbecker commented 3 years ago

@realdannys That would still be a plugin issue, But you can slowly move plugins to child bridges.

jianyu-li commented 3 years ago

Like everyone else here, I uninstalled Weather plus and updated. Now everything works again

DJBenson commented 3 years ago

I don't use Weather Plus but I got the unresponsive issue on 1.3.0 - I do have some weather-based sensors (tempeature, air pressure etc.) running via Homebridge-Hue/deCONZ - could there be a more generic issue with weather-related plugins or the data they provide?

I don't have the time right now to isolate the problematic plugin (if indeed there is one) - as I mentioned in my post, I have six homebridge instances running with various plugins of various criticality and the upgrade to 1.3.0 killed them all.

EDIT: My o/p says 7 bridges, it is seven but one of them is purely for messing around with before the plugin is "promoted" to one of the other six 😉

Instance 1: Homebridge UI Homebridge Alexa Homebridge Evohome Homebridge Homeconnect Homebridge Hue Homebridge Nest

Instance 2: Homebridge UI Homebridge Bravia Homebridge Plex Sensors Homebridge ZP

Instance 3: Homebridge UI Homebridge Camera ffmpeg Homebridge Camera UI Homebridge Sss Platform

Instance 4: Homebridge UI Homebridge Igenix Air Conditioner

Instance 5: Homebridge UI Homebridge Edomoticz Homebridge Mqttthing Homebridge NUT Homebridge Script2 Homebridge Synology Homebridge Unifi Led Control Homebridge Unifi Occupancy Sensor

Instance 6: Homebridge UI Homebridge Messenger

Instance 7/Test: Homebridge UI

NorthernMan54 commented 3 years ago

@DJBenson Homebridge-Hue/deCONZ was validated by ebaauw but one of your other plugins could be triggering the issue.

The issue with weather-plus was triggered by custom characteristics with a typo in the definition so a similar issue could exist in other plugins.

oznu commented 3 years ago

@realdannys re: https://github.com/homebridge/homebridge/issues/2820#issuecomment-782757633

I was able to replicate this by creating a circular structure in another non-child-bridged plugin at runtime. Please try the current Homebridge beta which should prevent this error from occurring.

https://github.com/homebridge/homebridge/wiki/Homebridge-Beta-Testing

bondskin commented 3 years ago

Weather Plus got updated to make it compatible but I still have the same issue when I go to 1.3.0 because of other plugins (at least [https://github.com/honkmaster/homebridge-mi-flower-care] which is still impacting the whole homebridge installation. I reverted back to 1.2.5 and I need to wait until all plugins have been made compatible or a newer HB version is less sensitive.

fLyRhyTHeMz commented 3 years ago

Weather Plus got updated to make it compatible

Can confirm. Got the update this morning, re-enabled the plugin and sequestered it to a child bridge. Everything is working as it should.

maisun commented 3 years ago

Same here the new version works now with 1.3.0. Thanks for the quick fix!!

oznu commented 3 years ago

For those still facing issues with 1.3.0; could you try the current beta build and let me know if anything changes for you?

https://github.com/homebridge/homebridge/wiki/Homebridge-Beta-Testing

DJBenson commented 3 years ago

@oznu I was one of the people who 1.3.0 didn't work for, despite most/all of the plugins having been verified as working. I've just upgraded instance 1 (list of plugins below) and it works. So whatever changed from 1.3.0 to v1.3.1-beta.3 fixed the issue I was having as I did nothing else but upgrade.

Instance 1: Homebridge UI Homebridge Alexa Homebridge Evohome Homebridge Homeconnect (I think this is the only plugin not verified for 1.3.0 but it works with v1.3.1-beta.3) Homebridge Hue Homebridge Nest

oznu commented 3 years ago

Thanks for the update @DJBenson. That's good news.

realdannys commented 3 years ago

@realdannys re: #2820 (comment)

I was able to replicate this by creating a circular structure in another non-child-bridged plugin at runtime. Please try the current Homebridge beta which should prevent this error from occurring.

https://github.com/homebridge/homebridge/wiki/Homebridge-Beta-Testing

Yes, the beta fixed this for me, am now able to that plugin in a bridge - all is working fine for me now and I guess I can install weather plus again too.