Foddy / node-red-contrib-huemagic

Philips Hue node to control bridges, lights, groups, motion sensors, temperature sensors and Lux sensors using Node-RED.
https://flows.nodered.org/node/node-red-contrib-huemagic
Apache License 2.0
201 stars 67 forks source link

Unused Tap chrashes nodered #246

Closed mkcologne closed 2 years ago

mkcologne commented 3 years ago

Describe the bug When I hit a Button on a Tap bordered crashes

Flow to Reproduce

I don't use my Taps in any flow

Expected behavior Nothing. No crash

Please complete the following information:

Additional context

log:

ReferenceError: sensor is not defined
    at EventEmitter.<anonymous> (/home/pi/.node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge.js:161:38)
    at EventEmitter.emit (events.js:400:28)
    at HueBridge.emitUpdates (/home/pi/.node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:216:18)
    at /home/pi/.node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:41:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
ReferenceError: sensor is not defined
    at EventEmitter.<anonymous> (/home/pi/.node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge.js:161:38)
    at EventEmitter.emit (events.js:400:28)
    at HueBridge.emitUpdates (/home/pi/.node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:216:18)
    at /home/pi/.node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:41:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
7 Sep 16:18:34 - [red] Uncaught Exception:
7 Sep 16:18:34 - abort(ReferenceError: sensor is not defined). Build with -s ASSERTIONS=1 for more info.
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Service RestartSec=100ms expired, scheduling restart.
nodered.service: Scheduled restart job, restart counter is at 2.
isaac-the-newt commented 2 years ago

My Node-RED within Home Assistant is doing the same thing except that I was using Tap switches before this issue arrived.

I have two HUE tap switches and a HUE smart button switch as input nodes. These are not configured with the HUE application (on IOS and that executes in the HUE Bridge) and are used only in Node-RED. They stopped working a few days ago. The Node-RED log file shows that activation of any switch on either of the two tap switches generates an uncaught exception error 6 Dec 13:22:28 - [red] Uncaught Exception: 6 Dec 13:22:28 - [error] ReferenceError: sensor is not defined and Node-RED restarts. The smart button works fine. I've reset the HUE Bridge API key and rejoined it into Node-RED with no joy. I've also deleted and then rejoined the tap switches from the HUE system with no joy. I've also deleted all tap switch nodes from all flows (leaving just the smart button, the bridge and the light nodes) and the error still occurs.

HUE version (reported from IOS app) 3.48.0 (11197) The HUE bridge was last updated 1 Nov 2021 to SW version 194808600 All other HUE items (lights, dimmer switches, etc) are at the current firmware release. The Node-RED version is 10.2.0 The balance of Node-RED flows are working fine. Home Assistant is a core with supervisor VM instance running inside unRAID application and file server. This configuration has been stable for more than 12 months.

Node-RED log

6 Dec 13:58:05 - [red] Uncaught Exception: 6 Dec 13:58:05 - [error] ReferenceError: sensor is not defined at EventEmitter. (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge.js:161:38) at EventEmitter.emit (node:events:390:28) at HueBridge.emitUpdates (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:216:18) at /config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:41:11 at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) [13:58:06] INFO: Starting Node-RED... start node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js" 2021/12/06 13:58:07 [error] 547#547: *744 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET /comms HTTP/1.1", upstream: "http://127.0.0.1:46836/comms", host: "192.168.0.100:8123" 6 Dec 13:58:08 - [info] Welcome to Node-RED

6 Dec 13:58:08 - [info] Node-RED version: v2.1.4 6 Dec 13:58:08 - [info] Node.js version: v16.13.1 6 Dec 13:58:08 - [info] Linux 5.10.75 x64 LE 6 Dec 13:58:09 - [info] Loading palette nodes 2021/12/06 13:58:09 [error] 547#547: 744 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET /comms HTTP/1.1", upstream: "http://127.0.0.1:46836/comms", host: "192.168.0.100:8123" 2021/12/06 13:58:11 [error] 547#547: 744 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET /comms HTTP/1.1", upstream: "http://127.0.0.1:46836/comms", host: "192.168.0.100:8123" 6 Dec 13:58:12 - [info] Dashboard version 3.1.2 started at /endpoint/ui BAIL ON node-red-contrib-alexa-home-skill/alexa BAIL ON node-red-contrib-modbus/Modbus-Client BAIL ON node-red-contrib-modbus/Modbus-Response BAIL ON node-red-contrib-modbus/Modbus-Read BAIL ON node-red-contrib-modbus/Modbus-Getter BAIL ON node-red-contrib-modbus/Modbus-Flex-Getter BAIL ON node-red-contrib-modbus/Modbus-Write BAIL ON node-red-contrib-modbus/Modbus-Flex-Write BAIL ON node-red-contrib-modbus/Modbus-Server BAIL ON node-red-contrib-modbus/Modbus-Flex-Server BAIL ON node-red-contrib-modbus/Modbus-Queue-Info BAIL ON node-red-contrib-modbus/Modbus-Flex-Connector BAIL ON node-red-contrib-modbus/Modbus-IO-Config BAIL ON node-red-contrib-modbus/Modbus-Response-Filter BAIL ON node-red-contrib-modbus/Modbus-Flex-Sequencer BAIL ON node-red-node-pi-gpio/rpi-gpio 6 Dec 13:58:13 - [warn] ------------------------------------------------------ 6 Dec 13:58:13 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red 6 Dec 13:58:13 - [warn] ------------------------------------------------------ 6 Dec 13:58:13 - [info] Settings file : /etc/node-red/config.js 6 Dec 13:58:13 - [info] Context store : 'default' [module=memory] 6 Dec 13:58:13 - [info] User directory : /config/node-red/ 6 Dec 13:58:13 - [warn] Projects disabled : editorTheme.projects.enabled=false 6 Dec 13:58:13 - [info] Flows file : /config/node-red/flows.json 6 Dec 13:58:13 - [info] Server now running at http://127.0.0.1:46836/ 6 Dec 13:58:13 - [info] Starting flows 6 Dec 13:58:15 - [info] Started flows

Foddy commented 2 years ago

Fixed in v4

isaac-the-newt commented 2 years ago

Thanks for the update but this bug's symptoms remains in v4. I have removed all HUE button types from my flows (previous nodes types of HUE Buttons and Tap Switches) leaving only nine lights and the bridge and the exceptions continue when I press a button on a tap switch.

HUE version (reported from IOS app) 3.48.0 (11197) The HUE bridge was last updated 1 Nov 2021 to SW version 194808600 All other HUE items (lights, dimmer switches, etc) are at the current firmware release. The Node-RED version is 10.3.1 The balance of Node-RED flows are working fine. Home Assistant is a core with supervisor VM instance running inside unRAID application and file server. This configuration has been stable for more than 12 months.

LOG: [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-banner.sh: executing...

Add-on: Node-RED Flow-based programming for the Internet of Things

Add-on version: 10.3.1 You are running the latest version of this add-on. System: Home Assistant OS 7.1 (amd64 / qemux86-64) Home Assistant Core: 2021.12.8 Home Assistant Supervisor: 2021.12.2

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-log-level.sh: executing... Log level is set to INFO [cont-init.d] 01-log-level.sh: exited 0. [cont-init.d] customizations.sh: executing... [cont-init.d] customizations.sh: exited 0. [cont-init.d] nginx.sh: executing... [cont-init.d] nginx.sh: exited 0. [cont-init.d] node-red.sh: executing... patching file nodes/ui_base.html Hunk #1 succeeded at 1162 (offset 631 lines). up to date, audited 887 packages in 12s 35 packages are looking for funding run npm fund for details 33 vulnerabilities (15 moderate, 17 high, 1 critical) To address issues that do not require attention, run: npm audit fix To address all issues (including breaking changes), run: npm audit fix --force Run npm audit for details. [cont-init.d] node-red.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [12:54:47] INFO: Starting Node-RED... start node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js" 10 Jan 12:54:50 - [info] Welcome to Node-RED 10 Jan 12:54:50 - [info] Node-RED version: v2.1.4 10 Jan 12:54:50 - [info] Node.js version: v16.13.1 10 Jan 12:54:50 - [info] Linux 5.10.88 x64 LE 10 Jan 12:54:51 - [info] Loading palette nodes 10 Jan 12:54:54 - [info] Dashboard version 3.1.3 started at /endpoint/ui BAIL ON node-red-contrib-alexa-home-skill/alexa BAIL ON node-red-contrib-modbus/Modbus-Client BAIL ON node-red-contrib-modbus/Modbus-Response BAIL ON node-red-contrib-modbus/Modbus-Read BAIL ON node-red-contrib-modbus/Modbus-Getter BAIL ON node-red-contrib-modbus/Modbus-Flex-Getter BAIL ON node-red-contrib-modbus/Modbus-Write BAIL ON node-red-contrib-modbus/Modbus-Flex-Write BAIL ON node-red-contrib-modbus/Modbus-Server BAIL ON node-red-contrib-modbus/Modbus-Flex-Server BAIL ON node-red-contrib-modbus/Modbus-Queue-Info BAIL ON node-red-contrib-modbus/Modbus-Flex-Connector BAIL ON node-red-contrib-modbus/Modbus-IO-Config BAIL ON node-red-contrib-modbus/Modbus-Response-Filter BAIL ON node-red-contrib-modbus/Modbus-Flex-Sequencer BAIL ON node-red-node-pi-gpio/rpi-gpio 10 Jan 12:54:55 - [warn] 10 Jan 12:54:55 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red 10 Jan 12:54:55 - [warn] 10 Jan 12:54:55 - [info] Settings file : /etc/node-red/config.js 10 Jan 12:54:55 - [info] Context store : 'default' [module=memory] 10 Jan 12:54:55 - [info] User directory : /config/node-red/ 10 Jan 12:54:55 - [warn] Projects disabled : editorTheme.projects.enabled=false 10 Jan 12:54:55 - [info] Flows file : /config/node-red/flows.json 10 Jan 12:54:55 - [info] Server now running at http://127.0.0.1:46836/ [12:54:55] INFO: Starting NGinx... 10 Jan 12:54:56 - [info] Starting flows 10 Jan 12:54:56 - [info] [hue-bridge:Philips hue] Initializing the bridge… 10 Jan 12:54:58 - [info] Started flows 10 Jan 12:54:58 - [info] [hue-bridge:Philips hue] Connected to bridge 10 Jan 12:54:59 - [info] [hue-bridge:Philips hue] Process ressources… 10 Jan 12:54:59 - [info] [hue-bridge:Philips hue] Initial emit of ressource states… 10 Jan 12:55:01 - [info] [hue-bridge:Philips hue] Keeping nodes up-to-date… 10 Jan 12:55:01 - [info] [hue-bridge:Philips hue] Subscribing to bridge events… 10 Jan 12:55:01 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 10 Jan 12:55:01 - [info] [server:Home Assistant] Connecting to http://supervisor/core 10 Jan 12:55:01 - [info] [server:Home Assistant] Connected to http://supervisor/core 10 Jan 13:00:01 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 10 Jan 13:05:01 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 10 Jan 13:10:01 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 10 Jan 13:15:01 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 10 Jan 13:20:01 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… . . press HUE tap switch button with no HUE button types in any flows . 10 Jan 13:23:44 - [red] Uncaught Exception: 10 Jan 13:23:44 - [error] TypeError: Cannot convert undefined or null to object at Function.values () at new HueButtonsMessage (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/utils/messages.js:348:38) at HueBridge.get (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:331:23) at /config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge.js:84:30 at EventEmitter. (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:531:7) at EventEmitter.emit (node:events:390:28) at HueBridge.pushUpdatedState (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:267:16) at /config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:247:14 at EventSource.scope.events.onmessage (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/utils/api.js:148:9) at EventSource.emit (node:events:390:28) [13:23:44] INFO: Starting Node-RED... start node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js" 10 Jan 13:23:47 - [info] Welcome to Node-RED 10 Jan 13:23:47 - [info] Node-RED version: v2.1.4 10 Jan 13:23:47 - [info] Node.js version: v16.13.1 10 Jan 13:23:47 - [info] Linux 5.10.88 x64 LE

Foddy commented 2 years ago

Can you please try it again with the v4.0.2 and report if this fixed the issue? I unfortunately don't own any Hue Taps so I can't test it on my own :S …

isaac-the-newt commented 2 years ago

Hi Foddy,

Thanks for the v4.0.2 update.

I have applied this and tested again with two tap switches and a button without any HUE Buttons nodes in use (just lights and the bridge).

I am pleased to confirm Node-Red’s log file is no longer reporting exception traps (it reports no response to button presses from any of my HUE switches).

However, another issue appears to have arrived with some lamps working okay from Node-Red but others are hanging with a status of “executing command…”.

The attached screen shot was taken several minutes after the command was issued – all lights should have been turned on with similar light settings.

The log file shows a status code 503 for the two lights that are in the hung state.

10 Jan 20:49:31 - [info] Starting flows

10 Jan 20:49:31 - [info] [hue-bridge:Philips hue] Initializing the bridge…

10 Jan 20:49:31 - [info] Started flows

10 Jan 20:49:31 - [info] [hue-bridge:Philips hue] Connected to bridge

10 Jan 20:49:32 - [info] [hue-bridge:Philips hue] Process ressources…

10 Jan 20:49:32 - [info] [hue-bridge:Philips hue] Initial emit of ressource states…

10 Jan 20:49:33 - [info] [hue-bridge:Philips hue] Keeping nodes up-to-date…

10 Jan 20:49:33 - [info] [hue-bridge:Philips hue] Subscribing to bridge events…

10 Jan 20:49:33 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

10 Jan 20:49:36 - [info] [server:Home Assistant] Connecting to http://supervisor/core

10 Jan 20:49:36 - [info] [server:Home Assistant] Connected to http://supervisor/core

10 Jan 20:50:14 - [error] [hue-light:Backroom] Error: Request failed with status code 503

10 Jan 20:50:14 - [error] [hue-light:Kitchen Bench] Error: Request failed with status code 503

10 Jan 20:51:01 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

10 Jan 20:54:34 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

The following screen capture shows the configuration of one of the faulty lamps. All lamps are configured this way, even the ones thar are working okay. When you open the edit dialogue the light is always listed as the long HEX string, then you remap it to the correct name and then save it. If you open it again the HEX string reappears. I don’t care about the HEX strings (as such) because I rarely change these settings BUT it might indicate some scrambling of the lights in the bridge database?

Okay, so I then added a HUE Button configured as a tap switch and confirmed it is now generating events that are being seen within Node-RED and not crashing it – but the issue with the hanging lamps remains.

I deleted one of the lamp nodes and re-added it from the library and it generated the same result.

So, the issue with the traps appears to have gone but a new issue has appeared in its place.

Thanks for your support of this great library.

I’m happy to assist with any button testing you need (as you don’t actually have any HUE buttons). 😊

regards,

Greg Belcher

From: Foddy @.> Sent: Monday, 10 January 2022 19:23 To: Foddy/node-red-contrib-huemagic @.> Cc: isaac-the-newt @.>; Comment @.> Subject: Re: [Foddy/node-red-contrib-huemagic] Unused Tap chrashes nodered (#246)

Can you please try it again with the v4.0.2 and report if this fixed the issue? I unfortunately don't own any Hue Taps so I can't test it on my own :S …

— Reply to this email directly, https://github.com/Foddy/node-red-contrib-huemagic/issues/246#issuecomment-1008633883 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWY7QE7TUMKXADUE7GWBFODUVKJPZANCNFSM5DSQPOJA unsubscribe. Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 iOS or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub Android. You are receiving this because you commented. https://github.com/notifications/beacon/AWY7QEYZOONS3U4GLPVJRWDUVKJPZA5CNFSM5DSQPOJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHQPIQGY.gif Message ID: @.***>

isaac-the-newt commented 2 years ago

PS – the log file has “resource” and “resources” misspelt.

There is only one “s” in the middle of the word.

regards,

Greg Belcher

From: Greg Belcher @.> Sent: Monday, 10 January 2022 21:42 To: 'Foddy/node-red-contrib-huemagic' @.>; 'Foddy/node-red-contrib-huemagic' @.> Cc: 'Comment' @.> Subject: RE: [Foddy/node-red-contrib-huemagic] Unused Tap crashes nodered (#246)

Hi Foddy,

Thanks for the v4.0.2 update.

I have applied this and tested again with two tap switches and a button without any HUE Buttons nodes in use (just lights and the bridge).

I am pleased to confirm Node-Red’s log file is no longer reporting exception traps (it reports no response to button presses from any of my HUE switches).

However, another issue appears to have arrived with some lamps working okay from Node-Red but others are hanging with a status of “executing command…”.

The attached screen shot was taken several minutes after the command was issued – all lights should have been turned on with similar light settings.

The log file shows a status code 503 for the two lights that are in the hung state.

10 Jan 20:49:31 - [info] Starting flows

10 Jan 20:49:31 - [info] [hue-bridge:Philips hue] Initializing the bridge…

10 Jan 20:49:31 - [info] Started flows

10 Jan 20:49:31 - [info] [hue-bridge:Philips hue] Connected to bridge

10 Jan 20:49:32 - [info] [hue-bridge:Philips hue] Process ressources…

10 Jan 20:49:32 - [info] [hue-bridge:Philips hue] Initial emit of ressource states…

10 Jan 20:49:33 - [info] [hue-bridge:Philips hue] Keeping nodes up-to-date…

10 Jan 20:49:33 - [info] [hue-bridge:Philips hue] Subscribing to bridge events…

10 Jan 20:49:33 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

10 Jan 20:49:36 - [info] [server:Home Assistant] Connecting to http://supervisor/core

10 Jan 20:49:36 - [info] [server:Home Assistant] Connected to http://supervisor/core

10 Jan 20:50:14 - [error] [hue-light:Backroom] Error: Request failed with status code 503

10 Jan 20:50:14 - [error] [hue-light:Kitchen Bench] Error: Request failed with status code 503

10 Jan 20:51:01 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

10 Jan 20:54:34 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

The following screen capture shows the configuration of one of the faulty lamps. All lamps are configured this way, even the ones thar are working okay. When you open the edit dialogue the light is always listed as the long HEX string, then you remap it to the correct name and then save it. If you open it again the HEX string reappears. I don’t care about the HEX strings (as such) because I rarely change these settings BUT it might indicate some scrambling of the lights in the bridge database?

Okay, so I then added a HUE Button configured as a tap switch and confirmed it is now generating events that are being seen within Node-RED and not crashing it – but the issue with the hanging lamps remains.

I deleted one of the lamp nodes and re-added it from the library and it generated the same result.

So, the issue with the traps appears to have gone but a new issue has appeared in its place.

Thanks for your support of this great library.

I’m happy to assist with any button testing you need (as you don’t actually have any HUE buttons). 😊

regards,

Greg Belcher

From: Foddy @.> Sent: Monday, 10 January 2022 19:23 To: Foddy/node-red-contrib-huemagic @.> Cc: isaac-the-newt @.>; Comment @.> Subject: Re: [Foddy/node-red-contrib-huemagic] Unused Tap chrashes nodered (#246)

Can you please try it again with the v4.0.2 and report if this fixed the issue? I unfortunately don't own any Hue Taps so I can't test it on my own :S …

— Reply to this email directly, https://github.com/Foddy/node-red-contrib-huemagic/issues/246#issuecomment-1008633883 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWY7QE7TUMKXADUE7GWBFODUVKJPZANCNFSM5DSQPOJA unsubscribe. Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 iOS or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub Android. You are receiving this because you commented. https://github.com/notifications/beacon/AWY7QEYZOONS3U4GLPVJRWDUVKJPZA5CNFSM5DSQPOJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHQPIQGY.gif Message ID: @.***>

isaac-the-newt commented 2 years ago

This update is checking for new firmware updates for the HUE bridge every five minutes. Can the logging be turned off or made optional?

11 Jan 00:23:10 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 00:28:10 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 00:33:10 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 00:38:10 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 00:43:10 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 00:48:10 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 00:53:10 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 00:58:11 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:03:11 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:08:11 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:13:11 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:18:11 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:23:11 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:28:11 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:33:11 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:38:12 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:43:12 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:48:12 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:53:12 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 01:58:12 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:03:12 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:08:12 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:13:12 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:18:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:23:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:28:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:33:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:38:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:43:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:48:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:53:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 02:58:13 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:03:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:08:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:13:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:18:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:23:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:28:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:33:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:38:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:43:14 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:48:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:53:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 03:58:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:03:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:08:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:13:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:18:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:23:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:28:15 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:33:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:38:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:43:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:48:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:53:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 04:58:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:03:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:08:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:13:16 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:18:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:23:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:28:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:33:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:38:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:43:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:48:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:53:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 05:58:17 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:03:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:08:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:13:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:18:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:23:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:28:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:33:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:38:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:43:18 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:48:19 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:53:19 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 06:58:19 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:03:19 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:08:19 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:13:19 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:18:19 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:23:19 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:28:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:33:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:38:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:43:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:48:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:53:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 07:58:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 08:03:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 08:08:20 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 08:13:21 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 08:18:21 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 08:23:21 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 08:28:21 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 08:33:21 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates… 11 Jan 08:38:21 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

Foddy commented 2 years ago

This is not a correct behaviour. You can deactivate the automatic firmware updates for now in the bridge configuration.

HueMagic should normally check for updates every 3h... I will take a look at this issue

isaac-the-newt commented 2 years ago

Hi Foddy,

Updated to HueMagic Version 4.0.4 and the firmware update check has reverted to every 3 hours – thanks.

16 Jan 14:39:21 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

16 Jan 17:39:21 - [info] [hue-bridge:Philips hue] Checking for Hue Bridge firmware updates…

16 Jan 18:00:20 - [error] [hue-light:Backroom] Error: Request failed with status code 503

16 Jan 18:00:20 - [error] [hue-light:Kitchen Bench] Error: Request failed with status code 503

Can you say what an error status code 503 represents?

This comes from the same two HUE lights; all other (seven) lights work fine.

The same two lights work fine using the HUE app on IOS.

I’ve deleted and re-added these two lights in Node-RED and the same error results.

Thanks.

regards,

Greg Belcher

From: Foddy @.> Sent: Tuesday, 11 January 2022 18:52 To: Foddy/node-red-contrib-huemagic @.> Cc: isaac-the-newt @.>; Comment @.> Subject: Re: [Foddy/node-red-contrib-huemagic] Unused Tap chrashes nodered (#246)

This is not a correct behaviour. Zhou can deactivate the automatic firmware updates for now in the bridge configuration.

HueMagic should normally check for updates every 3h... I will take a look at this issue

— Reply to this email directly, https://github.com/Foddy/node-red-contrib-huemagic/issues/246#issuecomment-1009680904 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWY7QE2ECSHOI2OLKUL4ZJ3UVPORBANCNFSM5DSQPOJA unsubscribe. Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 iOS or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub Android. You are receiving this because you commented. https://github.com/notifications/beacon/AWY7QE7E6PY3X6OA4OB62QDUVPORBA5CNFSM5DSQPOJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHQXIECA.gif Message ID: @.***>

isaac-the-newt commented 2 years ago

Hi Foddy,

Updated Node-RED on Home Assistant to 2.2 this morning and HueMagic is crashing on start.

This just loops continually. I will be rolling back my upgrade but captured this snippet from the log file before doing so.

1 Feb 09:37:40 - [info] [hue-bridge:Philips hue] Keeping nodes up-to-date…

1 Feb 09:37:40 - [info] [hue-bridge:Philips hue] Subscribing to bridge events…

1 Feb 09:37:40 - [red] Uncaught Exception:

1 Feb 09:37:40 - [error] TypeError: Cannot read properties of undefined (reading 'length')

at new HueBridgeMessage (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/utils/messages.js:17:61)

at HueBridge.get (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:306:23)

at /config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge.js:84:30

at EventEmitter.<anonymous> (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:556:7)

at EventEmitter.emit (node:events:390:28)

at HueBridge.pushUpdatedState (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:275:16)

at Timeout._onTimeout (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:177:13)

at listOnTimeout (node:internal/timers:557:17)

at processTimers (node:internal/timers:500:7)

[09:37:40] INFO: Starting Node-RED...

start

node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"

2022/02/01 09:37:42 [error] 552#552: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET /comms HTTP/1.1", upstream: "http://127.0.0.1:46836/comms", host: "192.168.0.100:8123"

1 Feb 09:37:42 - [info]

Welcome to Node-RED

===================

regards,

Greg Belcher

isaac-the-newt commented 2 years ago

Hi Foddy,

Rolling back didn’t solve this issue.

I’ve had to disable the HUE Bridge node and re-deploy the configuration to stop Node-RED from crashing.

HueMagic is at Version 4.1.0

regards,

Greg Belcher

From: Greg Belcher @.> Sent: Tuesday, 1 February 2022 09:46 To: 'Foddy/node-red-contrib-huemagic' @.>; 'Foddy/node-red-contrib-huemagic' @.> Cc: 'Comment' @.> Subject: Node-Red 2.2 HueMagic crashing on start

Hi Foddy,

Updated Node-RED on Home Assistant to 2.2 this morning and HueMagic is crashing on start.

This just loops continually. I will be rolling back my upgrade but captured this snippet from the log file before doing so.

1 Feb 09:37:40 - [info] [hue-bridge:Philips hue] Keeping nodes up-to-date…

1 Feb 09:37:40 - [info] [hue-bridge:Philips hue] Subscribing to bridge events…

1 Feb 09:37:40 - [red] Uncaught Exception:

1 Feb 09:37:40 - [error] TypeError: Cannot read properties of undefined (reading 'length')

at new HueBridgeMessage (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/utils/messages.js:17:61)

at HueBridge.get (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:306:23)

at /config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge.js:84:30

at EventEmitter.<anonymous> (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:556:7)

at EventEmitter.emit (node:events:390:28)

at HueBridge.pushUpdatedState (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:275:16)

at Timeout._onTimeout (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:177:13)

at listOnTimeout (node:internal/timers:557:17)

at processTimers (node:internal/timers:500:7)

[09:37:40] INFO: Starting Node-RED...

start

node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"

2022/02/01 09:37:42 [error] 552#552: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET /comms HTTP/1.1", upstream: "http://127.0.0.1:46836/comms", host: "192.168.0.100:8123"

1 Feb 09:37:42 - [info]

Welcome to Node-RED

===================

regards,

Greg Belcher