NorthernMan54 / node-red-contrib-homebridge-automation

Homebridge and Node-RED Integration
Apache License 2.0
107 stars 18 forks source link

Not starting #65

Closed Octovizor closed 3 years ago

Octovizor commented 3 years ago

Node-red is not starting with node-red-contrib-homebridge-automation installed, before it was working but i have upgraded my homebridge and now node-red is not starting anymore.

Version:

Node-RED version: v1.1.3
Node.js version: v12.19.0
Homebridge: 1.1.6

error:

12 Oct 19:16:12 - [red] Uncaught Exception:
12 Oct 19:16:12 - TypeError: Cannot read property 'Name' of undefined
at Accessory.toList (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/lib/Accessory.js:37:28)
at Homebridge.toList (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/lib/Homebridge.js:60:34)
at Homebridges.toList (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/lib/Homebridges.js:33:35)
at HAPNodeJSClient. (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/HAP-NodeRed.js:52:56)
at HAPNodeJSClient.emit (events.js:314:20)
at HAPNodeJSClient._discoveryEnd (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/node_modules/hap-node-client/HAPNodeJ SClient.js:149:8)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)

NorthernMan54 commented 3 years ago

Did you enable insecure mode again ?

Please include a debug log, details are here

https://github.com/NorthernMan54/node-red-contrib-homebridge-automation#to-start-node-red-in-debug-mode-and-output-homebridge-automation-debug-logs-start-node-red-like-this

NorthernMan54 commented 3 years ago

PS I'm on homebridge 1.1.6 and no issues

Octovizor commented 3 years ago

I have enabled the parameter again, it was indeed gone, but i still got the same error. Debug log:

/homebridge # DEBUG=-express,-send,-body-parser, node-red
oauth2orize register exchanger password password +0ms
13 Oct 14:05:15 - [info]

Welcome to Node-RED
===================

13 Oct 14:05:15 - [info] Node-RED version: v1.1.3
13 Oct 14:05:15 - [info] Node.js version: v12.19.0
13 Oct 14:05:15 - [info] Linux 3.10.105 x64 LE
13 Oct 14:05:16 - [info] Loading palette nodes
13 Oct 14:05:18 - [info] Settings file : /root/.node-red/settings.js
13 Oct 14:05:18 - [info] Context store : 'default' [module=memory]
13 Oct 14:05:18 - [info] User directory : /root/.node-red
13 Oct 14:05:18 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Oct 14:05:18 - [info] Flows file : /root/.node-red/flows_homebridge.json
13 Oct 14:05:18 - [warn]


Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
file using your chosen key the next time you deploy a change.


13 Oct 14:05:18 - [info] Starting flows
hapNodeJSClient Starting Homebridge instance discovery +0ms
hapNodeRed hbConf.register Camera Garage - Motion Sensor +0ms
hapNodeRed Register hb-event -> Camera Garage - Motion Sensor +0ms
hapNodeRed hbConf.register Garage Licht - Lightbulb +4ms
hapNodeRed Register hb-status -> Garage Licht - Lightbulb +0ms
hapNodeRed hbConf.register Garage Licht - Lightbulb +4ms
hapNodeRed Register hb-event -> Garage Licht - Lightbulb +0ms
hapNodeRed hbConf.register Garage Motion Switch - Switch +1ms
hapNodeRed Register hb-status -> Garage Motion Switch - Switch +1ms
hapNodeRed hbConf.register Garage Motion Switch - Switch +3ms
hapNodeRed Register hb-event -> Garage Motion Switch - Switch +0ms
hapNodeRed hbConf.register Garage Licht - Lightbulb +2ms
hapNodeRed Register hb-status -> Garage Licht - Lightbulb +0ms
hapNodeRed hbConf.register Camera Oprit - Motion Sensor +3ms
hapNodeRed Register hb-event -> Camera Oprit - Motion Sensor +0ms
hapNodeRed hbConf.register Oprit Licht - Lightbulb +1ms
hapNodeRed Register hb-status -> Oprit Licht - Lightbulb +0ms
hapNodeRed hbConf.register Buiten Motion Switch - Switch +1ms
hapNodeRed Register hb-status -> Buiten Motion Switch - Switch +1ms
hapNodeRed hbConf.register Camera Achterdeur - Motion Sensor +2ms
hapNodeRed Register hb-event -> Keuken Led Eiland - Lightbulb +0ms
13 Oct 14:05:18 - [info] Started flows
13 Oct 14:05:18 - [info] Server now running at http://127.0.0.1:1880/
hapNodeJSClient HAP Device discovered Homebridge FA39 [
'192.168.1.100',
'169.254.162.1',
'169.254.121.237',
'fe80::211:32ff:fe60:2095',
'fe80::211:32ff:fe60:2097',
'fe80::211:32ff:fe60:2098',
'fe80::211:32ff:fe60:2096'
] +73ms
hapNodeJSClient HAP instance address: Homebridge FA39 -> 0E_18_AD_48_FA_39.local -> 192.168.1.100:52206 +6ms
hapNodeJSClient Homebridge instance discovered Homebridge FA39 C78A with 37 accessories +65ms
hapNodeJSClient HAP Device discovered Fibaro Wall Plug-93361a [ '192.168.1.81', 'fe80::ae17:2ff:fe93:361a' ] +4ms
hapNodeJSClient HAP instance address: Fibaro Wall Plug-93361a -> hk-wallplug-93361A.local -> 192.168.1.81:80 +1ms
hapNodeJSClient HAP Device discovered iSmartGate [ '192.168.1.118', 'fe80::bad7:afff:fe51:c84a' ] +110ms
hapNodeJSClient HAP instance address: iSmartGate -> iSmartGate.local -> 192.168.1.118:4567 +1ms
hapNodeJSClient HAP Discover failed iSmartGate http://192.168.1.118:4567 error code 470 +13ms
hapNodeJSClient HAP Discover failed Fibaro Wall Plug-93361a http://192.168.1.81:80 error code 470 +883ms
hapNodeJSClient Ending Homebridge instance discovery +19s
Service Missing HB Type 3E +0ms
Service Missing HB Type A2 +1ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 43 +0ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 43 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 112 +0ms
Service Missing HB Type 110 +1ms
Service Missing HB Type 110 +0ms
Service Missing HB Type 3E +1ms
Service Missing HB Type 112 +0ms
Service Missing HB Type 110 +0ms
Service Missing HB Type 110 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 85 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 85 +1ms
Service Missing HB Type 3E +0ms
Service Missing HB Type 85 +1ms
13 Oct 14:05:38 - [red] Uncaught Exception:
13 Oct 14:05:38 - TypeError: Cannot read property 'Name' of undefined
at Accessory.toList (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/lib/Accessory.js:37:28)
at Homebridge.toList (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/lib/Homebridge.js:60:34)
at Homebridges.toList (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/lib/Homebridges.js:33:35)
at HAPNodeJSClient. (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/HAP-NodeRed.js:52:56)
at HAPNodeJSClient.emit (events.js:314:20)
at HAPNodeJSClient._discoveryEnd (/root/.node-red/node_modules/node-red-contrib-homebridge-automation/node_modules/hap-node-client/HAPNodeJ SClient.js:149:8)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)

NorthernMan54 commented 3 years ago

Silly question, have you updated the node recently ? Latest version of the node is 0.0.71

Am thinking that this has already been fixed.

Looking at this further and the node-red package management system has issues, and is not updating versions.

https://discourse.nodered.org/t/flow-library-not-detecting-updated-modules/25254

I have kicked it to version 0.0.71 on the site

https://flows.nodered.org/node/node-red-contrib-homebridge-automation

Octovizor commented 3 years ago

Stupid me i didn't updated to the latest version, I have updated everything except the node-red-contrib-homebridge-automation

Octovizor commented 3 years ago

thx for the help!

NorthernMan54 commented 3 years ago

No problem

Have a great day