This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Node Red fails when trying to process SignalK message
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:
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.
difficult to say much without seeing the actual flow..
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":[[]]}]
Hmm, works fine here - are you running node-red from the webapps link in signalk?
(2021-05-22, 08:02 PM)PaddyB Wrote: Hmm, works fine here - are you running node-red from the webapps link in signalk?


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.

Forum Jump:

Users browsing this thread: 1 Guest(s)