Audio (Sonos) and voice (voicerss) configuration in runtime.cfg fails

Edit: In post 7 you find the summary of this topic with the whole solution.

  • Platform: Raspberry Pi 3 Model B Rev 1.2
    • openHABian configuration [master]v1.4.1-411(ecf59c4)
    • OS: Raspbian GNU/Linux 9 (stretch)
    • [08:15:23] openhabian@openHABianPi:~$ java -version
      openjdk version “1.8.0_152”
      OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
      OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)
    • openHAB 2.3.0-1 (Release Build)

Hi, I’m trying to do audio and voice configuration in runtime.cfg but I can’t get defaultSink and defaultVoice working.
Only defaultTTS=voicerss works.

################### AUDIO #######################
org.eclipse.smarthome.audio:defaultSource=System Microphone
org.eclipse.smarthome.audio:defaultSink=Sonos04Wohnen

##################### VOICE ####################
org.eclipse.smarthome.voice:defaultTTS=voicerss
#org.eclipse.smarthome.voice:defaultSTT=
org.eclipse.smarthome.voice:defaultVoice=VoiceRSS – Deutsch (Deutschland)
#org.eclipse.smarthome.voice:defaultHLI=

With the above runtime.cfg, in PaperUI/Configuration/System it looks like this:

My sonos.things looks like this:

Thing sonos:PLAY1:Sonos04Wohnen "Sonos04Wohnen" @ "Sonos" [ udn="RINCON_xxxxxxxxxxxxxxxxxxx", refresh=60]

In PaperUI/Configuration/System/Audio I’m able to select Sonos04Wohnen as Default Sink from the pulldown-menu.
But why dosn’t it work in runtime.cfg?
grafik

And in PaperUI/Configuration/System/Voice I’m able to select VoiceRSS – Deutsch (Deutschland) from the pulldown-menu as Default Voice.
But why dosn’t it work in runtime.cfg?
grafik

I even tried

org.eclipse.smarthome.voice:defaultVoice=deDE

without success.

In karaf-console

smarthome:voice voices

shows me

openhab> smarthome:voice voices
voicerss:zhHK VoiceRSS - Chinesisch (Hongkong)
voicerss:ptBR VoiceRSS - Portugiesisch (Brasilien)
voicerss:esES VoiceRSS - Spanisch (Spanien)
voicerss:nbNO VoiceRSS - Norwegisch, Bokmål (Norwegen)
voicerss:itIT VoiceRSS - Italienisch (Italien)
voicerss:esMX VoiceRSS - Spanisch (Mexiko)
voicerss:daDK VoiceRSS - Dänisch (Dänemark)
voicerss:jaJP VoiceRSS - Japanisch (Japan)
voicerss:ptPT VoiceRSS - Portugiesisch (Portugal)
voicerss:nlNL VoiceRSS - Niederländisch (Niederlande)
voicerss:deDE VoiceRSS - Deutsch (Deutschland)
voicerss:frFR VoiceRSS - Französisch (Frankreich)
voicerss:plPL VoiceRSS - Polnisch (Polen)
voicerss:fiFI VoiceRSS - Finnisch (Finnland)
voicerss:caES VoiceRSS - Katalanisch (Spanien)
voicerss:enUS VoiceRSS - Englisch (Vereinigte Staaten von Amerika)
voicerss:ruRU VoiceRSS - Russisch (Russland)
voicerss:svSE VoiceRSS - Schwedisch (Schweden)
voicerss:enIN VoiceRSS - Englisch (Indien)
voicerss:enGB VoiceRSS - Englisch (Vereinigtes Königreich)
voicerss:frCA VoiceRSS - Französisch (Kanada)
voicerss:zhTW VoiceRSS - Chinesisch (Taiwan)
voicerss:zhCN VoiceRSS - Chinesisch (China)
voicerss:koKR VoiceRSS - Koreanisch (Südkorea)
voicerss:enCA VoiceRSS - Englisch (Kanada)
voicerss:enAU VoiceRSS - Englisch (Australien)
openhab>

Can someone help me please? Maybe @Lolodomo, @opus or @cweitkamp knows?
Thanks in advance!

Can’t help on that one since I configured the Voice ith PaperUI only.

Hi @anfaenger,

I afraid I cannot tell you the answer either. I have an idea for defaultSink and defaultVoice - no guarantee:

Please try this:

################### AUDIO #######################
org.eclipse.smarthome.audio:defaultSink=sonos:PLAY1:Sonos04Wohnen

##################### VOICE #####################
org.eclipse.smarthome.voice:defaultTTS=voicerss
org.eclipse.smarthome.voice:defaultVoice=voicerss:deDE
1 Like

Hello @cweitkamp,

Great! You’re right!
Both, sonos:PLAY1:Sonos04Wohnen and voicerss:deDE work for me.
Do you also have an idea for the defaultSink?

I tried this, but it don’t work.

org.eclipse.smarthome.audio:defaultSource=System Microphone

Thanks a lot!

No, I have not. Sry.

After checking the Karaf consloe with “smarthome:audio sources” I found that the single entry “System Microphone” is called “javasound” on Karaf.
So the entry for the runtime.cfg for org.eclipse.smarthome.audio:defaultSource is “System Microphone”

1 Like

Hello Jürgen,

javasound works. Thank you very much!

For all: Here is the summary of this topic with the whole solution.

Put this in /etc/openhab2/services/runtime.cfg

################### AUDIO #######################
org.eclipse.smarthome.audio:defaultSource=javasound
org.eclipse.smarthome.audio:defaultSink=sonos:PLAY1:Sonos04Wohnen
### If sonos:PLAY1:SonosName don’t work, one can try sonos:PLAY1:RINCON_?????????????????

##################### VOICE ####################
org.eclipse.smarthome.voice:defaultTTS=voicerss
org.eclipse.smarthome.voice:defaultVoice=voicerss:deDE

and you get this in Paper UI > Configuration > System

For the Sonos audiosink my system (OH2.3) didn’t like the given name. I had to use the “sonos:PLAY1:RINCON_949F3E7D2EF401400” as stated on Karaf console by “smarthome:audio sinks”.

I’m also on openHAB 2.3.0-1 (Release Build). I added this additional info above.

1 Like