Basics: Reading Documentation - Message structure

Hello,
i need some really fundamental help with the documentation.

I want to use the ws2801 but I'm not able to read the syntax properly.
Corresponds my self generated message with the demand for the ws2801 node?

Bildschirmfoto 2021-01-20 um 12.28.49

{"_msgid":"be0cfd5f.68466","topic":"fill","payload":[50,50,50]}

Or is the structure of the message meant in some other way, like payload under topic??! Is the array right in that way?

Sadly i don't know where to search for my failure: Hardware or software. So a short answer would catapult me forward.

Thanks!

Your message structure looks correct in your example.
the node is 3 years old and last comment in the github issue was december 2019.
there is some talk on this forum here

There have been some issues with this node so you might want to look at the GitHub Issues for it.

I did see few of these comments. But I thought it could work
So it looks like bigger construction area..

Do anyone have some other way to talk to ws2801 with raspberry an homebridge? At least Node-Red would be nice.

Thanks for your quick response!

i can never recall - are they the same as neopixels ? node-red-node-pi-neopixel ?

Hi
The node itself is broken and although I supplied a PR to fix it, the author has never incorporated into their node

Might be worth removing the original node and see if you can install direct from my fork
So uninstall the node using the Manage Palette option
Then get into a terminal on your pi, move into your .node-red folder and run this

npm install https://github.com/cymplecy/https://github.com/cymplecy/node-red-contrib-rpi-ws2801#Change-to-deal-with-upstream-move-to-use-bus-and-device-instead-of-port

Once you've done that, try it out and come back if it still doesn't seem to work for you

(I haven't used it on an new pi in a long time so it might not work)

don‘t think so. 2801 is talking over SPI.

need some time for that.
Thanks!

Hi all,

was quite a while for my testing.
I now trigger my ws2801 via python and adafruit_ws2801. Code is working fine.

Now I want to trigger the python code out of node red, so that I can use homebridge and apple homekit. Starting some simple code via the exec node is working fine. But my code is using the "when_pressed" attribute of gpiozero library (should be something like interrupts). The python code starts and runs to end, but is not waiting for the "when_pressed" command. It ends before some gpio is triggered.

Does anyone know about the problem or some help?
Is the only way to keep the code running using some while loops? Using interrupts should safe some performance.

You could start the code with the exec node and use the spawn mode (Output dropdown menu), or you could try node-red-node-daemon.

I am not sure what you are asking, are you asking for help with writing the python code? If so then there may be better places to ask.

The python code is working, as long as I start it direct out of the terminal. When I start it with the exec node, it runs to the end and stops. So my question is, if there is something special with exec node when I want to keep the code running.

spawn mode is activated. It stills stops after the configuration of the interrupts and is not waiting.

The node-daemon was not working. Should be the same command like in the exec node right? Without any arguments.

It is up to the python code when it stops. Add some debug code to it and work out why it is stopping.

In general yes, but without knowing the python code, I can't be certain. If it works properly started from the command line, you probably should be looking to see why daemon is different.

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