- Platform information:
- Hardware: Raspberry Pi 4
- OS: Raspbian
- Java Runtime Environment: openjdk 1.8.0_222 is installed in the openhab docker image
- openHAB version: openhab:milestone docker image
- Issue of the topic:
I have created a rule to play a sound when my contact sensor changes:
rule "rule test" when Item AqaraContact changed then logDebug("test", "blah test") playSound("glados.wav") end
Whenever the rule is executed, I see this error in my logs:
2019-08-17 22:16:54.768 [WARN ] [ab.io.javasound.internal.AudioPlayer] - No line found: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, mono, 2 bytes/frame, 22050.0 frames/second, little-endian is supported. 2019-08-17 22:16:54.770 [INFO ] [ab.io.javasound.internal.AudioPlayer] - Available lines are:
I am able to play the same sound file from the command line on the pi and from the command line if I go into the docker container itself (using
docker exec -it container_id /bin/bash).
Openhab runs under root in my docker container. I couldn’t get the docker container to run as openhab with the openhab group for some reason, so I found an option to run as root in the documentation for the openhab docker image.
Here is my docker-compose file:
version: '3' services: openhab: container_name: openhab image: "openhab/openhab:milestone" restart: always network_mode: host cap_add: - NET_ADMIN - NET_RAW volumes: - "/etc/localtime:/etc/localtime:ro" - "/etc/timezone:/etc/timezone:ro" - "/home/pi/openhab/volumes/conf:/openhab/conf" - "/home/pi/openhab/volumes/userdata:/openhab/userdata" - "/home/pi/openhab/volumes/addons:/openhab/addons" devices: - "/dev/snd:/dev/snd" - "/dev/ttyAMA0:/dev/ttyAMA0" - "/dev/ttyACM0:/dev/ttyACM0" environment: - USER_ID=110 - GROUP_ID=115 command: "tini -s ./start.sh server"