ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
901 stars 91 forks source link

Hue - "[Hue] no bridges or gateways found - retrying in 30 seconds" #880

Closed casperse closed 3 years ago

casperse commented 3 years ago

Description A keep getting this in the log file, it delays loading of the other plugins '8I tried to remove it) "[Hue] no bridges or gateways found - retrying in 30 seconds"

The strange thing is that the Hue plugin is connected, and I can turn and change colours on the HOOBs webpage The log file also shows it is working:

1/6/2021, 7:36:29 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/6/2021, 7:36:29 PM [Hue] Entertainment aktivitetsrum: set homekit any on from 1 to 0 1/6/2021, 7:36:29 PM [Hue] Gamer PC: set homekit on from 1 to 0 1/6/2021, 7:36:29 PM [Hue] Gamer PC: set homekit any on from 1 to 0 1/6/2021, 7:36:29 PM [Hue] Gamer PC: set homekit brightness from 55% to 24% 1/6/2021, 7:36:30 PM [Hue] no bridges or gateways found - retrying in 30 seconds

Expected behavoir Stop flooding the system with: "[Hue] no bridges or gateways found - retrying in 30 seconds" When it clearly is connected? :-)

Or should I just ignore this?

Plugin name HOOBS Certified Hue 0.12.11 published 12/13/2020 HOOBS plugin for Philips Hue and deCONZ

Config file in HOOBs: { "platform": "Hue", "plugin_map": { "plugin_name": "homebridge-hue" }, "name": "Hue", "anyOn": true, "effects": true, "nativeHomeKitLights": true, "nativeHomeKitSensors": true, "nupnp": true, "resource": true, "forceHttp": true, "groups": true, "excludeSensorTypes": [ "Daylight", "CLIP", "Geofence" ], "hosts": [ "192.168.0.29" ], "users": { "EC55FAF6FE269A5F": "8kgoLEn2wfWW4sbO5AZNAw65JErh6AFxC9fTAucr" }, "heartrate": 10, "sensors": true, "scenes": false, "scenesAsSwitch": false, "rules": false, "rooms": false, "linkButton": false },

Debug Files

ebaauw commented 3 years ago

What’s your full config.json? I think you specified Hue twice under platforms.

casperse commented 3 years ago

Thanks for reaching out! much appriciated Here is the full config file: (I started by using the UI in HOOBS to set it up)

{
    "server": {
        "port": 80,
        "origin": "*",
        "autostart": 0,
        "home_setup_id": "X-HM://002XXXXWYNHPO",
        "polling_seconds": 5,
        "docker": true
    },
    "client": {
        "default_route": "status",
        "inactive_logoff": 30,
        "theme": "hoobs-dark",
        "locale": "en",
        "temp_units": "celsius",
        "country_code": "DK",
        "postal_code": "XX00"
    },
    "bridge": {
        "name": "HOOBS",
        "port": 51826,
        "pin": "XXX-45-154",
        "username": "BC:XXXXXXX"
    },
    "description": "",
    "ports": {},
    "accessories": [
        {
            "accessory": "SonoffTasmotaHTTP",
            "name": "Tidsstyret Havebelysning",
            "hostname": "192.168.0.28",
            "plugin_map": {
                "plugin_name": "homebridge-sonoff-tasmota-http",
                "index": 0
            }
        },
        {
            "accessory": "SonoffTasmotaHTTP",
            "name": "Forlængerledning",
            "hostname": "192.168.0.27",
            "plugin_map": {
                "plugin_name": "homebridge-sonoff-tasmota-http",
                "index": 0
            }
        }
    ],
    "platforms": [
        {
            "platform": "HarmonyHubWebSocket",
            "plugin_map": {
                "plugin_name": "homebridge-harmony"
            },
            "name": "HUB-STUE",
            "hubIP": "192.168.0.165",
            "otherPlatforms": [
                {
                    "name": "HUB-AKTIVITET",
                    "hubIP": "192.168.0.166"
                }
            ],
            "TVAccessory": false,
            "switchAccessories": true,
            "linkVolumeControlToTV": false,
            "publishGeneralVolumeSwitches": false,
            "publishGeneralMuteSwitch": false,
            "cleanCache": false,
            "publishAllTVAsExternalAccessory": false
        },
        {
            "platform": "SmartThings-v2",
            "plugin_map": {
                "plugin_name": "homebridge-smartthings"
            },
            "name": "SmartThings-v2",
            "direct_port": 8000,
            "temperature_unit": "C",
            "validateTokenId": false,
            "logConfig": {
                "debug": false,
                "showChanges": true,
                "hideTimestamp": true,
                "hideNamePrefix": true,
                "file": {
                    "enabled": true,
                    "level": "Good"
                }
            },
            "app_url": "https://graph-eu01-euwest1.api.smartthings.com:443/api/smartapps/installations/",
            "app_id": "XXXXXX",
            "access_token": "XXXXX"
        },
        {
            "platform": "UniFi Protect",
            "plugin_map": {
                "plugin_name": "homebridge-unifi-protect"
            },
            "controllers": [
                {
                    "address": "192.168.0.1",
                    "username": "HA",
                    "password": "XXXXXXX"
                }
            ]
        },
        {
            "platform": "Landroid",
            "plugin_map": {
                "plugin_name": "homebridge-landroid"
            },
            "email": "XXXXXX@gmail.com",
            "pwd": "XXXXXX,
            "rainsensor": true,
            "debug": false,
            "mowdata": true
        },
        {
            "platform": "ZP",
            "forceS2": true,
            "brightness": true,
            "speakers": false,
            "excludeAirPlay": false,
            "plugin_map": {
                "plugin_name": "homebridge-zp"
            },
            "name": "Sonos",
            "service": "switch"
        },
        {
            "platform": "Hue",
            "plugin_map": {
                "plugin_name": "homebridge-hue"
            },
            "name": "Hue",
            "anyOn": true,
            "effects": true,
            "nativeHomeKitLights": true,
            "nativeHomeKitSensors": true,
            "nupnp": true,
            "resource": true,
            "forceHttp": true,
            "groups": true,
            "excludeSensorTypes": [
                "Daylight",
                "CLIP",
                "Geofence"
            ],
            "hosts": [
                "192.168.0.29"
            ],
            "users": {
                "ECB5FAFXXXXXXXXXF": "8kgoLEn2wfWW2sbOQAZNAwY5XXXXXXXXX"
            },
            "heartrate": 10,
            "sensors": true,
            "scenes": false,
            "scenesAsSwitch": false,
            "rules": false,
            "rooms": false,
            "linkButton": false
        }
    ]
}
ebaauw commented 3 years ago

I'm sorry, I have no idea what's happening. Best contact HOOBS support.

I'll add a check that Homebridge Hue is started only once in the next version.

ebaauw commented 3 years ago

Could you try v0.12.13? Install through the Homebridge UI or through sudo npm -g i homebridge-heu@next.

That version should give a warning when more than one instance of Homebridge Hue is activated in the same Homebridge instance. If the error still occurs, please capture and attach a full debug log file and also attach the debug dump file (see README).

casperse commented 3 years ago

Sorry I have tried allot of different things and now I dont get the double HUE log but just while loading I get this: Initializing platform accessory 'Haven - Lily 4'... Initializing platform accessory 'Soveværelse switch'... Initializing platform accessory 'Stue switch'... Initializing platform accessory 'Haven - Outdoor motion 1'... Initializing platform accessory 'Hue outdoor temp. sensor 1'... Initializing platform accessory 'Entre - Indoor motion 1'... Initializing platform accessory 'Hue temperature sensor 1'... Initializing platform accessory 'Haven - Outdoor motion 2'... Initializing platform accessory 'Hue outdoor temp. sensor 2'... [Hue] goodbye

I have tried to google this? is it a overload? I tried to do another HOOBS install and restore my config for HUE :-)

ebaauw commented 3 years ago

Please capture and attach a full debug log file and also attach the debug dump file (see README).

casperse commented 3 years ago

I will do that just after my effort to install everything from scratch and every plugin to see if its one of the other plugins So far I have installed 3 and when I get to the Harmony plugin I can see this in the log file: 1/9/2021, 10:06:24 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:06:26 PM [Hue] searching bridges and gateways 1/9/2021, 10:06:31 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:06:36 PM [Hue] searching bridges and gateways 1/9/2021, 10:06:41 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:06:42 PM [Udendoerslys] Sonoff HTTP: 192.168.0.26, Relay , Get State: {"POWER":"ON"} 1/9/2021, 10:06:42 PM [Forlaengerledning] Sonoff HTTP: 192.168.0.27, Relay , Get State: {"POWER":"ON"} 1/9/2021, 10:06:42 PM [Tidsstyret Havebelysning] Sonoff HTTP: 192.168.0.28, Relay , Get State: {"POWER":"ON"} 1/9/2021, 10:06:51 PM [Hue] searching bridges and gateways 1/9/2021, 10:06:54 PM [Hue] searching bridges and gateways 1/9/2021, 10:06:56 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:06:59 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:07:01 PM [Hue] searching bridges and gateways 1/9/2021, 10:07:06 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:07:11 PM [Hue] searching bridges and gateways 1/9/2021, 10:07:16 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:07:26 PM [Hue] searching bridges and gateways 1/9/2021, 10:07:29 PM [Hue] searching bridges and gateways 1/9/2021, 10:07:31 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:07:34 PM [Hue] no bridges or gateways found - retrying in 30 seconds 1/9/2021, 10:07:36 PM [Hue] searching bridges and gateways 1/9/2021, 10:07:41 PM And my configuration is only these 3 plugins not the Hue plugin: { "server": { "port": 80, "origin": "*", "autostart": 0, "home_setup_id": "X-HM://0023ISYWY6993", "polling_seconds": 5, "docker": true }, "client": { "default_route": "status", "inactive_logoff": 30, "theme": "hoobs-dark", "locale": "en", "temp_units": "celsius", "country_code": "DK", "postal_code": "2700", }, "bridge": { "name": "HOOBS", "port": 51826, "pin": "031-45-154", "username": "80:E8:4E:E5:DD:69" }, "description": "", "ports": {}, "accessories": [ { "accessory": "SonoffTasmotaHTTP", "name": "Tidsstyret Havebelysning", "hostname": "192.168.0.28", "plugin_map": { "plugin_name": "homebridge-sonoff-tasmota-http", "index": 0 } }, { "accessory": "SonoffTasmotaHTTP", "name": "Forlaengerledning", "hostname": "192.168.0.27", "plugin_map": { "plugin_name": "homebridge-sonoff-tasmota-http", "index": 0 } }, { "accessory": "SonoffTasmotaHTTP", "name": "Udendoerslys", "hostname": "192.168.0.26", "plugin_map": { "plugin_name": "homebridge-sonoff-tasmota-http", "index": 0 } } ], "platforms": [ { "platform": "HarmonyHubWebSocket", "plugin_map": { "plugin_name": "homebridge-harmony" }, "name": "HUB-STUE", "hubIP": "192.168.0.165", "otherPlatforms": [ { "name": "HUB-AKTIVITET", "hubIP": "192.168.0.166" } ], "TVAccessory": false, "switchAccessories": true, "linkVolumeControlToTV": false, "publishGeneralVolumeSwitches": false, "publishGeneralMuteSwitch": false, "cleanCache": false, "publishAllTVAsExternalAccessory": false } ] }

So this could be the plugin causing this?

casperse commented 3 years ago

Sorry wrong button... still working on the problem :-)

casperse commented 3 years ago

Ok tried to follow the readme file but I am running this from a Docker and through the console I can get: /usr/src/hoobs # cd ~/.hoobs ~/.hoobs #

And I have the Terminal window in HOOBS? /hoobs/etc #

And I cannot get the command working to capture and attach a full debug log file and also attach the debug dump file (Yes I did read the Readme file in the code section)

casperse commented 3 years ago

I got to the Smartthings and then I got this.... (Maybee its a bad idea to have two running dockers of HOOBS while trouble shooting? They are on different ports but is this why I now see it crashing like this:

`1/9/2021, 11:10:20 PM INFO: SmartThings-v2 Plugin Version: 2.3.8
1/9/2021, 11:10:20 PM INFO: Checking Package Version for Updates...
1/9/2021, 11:10:20 PM Loading 3 accessories...
1/9/2021, 11:10:20 PM [Tidsstyret Havebelysning] Initializing SonoffTasmotaHTTP accessory...
1/9/2021, 11:10:20 PM [Tidsstyret Havebelysning] Sonoff Tasmota HTTP Initialized
1/9/2021, 11:10:20 PM [Forlaengerledning] Initializing SonoffTasmotaHTTP accessory...
1/9/2021, 11:10:20 PM [Forlaengerledning] Sonoff Tasmota HTTP Initialized
1/9/2021, 11:10:20 PM [Udendoerslys] Initializing SonoffTasmotaHTTP accessory...
1/9/2021, 11:10:20 PM [Udendoerslys] Sonoff Tasmota HTTP Initialized
1/9/2021, 11:10:20 PM Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 98769050-a773-42d1-acdf-65a33e91bf91
    at Bridge.Accessory._this.addBridgedAccessory (/usr/src/hoobs/node_modules/hap-nodejs/dist/lib/Accessory.js:288:27)
    at /usr/src/hoobs/bridge/server.js:250:25
    at Array.filter (<anonymous>)
    at Server.restoreCachedPlatformAccessories (/usr/src/hoobs/bridge/server.js:211:81)
    at Server.start (/usr/src/hoobs/bridge/server.js:159:14)
    at /usr/src/hoobs/bridge/cli.js:94:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
1/9/2021, 11:10:20 PM Got SIGTERM, shutting down Bridge...
1/9/2021, 11:10:20 PM [HUB-STUE] INFO - shutdown
1/9/2021, 11:10:20 PM [HUB-STUE] INFO - shutdown
1/9/2021, 11:10:20 PM INFO: INFO: Your plugin version is up-to-date
1/9/2021, 11:10:20 PM NOTICE: Sending Plugin Status to SmartThings | UpdateAvailable: false | newVersion: 2.3.8`
casperse commented 3 years ago

Found this: https://github.com/hoobs-org/HOOBS/issues/363 But doing a Reset connection and generate new username had no effect,,, I might think that there is to many problems with HOOBS every new plugin is a possibility to start over again! (Not your Hue plugin but it seems very fragile)

ebaauw commented 3 years ago

1/9/2021, 10:06:24 PM [Hue] no bridges or gateways found - retrying in 30 seconds And my configuration is only these 3 plugins not the Hue plugin:

Either Hoobs is using a different config.json than the one you list, or it's starting installed plugins, that are not in config.json. If you have a firewall or wrong network config in your container, I'm not surprised that Homebridge Hue cannot find any bridges/gateways. You had specified the host before, to bypass discovery.

And I cannot get the command working to capture and attach a full debug log file

I don't know if hoobs provides a way to download the logfile. Normally you can from the Homebridge UI Log window.

Homebridge Hue creates the dump file on startup and, with Homebridge DEBUG mode enabled, logs where it stored it.

I might think that there is to many problems with HOOBS every new plugin is a possibility to start over again!

I don't use hoobs and I understand what they're doing. I've seen some weird stuff that I cannot explain under hoobs. I don't have the time nor the knowledge to dive into the details; please contact hoobs support.

casperse commented 3 years ago

Thanks - I really appreciate your effort to try to help me! But I am closing this issue as internal problems to how HOOBS run in a Docker (on Unraid? - not sure this has anything to do with it) I also tried doing an install this with the Homebridge docker and there seem to be a generic problem using the Dockers and getting a needed fixed IP to act as a bridge (Gives very strange problems) - I found more people having similar problems

UPDATE: I decided to make a Fedora VM running Homebridge works great, after spending all night troubleshooting I have found a much more stable platform and its much faster and the webui is better scaling to resolution

Again thanks!