I’ve previously used a Sonos via the MiOS binding to handle announcements from OH, but as I’ve recently added an amp it means that the Sonos is now not connected to it’s own speakers anymore. This means no more announcements, so I’m trying to get the built in Audio capabilities to work.
Does anyone have a simple guide on getting the audio output side working on a RPi3? I’ve got audio playing via the audio jack from the command line via mpg321
sudo apt-get -y install mpg321
mpg321 /etc/openhab2/sounds/doorbell.mp3
As far as I can tell, the config in OH2 (PaperUI) is all correct, I’ve specified the default sink to be “System Speaker (with mp3 support)” and the Voice to use Mary-TTS in English, but nothing I do results in any successful ‘play’ or ‘say’ output from within either rules or the karaf console.
I’m just getting errors about not being able to do stuff!
2017-01-01 14:54:48.691 [WARN ] [me.io.javasound.internal.AudioPlayer] - No line found: No line matching interface SourceDataLine supporting format PCM_SIGNED 48000.0 Hz, 16 bit, mono, 2 bytes/frame, 24000.0 frames/second, little-endian is supported.
2017-01-01 14:54:48.692 [INFO ] [me.io.javasound.internal.AudioPlayer] - Available lines are:
2017-01-01 14:54:48.727 [ERROR] [.internal.EnhancedJavaSoundAudioSink] - An exception occurred while playing audio : 'Cannot create AudioDevice'
I’ve also tried setting the masterVolume within my test script, but that just gives me a different set of errors in the log
2017-01-01 14:42:12.040 [ERROR] [se.smarthome.core.audio.AudioManager] - An exception occured while getting the volume of sink enhancedjavasound : 'Cannot determine master volume level'
2017-01-01 14:42:12.044 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Test system': An error occured during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.LogAction.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null
Any guides/pointers would be appreciated!