Vera to windows computer output TTS or sound or run program

I created a simple Windows program that contains a media player and a html server. You can place it on your wireless networked-windows computer and then send text to speech, call a wave file, run a program, or shutdown or reboot the computer from your vera using Luup code.

The Luup Code would be:
For Text to Speech:
luup.inet.wget(“http://192.168.1.102:8087/TTS?Hello my computer can talk”)
where “192.168.1.102” would be your computer. The “TTS?” must be in the link, anything after that is spoken by the computer.

For sounds the Luup code is:
luup.inet.wget(“http://192.168.1.102:8087/Doorbell”)
You also have several other sounds to call with this program Sound1-Sound9 and Barking
ex: luup.inet.wget(“http://192.168.1.102:8087/Barking”)

To run a Program on your computer:
luup.inet.wget(“http://192.168.1.102:8087/Program1”)
You can add the desired programs to run when the SoundIt program is running on your windows computer. Once you choose the programs to be run on the SoundIt program, you can save them with the save button for the next time the SoundIt program runs. The data is saved in a text file called “SoundItinfofile.txt” in the program directory. You need to give the SoundIt program “Run as Administor” ability. To do that right click on the progam icon, select properties/capability/ and click the appropriate box.

To reboot the computer:
luup.inet.wget(“http://192.168.1.102:8087/WindowsReboot”)

To shutdown the computer:
luup.inet.wget(“http://192.168.1.102:8087/WindowsShutdown”)

All available links are:

luup.inet.wget(“http://192.168.1.102:8087/TTS?Speak whatever you want here”)
luup.inet.wget(“http://192.168.1.102:8087/Doorbell”)
luup.inet.wget(“http://192.168.1.102:8087/Barking”)
luup.inet.wget(“http://192.168.1.102:8087/Sound1”)
luup.inet.wget(“http://192.168.1.102:8087/Sound2”)
luup.inet.wget(“http://192.168.1.102:8087/Sound3”)
luup.inet.wget(“http://192.168.1.102:8087/Sound4”)
luup.inet.wget(“http://192.168.1.102:8087/Sound5”)
luup.inet.wget(“http://192.168.1.102:8087/Sound6”)
luup.inet.wget(“http://192.168.1.102:8087/Sound7”)
luup.inet.wget(“http://192.168.1.102:8087/Sound8”)
luup.inet.wget(“http://192.168.1.102:8087/Sound9”)
luup.inet.wget(“http://192.168.1.102:8087/Program1”) currently opens notepad
luup.inet.wget(“http://192.168.1.102:8087/Program2”)
luup.inet.wget(“http://192.168.1.102:8087/Program3”)
luup.inet.wget(“http://192.168.1.102:8087/WindowsReboot”)
luup.inet.wget(“http://192.168.1.102:8087/WindowsShutdown”)

I have tested it while streaming netflix and it does not interrupt the movie, it just adds the sound. The program returns a webpage with just the one word like “Doorbell”. I tested it on a windows 7 and windows 8 computer, and it should work on older windows computers as well.

Feel free to download:
http://dataweb.no-ip.com/SoundIt.zip
To install, you have to place all the wav files in your C directory. C:/Doorbell.wav
The soundit.exe program can go anywhere you want. I created a directory called C:/Program Files/SoundIt , and put it there. You may want to create a shortcut on your desktop. You might have to allow it access through your firewall, it is a server on port 8087. You would also need to have it start when you computer starts or manually start the program. You can minimalize it once it is started.

The Sound6-9 wav files are Holloween sounds. You can replace the sound files with whatever you want, just use the same names, and they need to be wav files.

The TTS functions uses the windows Text to speech functions. If you do not have them on your computer, it will not work (most computers should have them though). To adjust those settings go through the windows control panel.

You can change the port to another number after the first time the program is started and the “SoundItInfofile.txt” has been created. On the third line of that file is where you can edit the port number. However, all the links would need to reflect that change.

Make sure your computer does not change its IP number. You might need to attach the IP number from your wireless router. That way the links will not change. You could use this program from other devices besides the Vera, you just need to send your computer the link

Use it as is. If people get it working and like it, I will consider making improvements. Feedback welcome. I am looking at converting it to a service at this time, expect more in a week or two.

Known bugs:
The sound is only output to the “default” playback device. Have not been able to change the output device yet.

Thank you for your heard work! This is shaping up pretty fast. I’m watching this eagerly.

Have you had any more thoughts about this program? It’s really quite interesting.

I tried to get the program to run as a service, without success. The program is providing me everything I asked of it, so I have not been working on it lately. I have moved on to other projects for now. When I get the time, I will look again at creating a Window Service. The main thing I am using the program for is a late night reboot of my server computer. It is a default feature of the program.

Very interesting allpication, working on Windows.
But I’m using windows sometime…Working with Ipad…some such scheme/application under the IOS ?

No sorry only a windows program, no Apple ability.

[quote=“slajgaj, post:5, topic:173781”]Very interesting allpication, working on Windows.
But I’m using windows sometime…Working with Ipad…some such scheme/application under the IOS ?[/quote]

If you were considering stepping into the world on Sonos, then there is a plug in for that that’s pretty cool.

If you wanted to do it on a Mac, you could just create a lauchctl file, have it listen on a port, and then pipe all input to the “say” command. As a test, you can do this:

In one window: “nc -l 8888 | say”
In another window:
$ telnet localhost 8888
testing
^]

Is this program still available for download, would like to give it a try.

Link is dead… anyone have this they can re-share?

+1

Link is LIVE again. Thank you!

Installed and I’m having some fun with it. ;D Lots of opportunity. I will share my usage once I have things worked out. Right now I have some basic announcements being made. But I have bigger plans with this.

[quote=“mxg, post:11, topic:173781”]+1

I tried unsuccessfully to use device variables to make speech.
I guess this is not possible. Below is what I tried but only the “welcome home” is announced.

Anyone else try something similar?

local HouseTemp = luup.variable_get(“urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1”, “CurrentTemperature”, 25)
local OttawaTemp = luup.variable_get(“urn:schemas-micasaverde-com:device:TemperatureSensor:1”, “CurrentTemperature”, 74)
local OttawaCond = luup.variable_get(“urn:demo-micasaverde-com:device:weather:1”, “Condition”, 73)
local OttawaWindDir = luup.variable_get(“urn:demo-micasaverde-com:device:weather:1”, “WindDirection”, 73)
local OttawaWindSpeed = luup.variable_get(“urn:demo-micasaverde-com:device:weather:1”, “WindSpeed”, 73)
local OttawaHum = luup.variable_get(“urn:schemas-micasaverde-com:device:HumiditySensor:1”, “CurrentLevel”, 77)
luup.inet.wget(“http://192.168.1.99:8087/TTS?Welcome home.”)
luup.inet.wget(“http://192.168.1.99:8087/TTS?The current weather condition is” … OttawaCond)
luup.inet.wget(“http://192.168.1.99:8087/TTS?The current temperature is” … OttawaTemP)
luup.inet.wget(“http://192.168.1.99:8087/TTS?Wind is from” … OttawaWindDir … “at” … OttawaWindSpeed … “kilometers per hour”)
luup.inet.wget(“http://192.168.1.99:8087/TTS?Humidity is” … OttawaTemP … “percent”)
luup.inet.wget(“http://192.168.1.99:8087/TTS?The current house temperature is” … HouseTemP)
luup.inet.wget(“http://192.168.1.99:8087/TTS?I will now activate the phone bot for 5 minutes to tell you the number of new messages”)

I see it’s been a while since this topic had a post. I’m hoping winkoppp is still following it. I just found your program and it was just what I was looking for, voice announcements and remote shutdown. Sweet!! I was wondering if there has been any follow-up since the last post. I wrote a similar program (also in Delphi BTW) a while ago to add toggled icons to my desktop and to control Vera devices via their device# using Vera’s http interface. I’m still using that and can even run my switching program from the SwitchIt interface via the Program1(2,3) settings. Might come in handy at some point but…I have a problem.

What I am trying to do now is use this as a mutable doorbell for my Vera. I am using a Schlage window contact connected to the hardwired house doorbell (with the 12v transformer disconnected). This works very nicely using my fast programming PC. Unfortunately on the somewhat underpowered Media PC I intend to use for announcements, the first second or so of audio is not playing. Not the TTY and not the WAV files. Program files start up fine. I’m going to play with my audio drivers to see if I can improve it, but I wondered if:

  1. anyone out there has had this issue and solved it
  2. if anyone if following this thread

Very interesting, very useful and is exactly what I need for my project automation. I wonder if winkoppp is still the theme and explain how it works and how to create the program SoundIt, the program to my me perfectly, but there are very few programs that I run and I would like to know how I can do a program with the amount of spaces for programs requiring I. Sorry for my grammar but is that I am using a translator. ;D

This is a really old post… Sorry for the bump but the concept is something that I truly dream for! Lol. Is there anyone who can continue the development of a plugin like this since it seems to have died off?

I have been trying the eventghost webserver route but truth be told I feel like I have 17 fingers and 29 toes trying to wrap my brain around exactly what the webserver is for much less how it works.

All I really wanted to do was to be able to run things on vera from my computer which I’ve successfully figured out how to do with http requests combined with wget and batch scripts. Now I want to use vera to run things on my computer and this program would have been perfect except for the fact that it threw an exception error when I tried to run it in Windows 7… :frowning:

It’s not really a plugin but it’s HTTP calls from Vera to a Windows computer. The only executable is on the Windows side.

Did you extract all files in the zip file and place them in the correct location as described in the first post? As it’s working fine on my Windows 7 64bit box.

Thanks for resurrecting this thread. This may be just what I am looking for. If I can get this to work with a bluetooth dongle and a bluetooth speaker it should allow me to remotely play audio to scold my dogs if they are misbehaving. Since it works on Windows 7, it should also work on WHS2011. As I have a WHS2011 box on 24/7 for Blue Iris and Serviio, this little gem should feel right at home.

[quote=“BOFH, post:17, topic:173781”]It’s not really a plugin but it’s HTTP calls from Vera to a Windows computer. The only executable is on the Windows side.

Did you extract all files in the zip file and place them in the correct location as described in the first post? As it’s working fine on my Windows 7 64bit box.

Thanks for resurrecting this thread. This may be just what I am looking for. If I can get this to work with a bluetooth dongle and a bluetooth speaker it should allow me to remotely play audio to scold my dogs if they are misbehaving. Since it works on Windows 7, it should also work on WHS2011. As I have a WHS2011 box on 24/7 for Blue Iris and Serviio, this little gem should feel right at home.[/quote]

Thanks a million BOFH!! I wasn’t getting an alert to allow through firewall the first couple times I ran the exe for some strange reason. I’ve added the exception and now the program seems to be running! Can’t wait to test it after work today. Anyone have any tips on how to create a scene to run these in a test? I’ve only created scenes with devices so far so I have no clue how to make one with just a luup or lua code. :slight_smile:

jsut do

luup.inet.wget(“IP-ADDRESS-HERE:8087/TTS?SPEECH-HERE”)

[quote=“signal15, post:8, topic:173781”]If you wanted to do it on a Mac, you could just create a lauchctl file, have it listen on a port, and then pipe all input to the “say” command. As a test, you can do this:

In one window: “nc -l 8888 | say”
In another window:
$ telnet localhost 8888
testing
^][/quote]

Using he say command in a shell works but doing the telnet connection above does NOT work. :frowning: