Omxplayer need help to play sounds on raspi

usr/bin/omxplayer

try:

/usr/bin/omxplayer
instead.

I did... same result: pic

What happens if you put in the name of a file that does not exist for the song file?

Also what do you see on output 1?

Click to see if file not exist (Code:1)

EDIT: I created test.sh with cmdline and tried to execute it with an exec node... same error (Code 255) .... hmmpf

And on output 1?

Error: not redy yet

This is the hint I think.

filename = "/home/pi/Desktop/lassedenken.mp3"
return {filename:filename,payload:"open"}

and next send the payload:

{payload:"playpause"}

thx ... result is: "The name org.mpris.MediaPlayer2.omxplayer was not provided by any .service files"
leads me to this: Error using debus for muting and unmuting ¡ Issue #492 ¡ popcornmix/omxplayer ¡ GitHub

Then i'm lost :wink:
I suspect that the omxplayer on commandline/exec node requires access to /dev and node-red does not have the privileges.

You still haven't told us what you see on output 1 when you use the exec node.

bash / console output: File "/home/pi/songs/blabla.mp3" not found.

node red output:
object
code: 255
message: string
Command failed: /home/pi/Downloads/test.sh

I meant for the good file. Connect a debug node to output 1 and show us what you see.
Edit That is for the direct call to omxplayer, not the script.

This is the output with a good file (output 1 and output 3)

A quick google search for the error message you are getting failed to open vchiq instance finds this stack overflow question about running omxplayer on a Pi from Php code - https://stackoverflow.com/questions/42583835/failed-to-open-vchiq-instance

Check the answers for the solution.

Thx ! This is the solution for "exec node not working" and for "rpi-omxplayer does not play sounds":

sudo chmod 777 /dev/vchiq

Much thanx to all that quick and exelent help to all you guys who answered !!!
@knolleary @Colin @bakman2 @ukmoose @afelix (no special order)
See ya in my next thread :wink: