Then, I’ve executed /etc/rc.local manually from a terminal session once again and it’s working, though a new error is printed out as can be seen below.
However, due to the “&” at the end of the command in rc.local, the manual execution allowed me to continue using the terminal session without being captured withing the execution of the server that will be killed as soonas I terminate the remote connection (could have thought about the amperstand before - shame on me).
It’s ok for now as I “just” need to remember to execute /etc/rc.local manually when having performed a reboot of the server. It would be nice to understand the problem and resolve the issue somehow though…
I’ve read that rc.local is executed before any user logs in - But granting 777 recursively to everything in ~/sonos (including server.js) also doesn’t change anything about the error message. No clue anymore what to check… Any help is still very much appreciated!
Thanks a lot, guys!
I need some help setting up this voice notifications to sonos speakers. I followed James Bruce article but I can’t seem to get it to work. I only have one Sonos Play1 speaker that is in the “Dining Room”. This is what I get when I use the “npm start” command:
I changed the default port of 5005 to 5009 in the settings file due to that port being used by something else.
When I type: http://192.168.0.32:5009/dining room/say/make%20use%20of%20is%20awesome/en-gb
into my browser I get a unable to connect message. Any help would be greatly appreciated.
I am unsure what you are trying to accomplish but oh2 has improved significantly over time and I think using the sonos binding, voiceRSS and audiosinks could be an alternative.
I’ve also not succeeded in making my Sonos speakers say anything and I don’t really know where to start searching. Provided I have chosen a default sink and rss service in paperUI settings it should work right out of the box, right? For me, running a “smarthome:voice say test” makes no sound. Also a simple “smarthome:audio play doorbell.mp3” makes no sound (also tried “smarthome:audio play sonos:PLAY1:RINCON_B8E937838C1C01400 doorbell.mp3” with a correct sink name as returned by “smarthome:audio sinks”). None of the commands even return, I have to Ctrl+C them. No errors are logged, so no real indication on why it isn’t working…
Jurgen could check out my settings to see what I’m doing wrong.
I have the VoiceRSS and Sonos bindings. In the Paper UI I have Sonos PLAY:1 listed in the configuration-System-Audio-Default Sink. In configuration-System-Voice I have Default text to speech as “VoiceRSS Text to Speech Engine” and default voice as "VoiceRSS-English (United States). Here is my items file:
Text label="Sonos" {
Default item=Sonos_Controller
Slider item=Sonos_Volume
Slider item=Sonus_Notification_Volume
Switch item=Sonos_Mute
Switch item=Sonos_LED
Text item=Sonos_CurrentTrack
Text item=Sonos_State
Switch item=Sonos_Favorite mappings=["Top Pop"="Top Pop","Top Country"="Top Country"]
}
I am able to control my Sonos Play1 from my sitemap. I am unable to get the rule below to work.
rule "Door Open Test"
when
Item FrontDoor changed from CLOSED to OPEN
then
sendCommand(Speech_Out.state.toString, "The front door is open")
say(Speech_Out.state.toString,"voicerss:deDE","sonos:PLAY1:RINCON_XXXXXX")
end
Will completely check when I’m at my system, however which language are you using? English or German, you stated to have set English on PaperUI but are asking for German in the rule.
Some tests with my system using the karaf console:
“smarthome:audio play doorbell.mp3” should play the .mp3 on your default audio-sink (which you should have setup)
" smarthome:audio play sonos:PLAY1:RINCON_XXXX1400 doorbell.mp3" would be the command if no default is set or if you have more then one audio-sink.
for the TTS part,
“smarthome:voice say Hallo” played “Hallo” on my default audio-sink. If you managed the get feedback on the play-command but not for say check if VoiceRSS is setup correctly. A correct setup should write the .mp3 files to “userdata/voicerss/cache” on a linux-system that would be “var/lib/openhab2/voicerss/cache”. Do you have the files in that directory?
In this case lets make sure your VoiceRSS setup is correct:
My PaperUI system tab Voice looks like that:
and in the voicerss.cfg file I have:
######################## VoiceRSS Text-to-Speech Engine ########################
# API key you got when you subscribed to the Voice RSS service
# Open your profile to get the value: http://www.voicerss.org/personel/
apiKey=InHereIsMyAPIKey
Well, as I stated earlier: Those commands play nothing at all.
Yep, that part seems to work, I’ve got mp3 and txt files in that directory. So obviously my problem is not the tts but the fact that it isn’t able to play the sound at all (which makes this thread a bit mixed I guess since me and @MikeH obviously have different problems, sorry for that).
Anyway, is there some log level I can increase that might give me something?
edit: After a closer thought, maybe that’d simply be the log level of the Sonos binding. Too bad my children have gone to sleep now, I don’t dare testing anything including the Sonos system when they have
I take it you have the sonos box set as default sink AND have tried the play command with the audio-sink from your setup as well.
In this case I’m out of ideas at the moment.
I get this when I enter “smarthome:audio sinks” :
openhab> smarthome:audio sinks
sonos:PLAY1:RINCON_xxxxxx1400
enhancedjavasound
javasound
webaudio
openhab>
I get command not found when I enter: smarthome:say play doorbell.mp3
When I enter “smarthome:audio play sonos:PLAY1:RINCON_XXXX1400 doorbell.mp3” I get no error message. The command prompt just come back after 5-6 seconds. I never hear any sound on my Sonos
That was a typo in my post , of course “smarthome:say play doorbell.mp3” isn’t playing anything it should have read “smarthome:audio play doorbell.mp3”.