OpenMarine
Node Red fails when trying to process SignalK message - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Node Red (https://forum.openmarine.net/forumdisplay.php?fid=15)
+--- Thread: Node Red fails when trying to process SignalK message (/showthread.php?tid=3453)



Node Red fails when trying to process SignalK message - baltika_no_9 - 2021-05-22

I am trying to pass a SignalK message to node red.

I add a SignalK suscribe node and configure it with Source/path etc. When I deploy it node red fails and goes into a start/fail loop:
Code:
22 May 14:36:16 - [info] Stopping flows
22 May 14:36:16 - [info] Stopped flows
22 May 14:36:16 - [info] Starting flows
22 May 14:36:16 - [info] Started flows
22 May 14:36:21 - [red] Uncaught Exception:
22 May 14:36:21 - TypeError: Cannot read property 'subscribe' of undefined
   at Timeout.setTimeout [as _onTimeout] (/home/pi/.node-red/node_modules/@signalk/node-red-embedded/signalk-subscribe.js:124:16)
   at ontimeout (timers.js:436:11)
   at tryOnTimeout (timers.js:300:5)
   at listOnTimeout (timers.js:263:5)
   at Timer.processTimers (timers.js:223:10)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Service RestartSec=20s expired, scheduling restart.
nodered.service: Scheduled restart job, restart counter is at 26.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.

In Signalk the signalk-node-red plugin is installed and running.

In node red I have signalk/node-red-embedded installed.

All appears to be at the latest version. Platform is Raspberry pi.

The only way to get out is to delete my flows_xxxxxxx.json

If anyone can help resolve this I'd very much appreciate it.


RE: Node Red fails when trying to process SignalK message - PaddyB - 2021-05-22

difficult to say much without seeing the actual flow..


RE: Node Red fails when trying to process SignalK message - baltika_no_9 - 2021-05-22

A fair point.

The "flow" is trivial, a single signalk Subscribe node and nothing else.

[{"id":"a31e7b75.60da78","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"2dc3c3b2.d8c90c","type":"signalk-subscribe","z":"a31e7b75.60da78","name":"Temp","mode":"sendAll","flatten":true,"context":"vessels.self","path":"environment.inside.temperature","source":"OpenPlotter.I2C.BMP280","period":1000,"x":180,"y":220,"wires":[[]]}]
~


RE: Node Red fails when trying to process SignalK message - PaddyB - 2021-05-22

Hmm, works fine here - are you running node-red from the webapps link in signalk?


RE: Node Red fails when trying to process SignalK message - baltika_no_9 - 2021-05-22

(2021-05-22, 08:02 PM)PaddyB Wrote: Hmm, works fine here - are you running node-red from the webapps link in signalk?

PaddyB

Thank you, no is the answer I was just running directly via my browser. I'd no idea that the webapp existed but when I tried it then it worked fine!

I need now to understand the difference between the two.

Thanks again, I appreciate your help.