Page 1 of 1

Node-red user piTest -R

Posted: 22 Nov 2024, 12:09
by rhys_m
Hi,

Recently upgraded a device to bookworm, node-red appears to now be running with limited priveleges which is great. However I can't seem to run piTest commands properly from node-red. Do I need to give access to the nodered user? I do get a return when running piTest -d, however not the return expected. Output from terminal

Code: Select all

Found 2 devices:

Address: 0 module type: 105 (0x69) RevPi Connect V1.0
Module is present
     input offset: 113 length: 6
    output offset: 119 length: 5

Address: 31 module type: 97 (0x61) RevPi DI V1.5
Module is present
     input offset: 0 length: 70
    output offset: 70 length: 18
Output from node-red

Code: Select all

Cannot retrieve device list: No such device

Re: Node-red user piTest -R

Posted: 22 Nov 2024, 12:21
by RevPiModIO
Hi!

In addition to Node-RED, the piControl device has also been improved in security. Only users of the group "picontrol" may access the process image via piTest, for example. However, you can easily change this for the user "nodered".

Code: Select all

# Add user nodered to group picontrol
sudo usermod -a -G picontrol nodered

# Restart Node-RED
pi@RevPi94373:~$ sudo systemctl restart nodered
That's all. Now you can use piTest again in the Exec node of Node-RED.

Sven

Re: Node-red user piTest -R

Posted: 22 Nov 2024, 12:27
by rhys_m
Awesome, thanks alot for the rapid response! Works perfectly