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

**URL:** <https://discourse.nodered.org/t/waveshare-e-paper-6inch-hd-hat-it8951-in-exec-node/73784>\
**Category:** General\
**Created:** [16 January 2023 22:18 UTC](https://discourse.nodered.org/t/waveshare-e-paper-6inch-hd-hat-it8951-in-exec-node/73784 "2023-01-16T22:18:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Triark](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/triark/32/58932_2.png) [@Triark](https://discourse.nodered.org/u/Triark)\
**Post date:** [16 January 2023 22:18 UTC](https://discourse.nodered.org/t/waveshare-e-paper-6inch-hd-hat-it8951-in-exec-node/73784/1 "2023-01-16T22:18:22Z")

</div>

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 😕

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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 January 2023 14:04 UTC](https://discourse.nodered.org/t/waveshare-e-paper-6inch-hd-hat-it8951-in-exec-node/73784/2 "2023-01-17T14:04:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Triark](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/triark/32/58932_2.png) [@Triark](https://discourse.nodered.org/u/Triark)\
**Post date:** [17 January 2023 14:22 UTC](https://discourse.nodered.org/t/waveshare-e-paper-6inch-hd-hat-it8951-in-exec-node/73784/3 "2023-01-17T14:22:22Z")

</div>

@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 😉 I appreciated it

THANKS for your help....

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 January 2023 15:00 UTC](https://discourse.nodered.org/t/waveshare-e-paper-6inch-hd-hat-it8951-in-exec-node/73784/4 "2023-01-17T15:00:40Z")

</div>

> [@Triark](#):
>
> Node-Red does not need SUDO, it starts at OS boot.

I was not suggesting that node red did need sudo.

> [@Triark](#):
>
> 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

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

> [@Triark](#):
>
> I tried your option and it DOES work

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

---

<div class="post-metadata">

**Author:** ![Triark](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/triark/32/58932_2.png) [@Triark](https://discourse.nodered.org/u/Triark)\
**Post date:** [17 January 2023 15:20 UTC](https://discourse.nodered.org/t/waveshare-e-paper-6inch-hd-hat-it8951-in-exec-node/73784/5 "2023-01-17T15:20:35Z")

</div>

> [@Colin](#):
>
> 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 👍

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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 January 2023 15:21 UTC](https://discourse.nodered.org/t/waveshare-e-paper-6inch-hd-hat-it8951-in-exec-node/73784/6 "2023-01-31T15:21:06Z")

</div>

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