Rss voice

From Domoticz
Jump to: navigation, search
Look here for a up to date HowTo :


This script generates an mp3 file with the specified text and will play it. It is useful to allow domoticz to give voice notifications.

Dependencies - hardware / software / operating system

  • You need an account for the api.voicerss
  • To play the mp3 file you need to install mplayer
  • choose the right audio output of the RPI
  • Make sure you have internet connection

Domoticz Setup - switches, variables, version


Installation instructions

- First where going to install mplayer and testing it
sudo apt-get install mplayer
- Set audio output to the 3.5mm jackplug
sudo amixer cset numid=3 1
- Testing the output settings
speaker-test –t sine –f 600

Voicerss account for api key

You need to create an account on to get an api key. This api key is needed in the bash script.

Bash script

- Creating the script and give the appropriate rights
- location: /home/pi/domoticz/scripts/

sudo nano

mplayer -ao alsa -noconsolecontrols “<personal_api_key>&hl=nl-nl&src=$*”

sudo chmod 755

Check rights with: ls -l

Lua script

- Creating the script and give the appropriate rights
- Location: /home/pi/domoticz/scripts/lua/script_device_switch.lua

sudo nano script_device_switch.lua

commandArray = {}<br>
if (devicechanged["Switch"] == 'On') then<br>
os.execute("/home/pi/domoticz/scripts/ Hello world.")<br>
return commandArray

sudo chmod 644 script_device_switch.lua

Check rights with ls -l