marcoraddatz / homebridge-docker

Dockerized Homebridge. No plugins pre-defined, hassle-free setup. Read instructions!
Apache License 2.0
127 stars 47 forks source link

Homebridge Docker stopping unexpectedly every minute. #37

Closed bajeez closed 6 years ago

bajeez commented 6 years ago

I've been using Homebridge successfully for half a year. Last week I updated DSM to 6.1.4-15217 Update 2 and Docker version 17.05.0-0349 to and now I can't get homebridge to run. According to the log, it doesn't appear to be installing the most recent versions of Homebridge or npm. Can anyone provide some insight?

I'm running marcoraddatz/homebridge: latest .

My install.sh:

#!/bin/bash

npm install -g homebridge-synology
npm install -g homebridge-lifx-lan
npm install -g homebridge-platform-wemo

My config.jsaon:

{
  "bridge": {
    "name": "Homebridge",
    "username": "CC:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-154"
  },
  "description": "Muh Hoom",
  "platforms": [
    {
     "platform": "BelkinWeMo",
     "name": "WeMo Platform"
    },
    {
      "platform": "Lifx-Lan",
      "name": "LiFx",
      "access_token": "cee1a73f9e81c67e00294ce90750461dd8cd921aa2a2fdf10db4063ebdca6c24"
    }
  ]
}

The log file (is long... sorry): marcoraddatz-homebridge1_Log.pdf

marcoraddatz commented 6 years ago

NPM and Homebridge are provided with the image. Try to use the develop branch or set the version via .env to "latest". It might fix this error:

Error: Plugin /usr/local/lib/node_modules/ homebridge-lifx-lan requires a HomeBridge version of >=0.4.29 which does not satisfy the current HomeBridge version of 0.4.27.

bajeez commented 6 years ago

thanks. I tried the develop image on it's own and then with the .env set to "latest". neither solved the issue.

.env:

# Options are debug, development and production
# Default environment is "production"
# See https://github.com/marcoraddatz/homebridge-docker/tree/develop#plugin-development for more info
HOMEBRIDGE_ENV=development

# Options are release tags (f.e. "0.4.16"), "latest" or NPM ranges
# Default version is "latest"
# See https://docs.npmjs.com/cli/install for more info
HOMEBRIDGE_VERSION=latest

Log: Log 2.txt

deadbone commented 6 years ago

Hello Can you try when adding in your install.sh : npm install -g commander

Your logs indicates that the package is missing and I have sometimes this error

(And add every package which could be missing)

bajeez commented 6 years ago

thanks, I tried that, but no joy. as far as adding other packages which could be missing, I just don't know enough to know what's missing and if adding it to the install.sh would be the solve.

added:

#!/bin/bash

npm install -g commander
npm install -g homebridge-synology
npm install -g homebridge-lifx-lan
npm install -g homebridge-platform-wemo

Log 3.txt

Troubadoure commented 6 years ago

I've got the same issue. Running Homebridge in debug outputs the following:

2017-12-8 17:50:41] ERROR LOADING PLUGIN homebridge-lifx-lan:
[2017-12-8 17:50:41] Error: Plugin /usr/local/lib/node_modules/homebridge-lifx-lan requires a HomeBridge version of >=0.4.29 which does not satisfy the current HomeBridge version of 0.4.27. You may need to upgrade your installation of HomeBridge.
    at Plugin.load (/usr/local/lib/node_modules/homebridge/lib/plugin.js:56:11)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:132:14)
    at Array.forEach (<anonymous>)
    at Server._loadPlugins (/usr/local/lib/node_modules/homebridge/lib/server.js:128:22)
    at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:51:24)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:26:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
[2017-12-8 17:50:41] ====================

Updated to dev branch and is now up and running but can't detect anything

GravityRZ commented 6 years ago

I have Docker 17.05.0-0349 dsm 6.1.4-15217 update 3 and do not experience these things.

where can i check what homebridge image version i am using i see nothing resembling v4 or later

in the log it states npm@5.3.0 node@8.4.0

what would be the best way to update. put a .env file in place and stop/.start or just download the latest image

smoochy commented 6 years ago

You can check with the following command:

npm outdated -g