I started again...
Raspberry Pi 4 without every having connected the hub or speaker.
Standard build using Raspberry Pi imager (64bit)
Ran updates
cat /etc/os-release: PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
cat /sys/firmware/devicetree/base/model: Raspberry Pi 4 Model B Rev 1.2
Accessed terminal via VNC:
pactl -- set-sink-volume 0 15% worked
amixer set Master 70% worked
groups pi is correct
pi : pi adm dialout cdrom sudo audio video plugdev games users input render netdev spi i2c gpio lpadmin
amixer -version
amixer version 1.2.4
pacmd list-sinks | grep -e 'name:' -e 'index:'
- index: 0
name: <alsa_output.platform-bcm2835_audio.analog-stereo>
Installed base Node-RED
Standard install, no additional nodes
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
Ran node-red admin init
No user security
No projects
Pass raspb3rry
Default theme
Default editor
Allow Function nodes to load external modules? (functionExternalModules) ¡ Yes
Started node-red
node-red-start
Starting as a systemd service.
27 May 15:14:14 - [info]
Welcome to Node-RED
27 May 15:14:14 - [info] Node-RED version: v2.2.2
27 May 15:14:14 - [info] Node.js version: v14.19.3
27 May 15:14:14 - [info] Linux 5.15.32-v8+ arm64 LE
27 May 15:14:15 - [info] Loading palette nodes
27 May 15:14:17 - [info] Settings file : /home/pi/.node-red/settings.js
27 May 15:14:17 - [info] Context store : 'default' [module=memory]
27 May 15:14:17 - [info] User directory : /home/pi/.node-red
27 May 15:14:17 - [warn] Projects disabled : editorTheme.projects.enabled=false
27 May 15:14:17 - [info] Flows file : /home/pi/.node-red/flows.json
27 May 15:14:17 - [info] Creating new flow file
27 May 15:14:17 - [info] Server now running at http://127.0.0.1:1880/
27 May 15:14:17 - [info] Starting flows
27 May 15:14:17 - [info] Started flows
Imported your nodes
Your code above, under the text "I then installed NR using the script and created the following flows"
Accessed from laptop
http://192.168.16.85:1880/ via laptop
Exec node: pactl -- set-sink-volume 0 20%
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
Exec node: amixer set Master 70%
amixer: Unable to find simple control 'Master',0
Accessed directly
http://127.0.0.1:1880 via chromium on the Pi (access via VNC)
Got exactly the same error messages
I added another exec node with touch ~/Documents/hello3.txt
Running that worked correctly
So did examples like rm, date, amixer -version
However, pacmd list-sinks gave back " " not the full output.
Hmmmm