I recently got into openhab and am now trying to set up my first rule. Openhab runs on the Raspberry Pi Model B. I simply want a song to play when a Switch is activated. The rule looks as follows:
Item InstantParty changed from OFF to ON
However, I always get the log
2016-03-26 09:17:35.899 [ERROR] [.o.io.multimedia.actions.Audio] - Cannot play sound ‘What_is_love.mp3’: Cannot create AudioDevice
The song is in the sounds/ folder and I can play it via the terminal directly using omxplayer What_is_love.mp3, so in theory the Pi is able to play it.
The other thing I tried was using the executeCommandLine() method, but I’m not sure what exactly to type there. A simple omxplayer What_is_love.mp3 just gives me the log
2016-03-26 09:21:37.843 [INFO ] [g.openhab.io.net.exec.ExecUtil] - executed commandLine ‘omxplayer What_is_love.mp3’
But nothing happens. I also tried various combinations using the @@ documentation as referred to in other posts.
Any help would be greatly appreciated, as I’m really stumped. Thanks!