Clarity needed on operating (node-red-node-daemon)

I have a bunch of demo scripts for my SSD1330 SPI based Colour OLED Display. It seems the only way to control this display is via Python scripts. Fine, I can do that :stuck_out_tongue: But I wanted to try controlling it via Node-Red.

I found the daemon node, and it works just fine as is (repeatedly runs my script) but the directions are unclear as to how to control the node more precisely.

Setting msg.kill to a signal name (e.g. SIGINT, SIGHUP) will stop the process - but if the restart flag is set it will then auto restart.

Sending msg.start will also re-start the process.

After unchecking the auto-start/relaunch flags, I have tried setting up to inject nodes to send msg.start and msg.kill... but nothing seems to work, it just throws this clear error Command not running... doh, I can see that :stuck_out_tongue:

What am I not seeing?


in the left had side, change payload to start
in the righthand side, change to bool -> true

in the left had side, change payload to kill
in the righthand side, change to kill -> string SIGINT or SIGHUP

Thanks :smiley: Works perfectly!!

I wish the directions themselves for many nodes were this clear for us uninitiated users :blush:

I was close on the start command... but had left the right side (payload) blank. Makes sense now that I see it... duh :stuck_out_tongue:

Oh boy... perhaps it is too late and I need sleep, but this seemed like it should work?

(I tried with and without quotes)

The Error doesn't make sense either... I thought I was sending a string?

msg.payload : number

Well, if anyone can answer that last one, fine... meanwhile I found an alternative that works as expected.


Function contains this:

let str1 = "/home/pi/luma.examples/examples/";
let str2 = msg.payload;
let str3 = " -d ssd1331 -i spi --width 96";
let res = str1.concat(str2, str3);
msg.payload = res;
return msg;

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.