hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
551 stars 51 forks source link

[docker] Hoobs GUI tells the server is not started, but it actually is. #1099

Closed timwnl closed 3 years ago

timwnl commented 3 years ago

Description I am running Hoobs in a docker (3.3.2) and the GUI works. However, in the GUI the 'logs' option does not show anything. I can see that I can only select 'start service', however, in the log of the docker it seems that the service is running properly and my devices are showing up in HomeKit. I can control the devices too from Hoobs.

When I change the config.json and I stop and start the docker again I don't see any changes in my homekit. So I am glad everything works but I cannot change anything.

Version 3.3.2 in docker

Did you upgrade Please let us know if you upgraded from a previous version.

Pervious version If you upgraded, please let us know your previous version.

Did you orginally upgrade to HOOBS 3 from HOOBS 2.1.1? Did you perform an upgrade from HOOBS 2.1.1? Some things are different.

What device are you using? Please let us know the device you are running HOOBS on.

If this is a custom install, what's your operating system? It runs in a docker on Synology NAS

List your plugins Please include a list of the plugins you are using. We need to be able to find it on NPM. If the plugin is no published, please include a link to the repository.

All plugins are Hoobs certified https://plugins.hoobs.org/plugin/homebridge-dummy https://plugins.hoobs.org/plugin/homebridge-harmony https://plugins.hoobs.org/plugin/homebridge-hue https://plugins.hoobs.org/plugin/homebridge-ring

Post your config This can be found in the interface, Configuration -> Advanced or you can get it via SSH cat ~/.hoobs/etc/config.json

{
    "server": {
        "port": 80,
        "origin": "*",
        "autostart": 0,
        "home_setup_id": "X-HM://0023ISYWY7E15",
        "polling_seconds": 5,
        "docker": true
    },
    "client": {
        "default_route": "status",
        "inactive_logoff": 30,
        "theme": "hoobs-dark",
        "locale": "en",
        "temp_units": "celsius",
        "country_code": "NL",
        "postal_code": "secret"
    },
    "bridge": {
        "name": "HOOBS",
        "port": 51826,
        "pin": "031-45-154",
        "username": "C5:D6:3E:AA:D6:60"
    },
    "description": "",
    "ports": {},
    "accessories": [
        {
            "accessory": "DummySwitch",
            "plugin_map": {
                "plugin_name": "homebridge-dummy",
                "index": 0
            },
            "stateful": true,
            "reverse": false,
            "time": 1000,
            "resettable": false,
            "name": "Switch"
        }
    ],
    "platforms": [
        {
            "platform": "Hue",
            "plugin_map": {
                "plugin_name": "homebridge-hue"
            },
            "name": "Hue",
            "anyOn": true,
            "effects": true,
            "nativeHomeKitLights": true,
            "nativeHomeKitSensors": true,
            "resource": true,
            "lights": true,
            "linkButton": true,
            "users": {
                "secret": "secret"
            }
        },
        {
            "platform": "Ring",
            "plugin_map": {
                "plugin_name": "homebridge-ring"
            },
            "refreshToken": "secret",
            "hideLightGroups": true,
            "hideDoorbellSwitch": false,
            "hideCameraMotionSensor": false,
            "hideCameraSirenSwitch": false,
            "hideUnsupportedServices": true,
            "sendDoorbellMotionNotificationsToTv": true,
            "hideInHomeDoorbellSwitch": true,
            "hideAlarmSirenSwitch": false
        },
        {
            "platform": "HarmonyHubWebSocket",
            "plugin_map": {
                "plugin_name": "homebridge-harmony"
            },
            "hubIP": "192.168.x.x",
            "publishAllTVAsExternalAccessory": true,
            "name": "Harmony",
            "TVAccessory": true,
            "linkVolumeControlToTV": true,
            "publishSwitchActivitiesAsIndividualAccessories": true
        }
    ]
}

Post your log You can get the log from the intercafe. This is in the Log section.

HOOBS listening on port 80.
Loaded plugin 'homebridge-dummy'
[2/22/2021, 2:45:07 PM] Registering accessory 'homebridge-dummy.DummySwitch'
Loaded plugin 'homebridge-harmony'
[2/22/2021, 2:45:07 PM] Registering platform 'homebridge-harmony.HarmonyHubWebSocket'
[2/22/2021, 2:45:07 PM] The plugin "homebridge-hue" requires Node version of ^14.15.5 which does not satisfy the current Node version of v14.15.1. You may need to upgrade your installation of Node.
Loaded plugin 'homebridge-hue'
[2/22/2021, 2:45:08 PM] Registering platform 'homebridge-hue.Hue'
Loaded plugin 'homebridge-ring'
[2/22/2021, 2:45:09 PM] Registering platform 'homebridge-ring.Ring'
Loading 3 platforms...
[Hue] Initializing Hue platform...
[Hue] config.json: warning: plugin_map: ignoring unknown key
[Hue] homebridge-hue v0.12.22, node v14.15.1, homebridge v1.1.7
[Hue] warning: not using recommended node version v14.15.5 LTS
[Hue] searching bridges and gateways
[Ring] Initializing Ring platform...
[Harmony] Initializing HarmonyHubWebSocket platform...
[Harmony] HarmonyPlatform Init
Loading 1 accessories...
[Switch] Initializing DummySwitch accessory...
[Switch] Setting switch to false
[Ring] Configuring cached accessory c4dbbcf5-82ca-45d8-ac3d Deurbel
[Ring] Configuring cached accessory 546470c6-a32e-4bb1-ae9e Voortuin
[Ring] Configuring cached accessory 65b430bd-13e8-49c2-8b67 Woonkamer
[Ring] Configuring cached accessory 87adf9dd-73f1-43d5-84f8 Garage
[Ring] Configuring cached accessory d39c0fa0-8e96-4e52-8e7e Zijkant
[Ring] Configuring cached accessory 8093fcb4-6a67-480a-96ee Bel
[Ring] Configuring cached accessory a6af3356-fd4e-41f6-8d06 Bel
[Ring] Configuring cached accessory ac4a8e9d-df90-4767-86ec Thuis Mode
[Harmony] DidFinishLaunching
[Harmony] (Harmony)INFO - Loading activities...
[Harmony] (Harmony)INFO - Adding Accessory : Harmony-TV
[Harmony] (Harmony)INFO - configuring Main TV Service
[Harmony] (Harmony)INFO - Creating TV Service
[Harmony] (Harmony)INFO - Creating Input Service - Yahama
[Harmony] (Harmony)INFO - Creating Input Service - Televisie
[Harmony] (Harmony)INFO - Creating Input Service - Nintendo
[Harmony] (Harmony)WARNING - No main Activity that match config file found, default to first one
[Harmony] (Harmony)INFO - Configuring Main Activity Yahama
[Harmony] (Harmony)INFO - Creating TV Speaker Service
External port pool ran out of ports. Fallback to random assign.
[Harmony] (Harmony)INFO - setupFoundAccessories - TV accessory added as external accessory
Harmony-TV is running on port 34652.
Please add [Harmony-TV] manually in Home app. Setup Code: 031-45-154
[Ring] Found the following locations:
[Ring]   locationId: HIDDEN - Thuis
[Ring] Configuring 5 cameras and 8 devices for location "Thuis" - locationId: HIDDEN
[Hue] Philips Hue: Signify Netherlands B.V. BSB002 bridge v1943082030, api v1.42.0
[Hue] Philips Hue: 5 accessories
[Hue] masked debug info dumped to /hoobs/etc/homebridge-hue.json.gz
Initializing platform accessory 'Philips Hue'...
[Hue] Philips Hue: 3 services
Initializing platform accessory 'Tafellamp'...
Initializing platform accessory 'Wandstrip kleur'...
Initializing platform accessory 'Garage ledstrip kleur'...
Initializing platform accessory 'Hoekstrip'...
Bridge is running on port 51826.
[Hue] Hoekstrip: set homekit supported transition configuration to {"configuration":[{"iid":11,"characteristic":1},{"iid":13,"characteristic":2}]}
[Hue] Hoekstrip: set homekit transition control to ""
[Hue] Wandstrip kleur: set homekit supported transition configuration to {"configuration":[{"iid":11,"characteristic":1},{"iid":13,"characteristic":2}]}
[Hue] Wandstrip wit: set homekit supported transition configuration to {"configuration":[{"iid":25,"characteristic":1},{"iid":27,"characteristic":2}]}
[Hue] Wandstrip wit: set homekit transition control to ""
[Hue] Garage ledstrip kleur: set homekit supported transition configuration to {"configuration":[{"iid":11,"characteristic":1},{"iid":13,"characteristic":2}]}
[Hue] Garage ledstrip wit: set homekit supported transition configuration to {"configuration":[{"iid":25,"characteristic":1},{"iid":27,"characteristic":2}]}

Additional context I noticed two 'strange' log items which I couldn't figure out. I am a bit reluctant in upgrading Node. Had some bad experience in the past:

1 - [2/22/2021, 2:45:07 PM] The plugin "homebridge-hue" requires Node version of ^14.15.5 which does not satisfy the current Node version of v14.15.1. You may need to upgrade your installation of Node. 2 - External port pool ran out of ports. Fallback to random assign.

mkellsy commented 3 years ago

The node version is an automated message from the Hue plugin. As long as you are on version 14.15.x you're fine.

The External port pool ran out of ports message is what is causing the running flag to not be set to true. The UI uses that running flag to show it's running.

To fix this look at the harmony config, is there a start and end port? Simply increase the range. If not do you have the port pool set in the Apple config section. You can try removing these values so it auto assigns, or increase the pool size.

timwnl commented 3 years ago

Hmm I did set the port range (from 10000 to 20000) and noticed that Harmony-TV indeed starts using port 10000.

I don't see the the external port pool error anymore, but still I cannot use the GUI in any way (same situation, bridge not running). Even increased the pool to 50000 same result.

Also removed the ports and kept the port range name. Harmony got a random port but the GUI flag is not set.

@mkellsy Any other idea how to set the running flag?

timwnl commented 3 years ago

Hi @mkellsy, any idea. Or anyone else can point me in the right direction?

All plugins I use are homebridge compatible so I am a bit lost.

mkellsy commented 3 years ago

I've been trying to reproduce this, however mine is working. Once I am able to reproduce, I can trace the code and find out what's going on.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.