Code: Select all
os.execute ('amixer -D bluealsa sset "Trust SPK-14 - A2DP" 80%')
os.execute ('mplayer /home/pi/deurbel.mp3')
mplayer /home/pi/deurbel.mp3 does work as a direct command in putty.
Does anybody know what's wrong?
Moderator: leecollings
Code: Select all
os.execute ('amixer -D bluealsa sset "Trust SPK-14 - A2DP" 80%')
os.execute ('mplayer /home/pi/deurbel.mp3')
Code: Select all
os.execute ("runuser -l pi -c \'mplayer /home/pi/deurbel.mp3'")Good that you solved it. What I understand is that domoticz executes all OS commands as the same user domoticz is executed with. So not necessarily root.fvdp80 wrote: Sunday 02 February 2020 13:02 The problem lies in the fact that mplayer can't be executed as root (due to alsa or pulse) and domoticz
executes all commands as root.
Users browsing this forum: No registered users and 1 guest