ebaauw / homebridge-hue

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

3 hue bridges with the same error after Firmware update 1937045000, API 1.36.0 #623

Closed Nastras closed 4 years ago

Nastras commented 4 years ago

Hello @ebaauw,

i have recently had a problem with all 3 hue bridges i own and my 3 homebridge-hue instances. There is no longer a switch working on any bridge. Everywhere the same error message.

I'm not sure what caused it. But I got a message in the iconnecthue app that a firmware update was installed. I suspect it is related to the firmware update. Unfortunately there is nothing written in the Philips changelog yet.

My 3 bridges have all firmware version: 1937045000 and API: 1.36.0 installed.

I have attached an excerpt from the Journalctl and the homebridge-hue.json from one bridge.

I hope you can help me?

Thanks!

homebridge-hue.json.txt

Journalctl.txt

Nastras commented 4 years ago

I just checked the config backup on my Hue Bridge. Yesterday I had a different firmware installed. So there does seem to be a connection.

"apiversion": "1.35.0", "mac": "00:17:88:", "linkbutton": false, "bridgeid": "001788XXXXXX", "ipaddress": "192.16", "portalservices": true, "name": "Zigbeebridge 4", "swversion": "1935144040", "netmask": "255.255.255.0", "internetservices": { "swupdate": "connected", "time": "connected", "remoteaccess": "connected", "internet": "connected" },

Nastras commented 4 years ago

I just noticed that HomeKit shows that the switches do not support these devices and the buttons are missing 🀒. Lights and sensors are still working.

IMG_BC10126502C9-1

All switch triggers are thereby also deleted by Homekit -.-

ebaauw commented 4 years ago

Looks like the bridge now exposes the devices with a different manufacturer name.

Nastras commented 4 years ago

I just saw that in the app too. But I wasn't sure if it said anything else before.

9BAD07EE-6007-4689-A854-27977CAB27AE

Question marks everywhere πŸ™„ 52C36009-338B-493E-9093-97691182F8E0

Can you fix it for the homebridge-hue Plugin?

Nastras commented 4 years ago

50B525BF-AE41-4618-84AF-4851321646A5

ebaauw commented 4 years ago

Yeah, I'll update homebridge-hue to deal with this (undocumented!) change. Might take a couple fo days before I find the time, though. I'm right in the middle of some other changes.

Nastras commented 4 years ago

That's great, thanks!

For me it is a critical bug because no light switch works anymore and the woman is very angry and annoyed πŸ˜…

I will reprogram it temporarily over hue until the update πŸ˜‰

ebaauw commented 4 years ago

Could you try v0.11.54-0? Install thru sudo npm -g i homebridge-hue@beta.

It's a big change. I was already refactoring homebridge-hue, to get rid of the dependency on the request package, which has been deprecated. As a plus, homebridge-hue now connects to the gen-2 Hue bridge over SSL.

Nastras commented 4 years ago

I have installed the update, everything seems to work as usual again. I will reprogram my switches in the course of the day and report if I still notice anything.

Thank you very much for the quick fix πŸ™πŸ™πŸ™

I have an off topic question about the ikea zigbee repeater. I saw somewhere that you changed something so that this in hk is now shown as repeater. Not sure where anymore.

I have this one currently on the blacklist. Is it worthwhile to display it?

ebaauw commented 4 years ago

Actually, in this beta (and going forwards) I no longer expose repeaters to HomeKit. There’s no functionality to expose. No more need to blacklist them.

terriblefox commented 4 years ago

This is what happens when I install the beta

[2/20/2020, 11:05:09 AM] [Hue] Phoscon-GW: TypeError [ERR_INVALID_URL]: Invalid URL: ws://192.168.0.35:8080:8088/ at onParseError (internal/url.js:243:9) at new URL (internal/url.js:319:5) at initAsClient (/usr/local/lib/node_modules/homebridge-hue/node_modules/ws/lib/websocket.js:477:17) at new WebSocket (/usr/local/lib/node_modules/homebridge-hue/node_modules/ws/lib/websocket.js:72:7) at HueBridge.listen (/usr/local/lib/node_modules/homebridge-hue/lib/HueBridge.js:816:13) at HueBridge.exposeResources (/usr/local/lib/node_modules/homebridge-hue/lib/HueBridge.js:580:10) at /usr/local/lib/node_modules/homebridge-hue/lib/HueBridge.js:101:19 at processTicksAndRejections (internal/process/task_queues.js:94:5) { input: 'ws://192.168.0.35:8080:8088/', code: 'ERR_INVALID_URL' } [2/20/2020, 11:05:09 AM] [Hue] Phoscon-GW: 14 accessories [2/20/2020, 11:05:09 AM] [Hue] Home/2: bridge request 1: GET / [2/20/2020, 11:05:09 AM] [Hue] Home/2: bridge communication error ERR_INVALID_ARG_TYPE on 192...37 [2/20/2020, 11:05:09 AM] [Hue] Home/2: Error at HueBridge.request (/usr/local/lib/node_modules/homebridge-hue/lib/HueBridge.js:1165:11) at processTicksAndRejections (internal/process/task_queues.js:94:5) [2/20/2020, 11:05:09 AM] [Hue] Home/2: 1 accessories [2/20/2020, 11:05:09 AM] [homee] connected to homee [2/20/2020, 11:05:09 AM] [Hue] Home: bridge request 1: GET / [2/20/2020, 11:05:09 AM] [Hue] Home: bridge communication error ERR_INVALID_ARG_TYPE on 192...8 [2/20/2020, 11:05:09 AM] [Hue] Home: Error at HueBridge.request (/usr/local/lib/node_modules/homebridge-hue/lib/HueBridge.js:1165:11) at processTicksAndRejections (internal/process/task_queues.js:94:5) [2/20/2020, 11:05:09 AM] [Hue] Home: 1 accessories

ebaauw commented 4 years ago

Please attach debug dump file and debug log file.

terriblefox commented 4 years ago

mhh i deinstalled all and reinstalled the previous release ... ill see if I can install it on another instance

terriblefox commented 4 years ago

Seems to run fine on the other instance, do I have to link the bridges again? or can I leave the users?

ebaauw commented 4 years ago

Never mind the files, I think I found the issue. Will issue a new beta shortly.

Seems to run fine on the other instance

Lemme guess: the other instance uses (default) port 80 for the REST API server whereas the first instance uses port 8080?

I have to link the bridges again? or can I leave the users?

No; yes.

terriblefox commented 4 years ago

ok tried to reinstall on the main install. still errors. I can recheck the hue bridges on port 80 an phoscon on port 8080

TypeError: Cannot read property 'getCharacteristic' of undefined at HueBridge.heartbeat (/usr/local/lib/node_modules/homebridge-hue/lib/HueBridge.js:878:18) at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-hue/lib/HuePlatform.js:304:18) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7)

ebaauw commented 4 years ago

Could you please try the latest beta?

terriblefox commented 4 years ago

no still...

[Hue] Phoscon-GW: 14 accessories [2/20/2020, 5:47:39 PM] [Hue] Home/2: bridge request 1: get / [2/20/2020, 5:47:39 PM] [Hue] Home/2: bridge communication error ERR_INVALID_ARG_TYPE on 192...37 [2/20/2020, 5:47:39 PM] [Hue] Home/2: [2/20/2020, 5:47:39 PM] [Hue] Home/2: 1 accessories [2/20/2020, 5:47:39 PM] [Hue] Home: bridge request 1: get / [2/20/2020, 5:47:39 PM] [Hue] Home: bridge communication error ERR_INVALID_ARG_TYPE on 192...8 [2/20/2020, 5:47:39 PM] [Hue] Home: [2/20/2020, 5:47:39 PM] [Hue] Home: 1 accessories

[Hue] npm registry: The "listener" argument must be of type Function. Received type object

phoscon GW works...

ebaauw commented 4 years ago

Can you please capture the output of

DEBUG=HttpClient* homebridge -D

Also, please attach config.json.

terriblefox commented 4 years ago

DEBUG:

/homebridge # DEBUG=HttpClient* homebridge -D [2/20/2020, 6:05:39 PM] config.json (/root/.homebridge/config.json) not found. [2/20/2020, 6:05:39 PM] Loaded plugin: homebridge-config-ui-x [2/20/2020, 6:05:39 PM] Registering platform 'homebridge-config-ui-x.config' [2/20/2020, 6:05:39 PM] --- [2/20/2020, 6:05:39 PM] Plugin /usr/local/lib/node_modules/homebridge-hue requires Node version of ^12.16.1 which does not satisfy the current Node version of v12.14.1. You may need to upgrade your installation of Node. [2/20/2020, 6:05:41 PM] Loaded plugin: homebridge-hue [2/20/2020, 6:05:41 PM] Registering platform 'homebridge-hue.Hue' [2/20/2020, 6:05:41 PM] --- [2/20/2020, 6:05:41 PM] Loaded plugin: homebridge-xiaomi-roborock-vacuum [2/20/2020, 6:05:41 PM] Registering accessory 'homebridge-xiaomi-roborock-vacuum.XiaomiRoborockVacuum' [2/20/2020, 6:05:41 PM] --- Setup Payload: X-HM://0023ISYWY3GG7 Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     
β”‚ 031-45-154 β”‚     
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     

[2/20/2020, 6:05:41 PM] Homebridge is running on port 34008.

terriblefox commented 4 years ago

Config:

{ "name": "Hue", "anyOn": true, "excludeSensorTypes": [ "Daylight", "CLIPGenericFlag", "CLIPGenericStatus", "CLIPPresence", "CLIPLightLevel", "CLIPTemperature", "CLIPHumidity", "CLIPPressure", "CLIPOpenClose", "CLIPAlarm", "CLIPCarbonMonoxide", "CLIPFire", "CLIPVibration", "CLIPWater", "CLIPConsumption", "CLIPPower" ], "forceCt": true, "groups": true, "group0": false, "hosts": [ "192.168.0.8:80", "192.168.0.37:80", "192.168.0.35:8080" ], "lights": true, "nativeHomeKitLights": true, "nativeHomeKitSensors": true, "nupnp": true, "resource": true, "rules": true, "scenes": true, "scenesAsSwitch": true, "schedules": true, "sensors": true, "users": { "001788FFFEA29557": "MqMKVBhYmbRoc7OnJIvUGadnEaaZNk6l06x4wU0T", "001788FFFE25BA5A": "0RgrII8a3lfeCc1VDsTsCslaHvxLQN0cde7HOFJW", "00212EFFFF051943": "917EDC72A9" }, "platform": "Hue" }

ebaauw commented 4 years ago

Config is looking good. Are these gen-2 (square-ish) Hue bridges?

You need to start homebridge as the user you normally use to run it. See https://github.com/ebaauw/homebridge-hue#debug-log-file.

terriblefox commented 4 years ago

yes, both gen2 bridges

ebaauw commented 4 years ago
[2/20/2020, 5:47:39 PM] [Hue] Home/2: bridge communication error ERR_INVALID_ARG_TYPE on 192...37

The bridge communication error message is no longer issued by the latest beta of homebridge-hue. Please double check your system for multiple installations of node, homebridge, and/or homebridge-hue.

See also my (edited) previous comment: the DEBUG output is not from your regular homebridge.

terriblefox commented 4 years ago

mh this is what I get when iu put the debug command in the terminal. This HB is running on a Synology docker...

i don't have any multiple installs of the plugin on this form another instance....

Node.js Version v12.14.1

v6.13.7

ebaauw commented 4 years ago

This HB is running on a Synology docker...

So you need to run the command from inside the docker container.

Node.js Version v6.13.7

I'm pretty sure node v6.13.7 is too old to run homebridge-hue. It is no longer maintained for a long time already, see https://nodejs.org/en/about/releases/.

terriblefox commented 4 years ago

I did, running command inside the ui terminal direct in docker HB. No im running Node v12.14.1. NPM is version 6.13.7 sorry

ebaauw commented 4 years ago

Cool. But do you normally run homebridge as root inside the container?

How did you install the homebridge-hue beta? Also from within the container? Not sure if that's preserved between container restarts. What's the output of:

grep version /usr/local/lib/node_modules/homebridge-hue/package.json

when run from inside the container?

terriblefox commented 4 years ago

grep: /usr/local/lib/node_modules/homebridge-hue/package.json: No such file or directory

seems that the file structure on then as is different. My root folder is Homebridge . there is a terminal tab in the Synology version. im running things as sudo... orange that that old version is running fine... only the knobs are not listet since the last update.

ebaauw commented 4 years ago

When you ran the DEBUG command, it reported:

Plugin /usr/local/lib/node_modules/homebridge-hue requires Node version of ^12.16.1 which does not satisfy the current Node version of v12.14.1. You may need to upgrade your installation of Node.

That's a message from homebridge, after reading /usr/local/lib/node_modules/homebridge-hue/package.json. So either you didn't run the DEBUG command from inside the container, or your installation is totally messed up. I'm sorry, but I cannot help you with docker.

terriblefox commented 4 years ago

I think there's a different debug mode on the docker. My setup is fine 😊 true is, the 12.14.1 is the node the docker is running. Updates are published with new docker images. Thank you. Ill stay on the old version. As I don't need the buttons. Perhaps a final update and a update release will fix this.... thank you for your great support

ebaauw commented 4 years ago

Which docker image do you use?

terriblefox commented 4 years ago

the one from onzu

ebaauw commented 4 years ago

Released v0.11.54.

terriblefox commented 4 years ago

ok, so i installed the new one, same errors. So for now I installed the plugin on a second instance and it all works well... idk what's going on but now it works 😊 thx

ebaauw commented 4 years ago

@terriblefox are you running the fritz plugin? That breaks https traffic, see #629.