Waveshare e-Paper 6inch HD HAT - IT8951 in Exec Node

Hello everyone,

I just bought a Waveshare 6inch HD HAT module with IT8951 driver, and I want to get it working with Node Red.
My goal is to be able to send an image from a payload, and have the HAT display it on the screen.

The device is fully functional from the terminal, with these commands:

  1. cd /home/pi/IT8951-ePaper/Raspberry/
  2. sudo ./epd -1.99 0

I'm trying to use Node Exec, and I've tried various combinations, but I can't get it to work...

I tried these options without success :confused:

a) Directly in the command:
/home/pi/IT8951-ePaper/Raspberry/epd -1.99 0| sudo su
b) Command: epd
Append: msg.payload (String= -1.99 0)
Extra Input Parameters: | sudo su

what am I doing wrong?

any other way to boot the device from Node Red?

Why does the command need sudo? You can't use sudo in an exec node unless your system is configured to not need a password for sudo with that command.

The best solution is to allow the user running node-red access to the device without using sudo. The second best is to allow sudo with that command to not require a password. Once you have done one of those (so you can run it manually without requiring a password, then in the exec node you need
cd /home/pi/IT8951-ePaper/Raspberry/ && sudo ./epd -1.99 0
Obviously if you have worked out how to make it run without sudo then you don't need that in the command.

@Colin

Node-Red does not need SUDO, it starts at OS boot.

The one that needs the SUDO command is to initialize the EPD (Display E-Ink) because if you don't put it, it gives a "segment violation" error

I tried your option and it DOES work :wink: I appreciated it

THANKS for your help....

I was not suggesting that node red did need sudo.

That should be fixed in that software. Causing a violation is awful.

In that case I guess your pi is configured not to need a password for sudo. That is a bad idea.

My Node-Red has a password to start :+1:

Anyway, it is protected behind two Routers...
It is difficult to access that RPi from the Internet... and even if it is accessed, it does not have complex or security tasks.
But thank you very much for your comments, because it is something that I will have to do later!

Thanks for your help @Colin :slight_smile:

1 Like

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