homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

After upgrading to version released on 15th June, I lost all HomeBridge plugins #450

Closed maisun closed 2 years ago

maisun commented 2 years ago

Current Situation

After upgrading to the latest version released on 15th June, HomeBridge failed to load all plugins (except for config-ui plugin). Below is the package.json which lists all plugins I use:

{
  "private": true,
  "description": "This file keeps track of which plugins should be installed.",
  "dependencies": {
    "homebridge-bravia-tvos": "^5.0.8",
    "homebridge-calendar": "^0.4.0",
    "homebridge-delay-switch": "^3.0.3",
    "homebridge-harmony": "^1.6.1",
    "homebridge-hlsmartcontrol": "^1.2.0",
    "homebridge-hue-labs-switch": "^1.0.2",
    "homebridge-mi-aqara": "^0.8.1",
    "homebridge-oh2": "^0.3.8",
    "homebridge-roborock": "^0.5.5",
    "homebridge-samsung-tizen": "^5.2.3",
    "homebridge-tplink-smarthome": "^7.0.1",
    "homebridge-weather-plus": "^3.2.6",
    "homebridge-wol": "^5.0.1",
    "homebridge-xiaomi-fan": "^1.5.9",
    "homebridge-yeelighter": "^2.5.5",
    "homebridge": "^1.4.1",
    "homebridge-config-ui-x": "^4.47.0"
  }
}

When I tried to manually install plugin in HomeBridge UI the installation hangs and below is the output on screen: `USER: homebridge DIR: /var/lib/homebridge CMD: pnpm install --save homebridge-harmony@latest

Progress: resolved 79, reused 20, downloaded 0, added 0 The authenticity of host 'github.com (140.82.121.3)' can't be established. ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyProgress: resolvedProgress: resolved 775, reused 775, downloaded 0, added 0gerprint])? `

Docker Config

I use the following command to run the container, no change to startup.sh:

docker run -d --name HomeBridge \
    --restart=always \
    --net=host \
    -v /share/System/Docker/HomeBridge:/homebridge \
    --memory="2g" \
    --memory-swap="2g" \
    --cpus="1" \
oznu/homebridge:latest

Logs

Log shows the following errors for all plugins:
[6/16/2022, 11:48:09 AM] No plugin was found for the platform "WeatherPlus" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the platform "Calendar" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the platform "SamsungTizen" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the platform "xiaomifan" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the platform "HarmonyHubWebSocket" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the platform "HueLabs" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the platform "MiAqaraPlatform" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the accessory "NetworkDevice" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the accessory "XiaomiRoborockVacuum" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the accessory "HLSmartControl" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the accessory "DelaySwitch" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the accessory "DelaySwitch" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the accessory "DelaySwitch" in your config.json. Please make sure the corresponding plugin is installed correctly.
[6/16/2022, 11:48:09 AM] No plugin was found for the accessory "DelaySwitch" in your config.json. Please make sure the corresponding plugin is installed correctly.

Host Operating System

QNAP

Host Architecture

x86_64 / amd64

maisun commented 2 years ago

I think with my limited knowledge this could be the issue: The authenticity of host 'github.com (140.82.121.3)' can't be established.

oznu commented 2 years ago

The homebridge-roborock plugin seems to be the issue.

Remove it from the package.json and restart the container - or in the terminal provided by the UI run:

pnpm remove homebridge-roborock

You may want to replace it with https://www.npmjs.com/package/homebridge-xiaomi-roborock-vacuum instead.

oznu commented 2 years ago

Note that the homebridge-roborock plugin will not install with npm either, it's just broken.

maisun commented 2 years ago

Note that the homebridge-roborock plugin will not install with npm either, it's just broken

Hi @oznu : thank you for looking into it! Indeed after I removed roborock plugin everything is restored. I made the roborock plugin myself with some changes based on homebridge-xiaomi-roborock-vacuum. I assume the problem is the way how I refer to customised miio in GitHub: "dependencies": { "miio": "git://github.com/nicoh88/miio.git#master", "semver": "^7.1.2", "system-sleep": "^1.3.6" } Is there anyway to force install it (maybe some manual copy paste)? I'm quite new to javascript so not sure the correct solution to fix the problem :( Many thanks in advance!

oznu commented 2 years ago

I could not get it to install on any of the platforms I tried on.

github.com/nicoh88/miio.git does not exist.

maisun commented 2 years ago

Hi @oznu , ok thanks for looking into it, I will need to figure out how to solve the problem myself. Appreciate your help on this!

elcid2012 commented 2 years ago

I also lost my entire configuration, cached accessories, and plugins on update. I've restored to the May 21st release and a backup file so I'm back up and running, but I'm pinning my release to that until I figure out what's going on.

But I'm running some different plugins from OP on this issue, and not the roborock plugin that caused theirs to fail. Should I open a new issue or post my package.json here?