helander / homebridge-node-red

Run node-red inside homebridge
Apache License 2.0
4 stars 0 forks source link

Context store setup #4

Open allanjthorne opened 2 months ago

allanjthorne commented 2 months ago

Describe Your Problem: Flow variables are not kept across reboots.

Logs: [09/04/2024, 09:02:44] [Node Red Platform] Child bridge process ended [09/04/2024, 09:02:44] [Node Red Platform] Process Ended. Code: 1, Signal: null [09/04/2024, 09:03:01] [Node Red Platform] Initializing NodeRedHomebridgePlugin platform... [09/04/2024, 09:03:01] [Node Red Platform] Initializing child bridge 0E:A8:C4:6F:C6:96 [09/04/2024, 09:03:01] Loading 10 accessories... [09/04/2024, 09:03:05] [Node Red Platform] Launched child bridge with PID 70185 [09/04/2024, 09:03:08] [Node Red Platform] Loaded @helander/homebridge-node-red v2.2.0 child bridge successfully [09/04/2024, 09:03:08] [Node Red Platform] Finished initializing platform: Node Red Platform [09/04/2024, 09:03:08] [Node Red Platform] settings { flowFile: 'flows.json', httpAdminRoot: '/red', httpNodeRoot: '/api', userDir: '/var/lib/homebridge/nodered-1956', functionGlobalContext: {}, module: 'localfilesystem'

Plugin Config: { "name": "Node Red Platform", "port": 1956, "settings": [ { "name": "credentialSecret", "value": %%%%%%%%%%%%% }, { "name": "module", "value": "\"localfilesystem\"" } ], "_bridge": { "username": "0E:A8:C4:6F:C6:96", "port": 42103 }, "platform": "NodeRedHomebridgePlugin" }

Screenshots:

Environment:

helander commented 2 months ago

By default the contexts are stored in main memory only. In case you need to persist a context you need to configure node-red accordingly. The homebridge-node-red plugin allow you to configure arbitrary node-red settings.

Consult the plugin documentation and the node-red settings documentation.