WS2801 on Raspberry Pi not working

I can't imagine there might be many people using these (string of 50 water proof RGB LEDS that use 2-wire SPI for data/clock)

I used to have them working in Node-RED last christmas but they only work this year if I say there is only 1 in the string - I can control that one fine

Once I say I have more (say 10) I just get a couple of them lighting up with random colour)

To prove they weren't broken, I installed an old Adafruit python lib and they worked fine

The only hint I'm getting is this error message in the terminal
image

Voltage Simon? If I seem to remember they need vdd * 0.7 on the 2 wire SPI, sometimes they work and sometimes not.

[edit] have you got a level shifter handy?

:slight_smile:

I've been investigating and it seems that github was updated 18 days ago but npm hasn't caught up

So I installed it direct from github - but now I get a really big error message :frowning:

But, I've tested the underlying npm rpi-gpio library and I can run a native JS file just using node itself so there is hope

I missed that you had tried with Python!!

I do that myself all the time - it must be age :slight_smile:

Ha, I blame fingers being faster than the brain. A stupid hypothesis as the fingers are controlled by the brain :slight_smile:

Looking at github for the contrib node and then looking at recent changes in the code for its upstream npm package, I can see where the connect function has changed from needing 3 to now needing 4 parameters
Further investigation has found out that the upstream rpi-gpio package has change the package it uses to access the SPI bus and that is the thing causing the issue

Going to see if I can bodge my local copy to get it working!

Bodge success :slight_smile:

node.leds.connect(node.numLeds, 0,0 , node.gamma); // bodge to cope with changes in rpi-ws2801 (which changed to using a different underlying spi lib)

I've raised an issue with the node on github so hopefully it'll get sorted officially

Ha, ha - I can see the problem - the red wire (second from the left) is not making a very good contact.

Oops - the other problem might be 'Bott-RED' is empty at this end.

Dave, are you using node-red-contrib-merlot?

Yes I am - I found it on the drop-down menu in the Human-In category.

Anybody found the new node-red-contrib-auto-tidy-up yet?
I also really need it urgently
:wink:

I've been working on it for years but the more I get it to clean up, the messier things end up. Go figure.

If you are using native tidy together with native auto library then it fails most of time cos auto library contains let-it-be library and this overrides most of your custom methods. Took me years of trial and error to figure it out.

Wow! And I thought my workbench was messy... :rofl:

I vote we move this to the Lounge so as not to scare newcomers!

That's my desk overflow area for when I can't get anything more on the desk itself :slight_smile:

Posting photos of your desk might be too traumatic for your average viewer!

Back to business ...... :slight_smile:

@nlecaude has asked me to do a PR as he is away at moment so I've done that but he'll need to update the main npm package

If anyone actually needs it ASAP- you can just install from my github fork in the meantime

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

Maybe I could have used a less verbose branch name :slight_smile: