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

latest image not giving latest homebridge? #487

Closed andrasg closed 1 year ago

andrasg commented 1 year ago

Describe The Bug

Installing the latest tag on a pi (Linux ha-rpi 5.15.74-v8+ #1595 SMP PREEMPT Wed Oct 26 11:07:24 BST 2022 aarch64 GNU/Linux) gets me version 1.5.0 with 1.6.0 showing on the UI as being available:

image

Looks like the build process wasn't triggered for 1.6.0?

Docker Config

docker run -d \
  --net=host \
  --name=homebridge \
  --restart unless-stopped \
  -e HOMEBRIDGE_CONFIG_UI=1 \
  -e HOMEBRIDGE_CONFIG_UI_PORT=8080 \
  -e ENABLE_AVAHI=1 \
  -e MQTTTHING_URL="mqtt://192.168.20.15:1883" \
  -v /home/pi/volumemaps/homebridge/config:/homebridge \
  oznu/homebridge

Logs

No response

Host Operating System

Raspberry Pi OS - Latest

Host Architecture

aarch64 / arm64

tosate commented 1 year ago

I had the same problem. Look at this

TL;DR

andrasg commented 1 year ago

Thanks, this actually worked. Makes me think, that probably it is no such good idea to persist the complete /homebridge path onto the host when using docker...? Thinking about node_modules and other files/folder that might be version dependent.

DennisJohnsen commented 1 year ago

I had the same problem. Look at this

TL;DR

  • stop the container
  • delete the file package.json
  • start the container

Careful if you do this. This will cause your plugins to be removed (not your config though) so you will have to install the plugins again. Hopefully not having to set it all up in Homekit again - but i havn't gotten to that yet.

tosate commented 1 year ago

I have added the plug-ins to the startup.sh script. Isn't this the recommended way to install them? This way the deletion of the package.json file had no influence on my plug-ins.


#
# Docker Homebridge Custom Startup Script - oznu/homebridge
#
# This script can be used to customise the environment and will be executed as
# the root user each time the container starts.
#
# If using this to install plugins DO NOT use the global flag (-g).
#
# Example installing homebridge plugin:
#
# npm install homebridge-hue
#
# Example installing packages using default image (Alpine Linux):
#
# apk add --no-cache ffmpeg ffmpeg-libs libpcap-dev
#
# If you're running a debian based version of this container please use apt-get to install packages.
#

#npm install homebridge-knx homebridge-mqttthing homebridge-hue
npm install homebridge-knx@latest homebridge-mqttthing@latest homebridge-hue@latest
andrasg commented 1 year ago

I have added the plug-ins to the startup.sh script. Isn't this the recommended way to install them? This way the deletion of the package.json file had no influence on my plug-ins.

This is exactly the way I have it configured. Cleaning package.json, and it reinstalled all my plugins on boot using startup.sh. Had no issues.

DennisJohnsen commented 1 year ago

I have added the plug-ins to the startup.sh script. Isn't this the recommended way to install them? This way the deletion of the package.json file had no influence on my plug-ins.

This is exactly the way I have it configured. Cleaning package.json, and it reinstalled all my plugins on boot using startup.sh. Had no issues.

I have added the plug-ins to the startup.sh script. Isn't this the recommended way to install them? This way the deletion of the package.json file had no influence on my plug-ins.


#
# Docker Homebridge Custom Startup Script - oznu/homebridge
#
# This script can be used to customise the environment and will be executed as
# the root user each time the container starts.
#
# If using this to install plugins DO NOT use the global flag (-g).
#
# Example installing homebridge plugin:
#
# npm install homebridge-hue
#
# Example installing packages using default image (Alpine Linux):
#
# apk add --no-cache ffmpeg ffmpeg-libs libpcap-dev
#
# If you're running a debian based version of this container please use apt-get to install packages.
#

#npm install homebridge-knx homebridge-mqttthing homebridge-hue
npm install homebridge-knx@latest homebridge-mqttthing@latest homebridge-hue@latest

Thanks to you both. Added my plugins to startup.sh :)