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:
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
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
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.
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!