Switch item=Alarm icon="alarm"
Text item=Contact_E label="Eingangstür ist [MAP(en.map):%s]" icon="frontdoor"
Rules code related to the issue
rule "Flur Alarm = ON"
when
Item Contact_E changed to OPEN
then
if (Alarm.state == ON) {
playSound("doorbell.mp3") //don't work
playSound("webaudio","doorbell.mp3") // don't work
say("Alarm") // don't work
sendBroadcastNotification("Eingangstür wurde geöffnet") //ok
}
end
The entries you posted to be in rules.cfg (where do you have this file?) should be in runtime.cfg or youcould as well set those on PaperUI.
Checking on PaperUI migth reveal them not set!, hence openHAB does not know where to play any sound. enhencedjavasound as I read the documentation is played only at the openHAB server, do you have aspeaker connected? Webaudio would be played on a remote device if either PaperUI or HABPanel are displayed (if this device has a speaker of course).
The say command would need an installed TTS service.
You are using Java 11, although 8 is requested, I can’t say if Java 11 raises problems for the audio parts.
the fine name is runtime.cfg (mistake by tipping)
I changed the settings of runtime.cfg from enhencedjavasound to webaudio
now i receive the log entry
2020-08-13 20:46:05.838 [arthome.event.PlayURLEvent] - Play URL ‘/audio/8e2189bb-a1fc-41fd-8f74-122178ea4f61’.
I use a macbook pro and this device have a speaker but no sound come out
What kind of UI is the macbook showing when the comandtopic is performed?
The log tells you it did work. I tested it via the karaf console ( command smarthome:audio play doorbell.mp3) my system set to use web audio as default, my smartphone had habpanel showing and the bell was ringing!
As said before the documentation states that so far only HABPanel and PaperUI are supported. IMHO one of them has to be active.
What is your default audio sink?
oh, yes I already changed it… Paper UI & OpenHab APP are open / active, command in terminal openhab> smarthome:audio play doorbell.mp3 was putted, no sound come out
All I can say is that this setup works for me if HABPanel (which is not the same as the openHAB App, but can be started via it!) or PaperUI are shown in a browser.
i tried to change the sinc settings back to the ‘system speaker’, connected a speaker to my Raspberry and the sound come out. Then i changed the settings back to ‘web audio’, no sound come out from my MAC or iPhone device with activated HABPanel or PaperUI & OpenHab APP, but sound come out from Raspberry system speaker.
now i am confused
Its looks like the settings in PaperUI or runtime.cfg don’t grab…
runtime.cfg:
################### AUDIO #######################
# This parameter defines the default audio source to use (if not set, the first available one will be used.
#
org.eclipse.smarthome.audio:defaultSource=javasound
# This parameter defines the default audio sink to use (if not set, the first available one will be used.
#
org.eclipse.smarthome.audio:defaultSink=webaudio
If you set webaudio in runtime.cfg and after starting PaperUI shows Web Audio it should have ben recognised by the system.
Changing it via PaperUI while openHAB is running is also possible. DO NOT forget to hit the SAVE button!
You can use the karaf console to check the default audio sink like you showed in Post #1, the audio sink marked with a * is the default.
I do assume that you checked your devices to have set the audio volume to something other then 0