Hello,
I have a flow executing commands to pulseaudio on a raspberry pi.
The flow works great when i launch node-red from the terminal (trough ssh), but when node red run as a service it is doing this error:
"
Command failed: pactl list sink-inputs
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
"
I found this topic which i think is related:
If i understood well this is "because pulseaudio requires an Xwindow environment to run"
So how should i change the nodered.service file to enable the Xwindow environnement in service mode?
Thanks a lot for your help, i'm pretty new to linux and any help will be much appreciated!
Having done some research (ie google) it appears that it may be that if you want to access pulseaudio from node-red running as a system service then you will have to run pulseaudio as a system service too. Apparently it runs by default as a User service rather than a System service. I am working at the edge of my knowledge here though, so I might be wrong. As to how to run pulseaudio as a system service rather than a user service I don't know.