[Help!] exec node + pulseaudio

Accessed terminal via VNC = results from command line instructions in the terminal window on the pi - these worked.

Accessed from laptop = results from Node-RED interface (exec node) accessed via laptop chrome - these failed

Accessed directly = results from Node-RED interface (exec node) accessed via chromium on the Pi (I was eliminating my laptop Chrome as the source of the problem) - these failed

The owner of the Pi did the firmware update, as the Pi is really old and hasn't been updated in a while - this is only relevant to Pi 4's.

You told me you were starting with a new build on the rpi4, now you you say someone else did the update.

I can not help you when you keep changing things.
Please go back to the pi zero w. Remove any hat and any hubs etc.
Flash a new SD card and put it into the pi zero w and power it on and wait till it boots up (this will take a bit since it has to expand the SD card).
SSH into the pi and run:

sudo apt update
sudo apt full-upgrade
pactl -- set-sink-volume 0 20%

Report the results and wait for me to tell you the next steps. Meanwhile I will do the same thing.

Here are my results. note I chose to still use 'Pi' as my user name when using the 'Raspberry Pi Imager'

pi@console1:~ $ history
    1  history
    2  sudo apt update
    3  sudo apt full-upgrade
    4  history
pi@console1:~ $ pactl -- set-sink-volume 0 20%
pi@console1:~ $ 

Notice no error running the command. Now I will wait to see your results.

Thanks for your systematic approach to troubleshooting.
I have followed your instructions precisely:

pi@raspberrypi:~ $ history
1 sudo apt update
2 sudo apt full-upgrade
3 pactl -- set-sink-volume 0 20%
4 history

Regards
Brendon

And did the pactl throw an error?

assuming it did not return an error, SSH back into the pi and install node red using
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
and reply y to both questions. When it finishes, run the pactl command again then start NR and paste the start up log to a reply. Here is my NR install thru NR startup;

Running Node-RED install for user pi at /home/pi on raspbian


This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED                       ✔
  Remove old version of Node-RED      ✔
  Remove old version of Node.js       ✔   
  Install Node.js for Armv6           ✔   v14.19.1   Npm 6.14.16
  Clean npm cache                     ✔
  Install Node-RED core               ✔   2.2.2 
  Move global nodes to local          -
  Npm rebuild existing nodes          ✔
  Install extra Pi nodes              ✔
  Add shortcut commands               ✔
  Update systemd script               ✔
                                      

Any errors will be logged to   /var/log/nodered-install.log
All done.
You can now start Node-RED with the command  node-red-start
  or using the icon under   Menu / Programming / Node-RED
Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started :  Sun 29 May 18:27:04 EDT 2022 
Finished:  Sun 29 May 18:37:19 EDT 2022
 
You may want to run   node-red admin init
to configure your initial options and settings.
 
pi@console1:~ $ pactl -- set-sink-volume 0 20%
pi@console1:~ $ node-red
29 May 18:45:25 - [info] 

Welcome to Node-RED
===================

29 May 18:45:25 - [info] Node-RED version: v2.2.2
29 May 18:45:25 - [info] Node.js  version: v14.19.1
29 May 18:45:25 - [info] Linux 5.15.32+ arm LE
29 May 18:45:30 - [info] Loading palette nodes
29 May 18:45:43 - [info] Settings file  : /home/pi/.node-red/settings.js
29 May 18:45:43 - [info] Context store  : 'default' [module=memory]
29 May 18:45:43 - [info] User directory : /home/pi/.node-red
29 May 18:45:43 - [warn] Projects disabled : editorTheme.projects.enabled=false
29 May 18:45:43 - [info] Flows file     : /home/pi/.node-red/flows.json
29 May 18:45:44 - [info] Creating new flow file
29 May 18:45:44 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

29 May 18:45:44 - [info] Server now running at http://127.0.0.1:1880/
29 May 18:45:44 - [info] Starting flows
29 May 18:45:44 - [info] Started flows

pactl did not throw an error.
I used the bash command line to install NR
Ran pactl again, still no error
Ran node-red
Result below:

Running Node-RED install for user pi at /home/pi on raspbian

This can take 20-30 minutes on the slower Pi versions - please wait.

Stop Node-RED :heavy_check_mark:
Remove old version of Node-RED :heavy_check_mark:
Remove old version of Node.js :heavy_check_mark:
Install Node.js for Armv6 :heavy_check_mark: v14.19.1 Npm 6.14.16
Clean npm cache :heavy_check_mark:
Install Node-RED core :heavy_check_mark: 2.2.2
Move global nodes to local -
Npm rebuild existing nodes :heavy_check_mark:
Install extra Pi nodes :heavy_check_mark:
Add shortcut commands :heavy_check_mark:
Update systemd script :heavy_check_mark:

Any errors will be logged to /var/log/nodered-install.log
All done.
You can now start Node-RED with the command node-red-start
or using the icon under Menu / Programming / Node-RED
Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started : Mon 30 May 17:49:06 BST 2022
Finished: Mon 30 May 17:59:11 BST 2022

You may want to run node-red admin init
to configure your initial options and settings.

pi@raspberrypi:~ $ pactl -- set-sink-volume 0 20%
pi@raspberrypi:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.23:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
30 May 18:02:06 - [info]
Welcome to Node-RED

30 May 18:02:06 - [info] Node-RED version: v2.2.2
30 May 18:02:06 - [info] Node.js version: v14.19.1
30 May 18:02:06 - [info] Linux 5.15.32+ arm LE
30 May 18:02:12 - [info] Loading palette nodes
30 May 18:02:26 - [info] Settings file : /home/pi/.node-red/settings.js
30 May 18:02:26 - [info] Context store : 'default' [module=memory]
30 May 18:02:26 - [info] User directory : /home/pi/.node-red
30 May 18:02:26 - [warn] Projects disabled : editorTheme.projects.enabled=false
30 May 18:02:26 - [info] Flows file : /home/pi/.node-red/flows.json
30 May 18:02:26 - [info] Creating new flow file
30 May 18:02:26 - [warn]

Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

30 May 18:02:26 - [info] Server now running at http://127.0.0.1:1880/
30 May 18:02:26 - [info] Starting flows
30 May 18:02:26 - [info] Started flows

So far, everything is as expected, and follows the process that I used with my previous installations.
I'll await your next steps :slight_smile:

Ok, great now import the flow:

[{"disabled":false,"env":[],"id":"27d6cae76dfbbdb1","info":"","label":"Flow 1","type":"tab"},{"addpay":"","append":"","command":"pactl -- set-sink-volume 0 20%","id":"1b0e2ed279b9c88d","name":"","oldrc":false,"timer":"","type":"exec","useSpawn":"false","winHide":false,"wires":[["a5c3cde7f06df862","036d47456cf6d7d4"],["c4bcd1215151f359"],["067fd8c0894758ca"]],"x":510,"y":180,"z":"27d6cae76dfbbdb1"},{"crontab":"","id":"8e948c825a7ab298","name":"","once":false,"onceDelay":0.1,"payload":"","payloadType":"date","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","topic":"","type":"inject","wires":[["1b0e2ed279b9c88d"]],"x":280,"y":180,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"c4bcd1215151f359","name":"pactl stderr","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":840,"y":180,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"a5c3cde7f06df862","name":"pactl stdout","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":840,"y":140,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"067fd8c0894758ca","name":"pactl RC","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":830,"y":220,"z":"27d6cae76dfbbdb1"},{"addpay":"","append":"","command":"amixer set Master 70%","id":"036d47456cf6d7d4","name":"","oldrc":false,"timer":"","type":"exec","useSpawn":"false","winHide":false,"wires":[["fbb12fd84db39755"],["c609af3bea6d77db"],["4cd2c4281e32f5be"]],"x":510,"y":380,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"c609af3bea6d77db","name":"amixer stderr","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":840,"y":380,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"fbb12fd84db39755","name":"amixer stdout","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":840,"y":340,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"4cd2c4281e32f5be","name":"amixer RC","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":830,"y":420,"z":"27d6cae76dfbbdb1"},{"id":"cf53559376404d84","name":"","scope":null,"type":"catch","uncaught":false,"wires":[["ac9e9794d0c0c914"]],"x":420,"y":60,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":false,"id":"ac9e9794d0c0c914","name":"","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":670,"y":60,"z":"27d6cae76dfbbdb1"}]

and run it. The debug will go to the sidebar and the console. Here is what my console looks like:

30 May 13:54:34 - [info] Started flows
30 May 13:54:37 - [info] [debug:pactl stdout] 
{ _msgid: 'd0de1f13af176fcc', topic: '', payload: '', rc: { code: 0 } }
30 May 13:54:37 - [info] [debug:pactl RC] 
{ _msgid: 'd0de1f13af176fcc', topic: '', payload: { code: 0 } }
30 May 13:54:38 - [info] [debug:amixer stdout] 
{
  _msgid: 'd0de1f13af176fcc',
  topic: '',
  rc: { code: 0 },
  payload: "Simple mixer control 'Master',0\n" +
    '  Capabilities: pvolume pswitch pswitch-joined\n' +
    '  Playback channels: Front Left - Front Right\n' +
    '  Limits: Playback 0 - 65536\n' +
    '  Mono:\n' +
    '  Front Left: Playback 45875 [70%] [on]\n' +
    '  Front Right: Playback 45875 [70%] [on]\n'
}
30 May 13:54:38 - [info] [debug:amixer RC] 
{
  _msgid: 'd0de1f13af176fcc',
  topic: '',
  rc: { code: 0 },
  payload: { code: 0 }
}

what does yours show?

How are you accessing the Node-RED interface? Through your laptop web browser, or the web browser on the Pi itself?

I loaded it through my laptop web browser at http://192.168.1.23:1880/#flow/27d6cae76dfbbdb1

The console output is:

30 May 19:09:08 - [info] Started flows
30 May 19:09:12 - [info] [debug:pactl stdout]
{
  _msgid: '3bf13a26fea6b56e',
  topic: '',
  payload: '',
  rc: {
    code: 1,
    message: 'Command failed: pactl -- set-sink-volume 0 20%\n' +
      'Connection failure: Connection refused\n' +
      'pa_context_connect() failed: Connection refused\n'
  }
}
30 May 19:09:12 - [info] [debug:pactl stderr]
{
  _msgid: '3bf13a26fea6b56e',
  topic: '',
  payload: 'Connection failure: Connection refused\n' +
    'pa_context_connect() failed: Connection refused\n',
  rc: {
    code: 1,
    message: 'Command failed: pactl -- set-sink-volume 0 20%\n' +
      'Connection failure: Connection refused\n' +
      'pa_context_connect() failed: Connection refused\n'
  }
}
30 May 19:09:12 - [info] [debug:pactl RC]
{
  _msgid: '3bf13a26fea6b56e',
  topic: '',
  payload: {
    code: 1,
    message: 'Command failed: pactl -- set-sink-volume 0 20%\n' +
      'Connection failure: Connection refused\n' +
      'pa_context_connect() failed: Connection refused\n'
  }
}
30 May 19:09:13 - [info] [debug:amixer stdout]
{
  _msgid: '3bf13a26fea6b56e',
  topic: '',
  rc: {
    code: 1,
    message: 'Command failed: amixer set Master 70%\n' +
      "amixer: Unable to find simple control 'Master',0\n" +
      '\n'
  },
  payload: ''
}
30 May 19:09:13 - [info] [debug:amixer stderr]
{
  _msgid: '3bf13a26fea6b56e',
  topic: '',
  rc: {
    code: 1,
    message: 'Command failed: amixer set Master 70%\n' +
      "amixer: Unable to find simple control 'Master',0\n" +
      '\n'
  },
  payload: "amixer: Unable to find simple control 'Master',0\n\n"
}
30 May 19:09:13 - [info] [debug:amixer RC]
{
  _msgid: '3bf13a26fea6b56e',
  topic: '',
  rc: {
    code: 1,
    message: 'Command failed: pactl -- set-sink-volume 0 20%\n' +
      'Connection failure: Connection refused\n' +
      'pa_context_connect() failed: Connection refused\n'
  },
  payload: {
    code: 1,
    message: 'Command failed: amixer set Master 70%\n' +
      "amixer: Unable to find simple control 'Master',0\n" +
      '\n'
  }
}

I accessed node-red running on my pi zero w from my Mac mini using safari as my browser.

I access it using 192.168.48.229:1880
Please ctrl-c out of NR and run

groups pi
cat /proc/device-tree/model
cat /etc/os-release
pactl -- set-sink-volume 0 20%

Here is what I get:

30 May 15:03:28 - [info] Stopped flows
**pi@console1** : **~ $** groups pi
pi : pi adm dialout cdrom sudo audio video plugdev games users input render netdev spi i2c gpio lpadmin
**pi@console1** : **~ $** cat /proc/device-tree/model
Raspberry Pi Zero W Rev 1.1 **pi@console1** : **~ $**
**pi@console1** : **~ $** cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
**pi@console1** : **~ $** pactl -- set-sink-volume 0 20%
**pi@console1** : **~ $**

groups pi
pi : pi adm dialout cdrom sudo audio video plugdev games users input render netdev spi i2c gpio lpadmin

cat /proc/device-tree/model
Raspberry Pi Zero W Rev 1.1

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="RaspbianForums - Raspbian"
BUG_REPORT_URL="RaspbianBugs - Raspbian"

pi@raspberrypi:~ $ pactl -- set-sink-volume 0 20%
pi@raspberrypi:~ $

I have one more idea. Please start up NR again and import and run this flow (it will run ifconfig). Then CTRL-C out of NR and run `ifconfig' and compare the two outputs

[{"addpay":"","append":"","command":"ifconfig","id":"792bdd51a0d39a8c","name":"","oldrc":false,"timer":"","type":"exec","useSpawn":"false","winHide":false,"wires":[["170815cfe6698b90"],["b399775753a21011"],["bec1416b14f0cd29"]],"x":320,"y":580,"z":"27d6cae76dfbbdb1"},{"crontab":"","id":"c99e1c24b6a334a4","name":"","once":false,"onceDelay":0.1,"payload":"","payloadType":"date","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","topic":"","type":"inject","wires":[["792bdd51a0d39a8c"]],"x":160,"y":580,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"b399775753a21011","name":"ifconfig stderr","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":720,"y":580,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"170815cfe6698b90","name":"ifconfig stdout","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":720,"y":540,"z":"27d6cae76dfbbdb1"},{"active":true,"complete":"true","console":true,"id":"bec1416b14f0cd29","name":"ifconfig RC","statusType":"auto","statusVal":"","targetType":"full","tosidebar":true,"tostatus":false,"type":"debug","wires":[],"x":710,"y":620,"z":"27d6cae76dfbbdb1"}]

I wonder if you have a network issue where the IP are different. Here is what I get:

30 May 16:17:01 - [info] [debug:ifconfig stdout] 
{
  _msgid: '6732b845b7509fba',
  topic: '',
  payload: 'lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536\n' +
    '        inet 127.0.0.1  netmask 255.0.0.0\n' +
    '        inet6 ::1  prefixlen 128  scopeid 0x10<host>\n' +
    '        loop  txqueuelen 1000  (Local Loopback)\n' +
    '        RX packets 49  bytes 4468 (4.3 KiB)\n' +
    '        RX errors 0  dropped 0  overruns 0  frame 0\n' +
    '        TX packets 49  bytes 4468 (4.3 KiB)\n' +
    '        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\n' +
    '\n' +
    'wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\n' +
    '        inet 192.168.48.229  netmask 255.255.255.0  broadcast 192.168.48.255\n' +
    '        inet6 fe80::c456:feb0:be8c:c920  prefixlen 64  scopeid 0x20<link>\n' +
    '        ether b8:27:eb:30:32:5c  txqueuelen 1000  (Ethernet)\n' +
    '        RX packets 326629  bytes 131019120 (124.9 MiB)\n' +
    '        RX errors 0  dropped 0  overruns 0  frame 0\n' +
    '        TX packets 24590  bytes 7094523 (6.7 MiB)\n' +
    '        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\n' +
    '\n',
  rc: { code: 0 }
}
30 May 16:17:01 - [info] [debug:ifconfig RC] 
{ _msgid: '6732b845b7509fba', topic: '', payload: { code: 0 } }
^C30 May 16:24:28 - [info] Stopping flows
30 May 16:24:28 - [info] Stopped flows
pi@console1:~ $ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 49  bytes 4468 (4.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 49  bytes 4468 (4.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.48.229  netmask 255.255.255.0  broadcast 192.168.48.255
        inet6 fe80::c456:feb0:be8c:c920  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:30:32:5c  txqueuelen 1000  (Ethernet)
        RX packets 328013  bytes 131231785 (125.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24700  bytes 7111288 (6.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pi@console1:~ $ 

as you can see the wlan0 IP addresses are the same.

30 May 21:35:04 - [info] [debug:ifconfig stdout]
{
_msgid: 'c1b8ec9de762e62b',
topic: '',
payload: 'lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536\n' +
' inet 127.0.0.1 netmask 255.0.0.0\n' +
' inet6 ::1 prefixlen 128 scopeid 0x10\n' +
' loop txqueuelen 1000 (Local Loopback)\n' +
' RX packets 47 bytes 4277 (4.1 KiB)\n' +
' RX errors 0 dropped 0 overruns 0 frame 0\n' +
' TX packets 47 bytes 4277 (4.1 KiB)\n' +
' TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\n' +
'\n' +
'wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500\n' +
' inet 192.168.1.23 netmask 255.255.255.0 broadcast 192.168.1.255\n' +
' inet6 2a02:6b6b:7811:0:4260:926b:c6b3:7fa1 prefixlen 64 scopeid 0x0\n' +
' inet6 fe80::814c:c43d:57d9:df37 prefixlen 64 scopeid 0x20\n' +
' ether b8:27:eb:7a:ae:51 txqueuelen 1000 (Ethernet)\n' +
' RX packets 256501 bytes 291190820 (277.7 MiB)\n' +
' RX errors 0 dropped 0 overruns 0 frame 0\n' +
' TX packets 49489 bytes 7883149 (7.5 MiB)\n' +
' TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\n' +
'\n',
rc: { code: 0 }
}
30 May 21:35:04 - [info] [debug:ifconfig RC]
{ _msgid: 'c1b8ec9de762e62b', topic: '', payload: { code: 0 } }

ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 47 bytes 4277 (4.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47 bytes 4277 (4.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.23 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2a02:6b6b:7811:0:4260:926b:c6b3:7fa1 prefixlen 64 scopeid 0x0
inet6 fe80::814c:c43d:57d9:df37 prefixlen 64 scopeid 0x20
ether b8:27:eb:7a:ae:51 txqueuelen 1000 (Ethernet)
RX packets 256620 bytes 291200972 (277.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 49532 bytes 7891814 (7.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Sorry, but at this point I have no idea why it works for you in terminal mode but not via node-red but does work for me. There has to be something about your environment like a firEwall, security software or something that is causing the permission issue but at this point I have no idea. If you leaved near by I’d come and see if my pi worked on your network and if yours failed one mine. But being ‘across the pond’ that’s not going to happen.

Maybe someone else will have an idea but I’m at a loss.

I loaded the Node-RED interface via VNC --> Chromium --> 127.0.0.1:1880 in order to bypass any network issues and eliminate my laptop as the source of the problem.

I got the same error messages :frowning:

I got it working (but I don't know why it works).

sudo nano /etc/pulse/client.conf
uncomment autospawn = yes
Reboot

Your sample flow now works with no further modifications required.

2 Likes

can you show the full file
cat /etc/pulse/client.conf

; default-sink =
; default-source =
; default-server =
; default-dbus-server =

autospawn = yes
; daemon-binary = /usr/bin/pulseaudio
; extra-arguments = --log-target=syslog

; cookie-file =

; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB

; auto-connect-localhost = no
; auto-connect-display = no

After doing some ‘googling’ I suspect that this is happening because of something you are plugging into your pi or a hat on the pi. I found instances where someone plugging a usb sound device messed up pulse audio. Add that to the fact that it works for me (I can not recreate it) leads me to that conclusion.

Thankfully you have found a solution to your issue so I will close this thread.