Hello,
I have been playing with setting up my house with a vera lite, thermostat, 2 cameras, garage door opener, garage door sensor, 3 locks, and around 30 intermatic dimmers, scene controllers and switches. Its all working pretty well and I’m getting into some more advanced programming. I have worked up a way to get audio alerts to happen when scenes are called.
What it does:
When a scene is called, an audio alert is played out of a computer speaker.
What you need:
-a windows PC (Doesn’t have to be fancy, I used an old ASUS netbook) You could use your home computer
-VLC Media Player (found here [url=http://www.videolan.org/vlc/index.html]http://www.videolan.org/vlc/index.html[/url])
- Vera or Vera Lite
- some audio files (you can custom make some computer voice audio alerts here: [url=http://www2.research.att.com/~ttsweb/tts/demo.php]http://www2.research.att.com/~ttsweb/tts/demo.php[/url])
VLC Setup:
First step is to download and install VLC Media Player.
Step two; you need to change the settings on the hosts file for the VLC Media Player in order for outside IPs to access it… This is essential for your vera to be able to talk to the media player.
This hosts file is located in C:\Program Files\VideoLAN\VLC\lua\http
The file you need to edit is “.hosts”.
Remove the “#” sign before the address block you want to enable… If in doubt, make the last three lines look like this:
# The world (uncommenting these 2 lines is not quite safe)
::/0
0.0.0.0/0
Step three is to enable what is called the “Web Interface” see Screenshot:[url=http://www.exoid.com/R1F/vlc/vlc1.png]http://www.exoid.com/R1F/vlc/vlc1.png[/url]
Next you need to make sure you have some audio files on the computer for vera to call via the web interface…
I simply made a directory on my PC called “C:\Audio” and placed a file in there called “light_on.wav”
The last step is to edit your luup code on the scene that you want to make speak.
Here is an example:
os.execute(‘curl -g “http://192.168.1.117:8080/requests/status.xml?command=in_play&input=file:///C:/Audio/light_on.wav”’)
Substitute the 192.168.1.117 in my code above for the IP address of your PC!
Be sure to hit the save the luup code underneath the luup code, and then confirm your change to the scene, and then finally hit the big red button to save.
Then Run your Scene and listen to your PC speak!!!
You can also use this web interface to do lots of different things with VLC, you can play a video file, pause, play, skip, whatever… using commands.
For reference, see the file “README.txt” in the “VideoLAN\VLC\lua\http\requests” folder
Hope this is helpful for some, I’ve seen some doing something kindof similar with itunes and such, but this seems much easier and straightforward.
I’m thinking of pairing this with a whole house FM transmitter, so I can play audio around the whole house using cheap FM Radios as monitors.