Problem with playing audio on tablet

Hello
i have a rule to play a song on some times - the script call up - but then it gives a Error

2019-03-31 11:52:00.028 [ERROR] [.internal.EnhancedJavaSoundAudioSink] - An exception occurred while playing audio : 'Cannot create AudioDevice'

do i have to install something?
have a nice day
vinc

as i have been reading - it is not possible!
so i installed kodi too.
and could connect, what else have to be added to play sound?

the rule is esy

rule "Test"
   when
      Time cron "0 0/2 * 1/1 * ? *"
   then
        playSound("Zeit.mp3")
        
        end

i wish to have set the volume to 45%
and play a mp3 file
there is no need to controll more - at least till now

have a nice day
vinc

Depending on where you want the audio to be played, you need to setup an audio sink, as described here in the documentation.

Where do you want to play the audio, on the OH system, on a web client, Kodi player, Bluetooth speaker, Amazon Echo, …?

the sound should be played on a samsung tab4 (i have there the openhab2 app and kodi installed)

this audio sink, is this someting to configure in a items or things?
if i just add it into the rules the log say something about missing audio sink?

Not sure if the Android App supports Web Audio, otherwise try with a browser first.
You should define the default audio sink in Paper UI via Configuration->System->Audio (or define the audio sink in the PlaySound command as stated in the docs.

:disappointed_relieved:

Failed playing audio stream 'org.eclipse.smarthome.core.audio.FileAudioStr
eam@45d894c3' as no audio sink was found.
rule "Test"
   when
      Time cron "0 0/2 * 1/1 * ? *"
   then

      playSound("kodi:kodi:myKodi_ctp", "barking.mp3")
      
   end

Can you select this Kodi audio sink as default sink in Paper UI? And if so, can you try with playSound without the audio sink parameter?
What does your Kodi Thing definition looks like?

BTW, the mp3 file should be in the $OPENHAB_CONF/sounds directory, just to be sure…

yes in paper UI i could select kodi
without the sink parameter no error but also no sound.

Thing kodi:kodi:myKodi "Kodi" @ "Büro1" [ipAddress="10.147.42.199", port=9090, httpPort=8080]
2019-03-31 22:21:00.039 [WARN ] [core.audio.internal.AudioManagerImpl] - Default AudioSink service 'kodi' not available!
2019-03-31 22:21:00.040 [WARN ] [core.audio.internal.AudioManagerImpl] - Failed playing audio stream 'org.eclipse.smarthome.core.audio.FileAudioStr
eam@5f707cc3' as no audio sink was found.

from openhab on the tablet it is possible to turn on and off the volume - with no error just some eventslog with confirmation

would be nice if this sound “transfer” this sink could be added in the android openHAB App! :roll_eyes:

i am using

openHAB2
Version:     2.5.0.M1 (Build)

Could you try Web Audio sink to Browser. Just to rule out Kodi issues?