So I’ve been pretty busy the last week working on getting SiriProxy ported to Lua and running on my Vera3. I’m looking to see if there are any Lua/web developers that would be willing to help, and see if there is enough interest for me to spawn this off to a github project - what I’ve done, and where I could use help.
** I’ve got the binary plist (CFPropertyList) ported and reading binary plists, I can read the response from guzzoni.apple.com and parse it in my Lua code. I haven’t completed creating the binary response, but that should be fairly quick work now.
** Vera already has dnsmasq, so that’s already done
** It appears that the appropriate gzip libraries are on the Vera, altho this is untested by me
** SSL libraries seem to be there, but I created my self signed cert external to Vera, this may take a little work
** I plan on creating a new virtual host to listen on 443, calling this Lua code
What I haven’t even considered yet it a way to create phrases for this Siri proxy to listen for - I’d like to make it database/table driven, most likely some in memory Lua table… This I’d like some help with. I would like to extend the Vera web interface to allow easy creation of “listen for” phrases: Press a button “learn” - speak the text, capture the response, assign it to an action/scene
So I guess this is just an open question to anyone that is interested…
Is there anyone besides me that is interested in this
Is there anyone that has some spare cycles to help
My day job has me writing software in C, C#/.Net, and Java… So my Lua code is crude and, well, written like I would write C# or Java - What I’m trying to say is it’s UGLY currently, so don’t judge
I’m out of town for the weekend, but feel free to email me - rob.whyte at RSA.com
What I haven't even considered yet it a way to create phrases for this Siri proxy to listen for
Aside from extra phrases, it would make sense to be able to address the scenes and devices by their names and numbers
eg, since I already have devices called "bathroom light" and "front door lock", and a scene called "home"
What I haven’t even considered yet it a way to create phrases for this Siri proxy to listen for
Aside from extra phrases, it would make sense to be able to address the scenes and devices by their names and numbers
eg, since I already have devices called “bathroom light” and “front door lock”, and a scene called “home”
That would remove most of the need to program phrases - just choose sensible names for things.[/quote]
So I don’t have this running on Vera (and am unconvinced that my V2 has the HP to do the work required), but do have it working pretty well in a Ubuntu VM. We have quite a few devices in the house, and either my speech is much more garbled than I thought, or the local processing of speech tokens is not as strong as it is at Apple’s parsing servers. So I went a slightly different way…I built a Ruby hash of the devices I want to control through Siri, with “rooms” associated with them. So when I want to do something, I say “current room ” or “inside ”, which sets the context for future “local” commands. If I need to add a light, a lock, etc for an action already supported, I just add it to the hash. This also allows me to have a simple global report-out command (“what’s up” or “house summary”) that queries Vera for system state and parses it and gives me back “interesting” status–locks that are unlocked, lights that are on, sensors that are tripped. There’s some other silliness in here, but it’s pretty straightforward.
“config.txt” is “config.yml”. “siriproxy-vera.txt” is “siriproxy-vera.rb”, renamed to protect the universe from evil file types.
So I ran into a few snags that I wasn’t even thinking about. Siri makes a unique call to the destination server in that it doesn’t make a standard ‘GET’/‘POST’ call. It makes a call named ‘ACE’ … No problem I thought, I’ll just patch lighty to handle an ACE call - but ran into another snag. Siri sends: ‘CONTENT-LENGTH = 2000000000’ (even though the data isn’t that long) on every call, but the code in lighty loops while content-length-received < CONTENT-LENGTH … In other words there’s no data inspection to determine the end of the packet, so lighty never forwards the data out of the receive loop… bummer
So that leaves me sort of back at square 1, except now I have a build environment I can build binaries and run them on my Vera3. I compiled and am now running Ruby on my Vera3. SiriProxy requires the use of the eventmachine libraries, which includes some native and ruby code to run. I’ll report back if I get the regular SiriProxy running on my Vera.
I can, and I still might… just not sure it’s worth my time now that I have Ruby running on the box - There will be a lot more involved the lighty route… then again Ruby (eventmachine) takes quite a bit of space. I’ll keep updating this as I make more progress and let people know what I’ve done.
What I haven’t even considered yet it a way to create phrases for this Siri proxy to listen for
Aside from extra phrases, it would make sense to be able to address the scenes and devices by their names and numbers
eg, since I already have devices called “bathroom light” and “front door lock”, and a scene called “home”
That would remove most of the need to program phrases - just choose sensible names for things.[/quote]
So I don’t have this running on Vera (and am unconvinced that my V2 has the HP to do the work required), but do have it working pretty well in a Ubuntu VM. We have quite a few devices in the house, and either my speech is much more garbled than I thought, or the local processing of speech tokens is not as strong as it is at Apple’s parsing servers. So I went a slightly different way…I built a Ruby hash of the devices I want to control through Siri, with “rooms” associated with them. So when I want to do something, I say “current room ” or “inside ”, which sets the context for future “local” commands. If I need to add a light, a lock, etc for an action already supported, I just add it to the hash. This also allows me to have a simple global report-out command (“what’s up” or “house summary”) that queries Vera for system state and parses it and gives me back “interesting” status–locks that are unlocked, lights that are on, sensors that are tripped. There’s some other silliness in here, but it’s pretty straightforward.
“config.txt” is “config.yml”. “siriproxy-vera.txt” is “siriproxy-vera.rb”, renamed to protect the universe from evil file types.
–Richard[/quote]
Richard,
Should I just be able to modify my device IDs and room names in the siriproxy-vera.rb file and run?
Parkerc… Not sure of your question was if we having it running ON Vera or simply using Siri WITH Vera. Here is my post to set the server up and get it running
I also went the route of running a proxy server on an old laptop running Linux and it’s working great. I’m controlling scenes and devices. I too struggle some with recognition… so I like Richards Idea of a primary prompt then a secondary command. I’m already doing things like “Is the front door locked”…Siri “No. Would you like me to lick it for you?”…“Yes Please”… Vera locks the door.
I’m not really motivated to move it to my Vera box. If I hadn’t already put it on the laptop… I might be tempted to pay the $35.00 and put in on a Rasberry Pi though… just cause I want a reason to get one:)
cubs2b23 - Yes… with rlmalisz’s help, I basiclly started with the siriproxy_example.rb file and put in command to control my devices. Should work by changing the device spicific info.
[quote=“MDoc, post:11, topic:170163”]I’m not really motivated to move it to my Vera box. If I hadn’t already put it on the laptop… I might be tempted to pay the $35.00 and put in on a Rasberry Pi though… just cause I want a reason to get one:)
cubs2b23 - Yes… with rlmalisz’s help, I basiclly started with the siriproxy_example.rb file and put in command to control my devices. Should work by changing the device spicific info.[/quote]
Cool. I’ll give it a shot. His file looks pretty complicated so hopefully I can pare it down to what applies to me. So far I’ve only run a few simple on/off/dim commands and I’ve gotten the IPCams plugin to work with my two Foscams.
I’ve been running this of the Raspberry Pi with no issues so far.
Is there a simple get_status I can do based on a single device id? I know there’s one for getting the status of the whole house but for some scenes I’d just like to get the state of a single sensor or light.
Thanks again. This has been hugely helpful!!
Best Home Automation shopping experience. Shop at Ezlo!