The response looks first reasonable: openhab 3003 2.5 0.6 101188 6628 ? Sl 16:52 0:00 /usr/bin/pulseaudio -start -log-target=syslogĪlso a look into syslog looks fine: Mar 4 16:52:16 raspberrypi bluetoothd: Endpoint registered: sender=:1.85 path=/MediaEndpoint/A2DPSource When I do a openhab> smarthome:audio play doorbell.mp3Īnd afterwards for a ps -aux | grep -i pulseaudio First everything works fine (maybe I should mention that I am using a headless system without a running X server). I updated today to Java 8u121 (from 8u65) with the recommended instructions ( which is currently) in order to be able to use. Runnin a java simple program to test the sound output gives: Exception in thread "main" : no pulse-java in Īt (ClassLoader.java:1867)Īt 0(Runtime.java:870)Īt (System.java:1122)Īt .SecurityWrapper.loadNativeLibrary(SecurityWrapper.java:27)Īt .EventLoop.(EventLoop.java:97)Īt .PulseAudioMixer.openImpl(PulseAudioMixer.java:654)Īt .PulseAudioMixer.openLocal(PulseAudioMixer.java:588)Īt .PulseAudioMixer.openLocal(PulseAudioMixer.java:584)Īt .PulseAudioMixer.open(PulseAudioMixer.java:579)Īt .PulseAudioDataLine.open(PulseAudioDataLine.java:94)Īt .PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:75)Īt .PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:90)Īt .DataPusher.start(DataPusher.java:107)Īt .DataPusher.start(DataPusher.java:91)Īt (AudioDevice.java:118)Īt (AudioDevice.java:190)Īt (AudioPlayer.java:133)Īnybody got a clue? I’d like to get rid of Oracle…Īnother new experience. # cat cat /opt/zulu/8u112/jre/lib/sound.properties Same approach didn’t work with Zulu : # ls -la /opt/zulu/8u112/jre/lib/ext/ĭrwxrwxr-x 2 root root 4096 Feb 13 11:50. Sudo cp /usr/share/java/pulse-java* /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/ext/Įdit /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/sound.properties and add the following lines: =.PulseAudioMixerProviderĪnd voila!, now smarthome:audio play doorbell.mp3 plays nicely on my BT speaker Install need packages apt-get install libpulse-jni libpulse-javaĬopy pulse-java files: sudo cp /usr/lib/arm-linux-gnueabihf/jni/libpulse-java.so /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/arm/ I got it working using oracle-java8-jdk (I also tried the same with Zulu, but no luck) Here’s what needs to be done to output the sound from openhab to pulseaudio (and a BT connected speaker in my case). So I guess I’m using PulseAudio right now … (the default-java is actually just a link, depending on packages you have installed or not, multiple directories may exist with a sound.properties below each, so ensure you edit the one your java is actively using). I remember it was essential to change /usr/lib/jvm/default-java/jre/lib/sound.properties. I tried doing the same quite a while back but never quite managed to get the BT part to work properly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |