We have moved at community.getvera.com

Author Topic: siriproxy-vera plugin for using Siri to control Vera  (Read 19842 times)

Offline andrewgarfield

  • Full Member
  • ***
  • Posts: 108
  • Karma: +11/-1
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #30 on: September 19, 2013, 05:39:16 pm »
You need to go through the steps of putting the info into the config.yml file.

This file is located in a hidden directory in your raspberry pi's user's home folder.

if you type 'cd ~\.siriproxy' and then type 'ls -l' you should see this that you need to edit it. In order to edit it, use whatever text editor is on your raspberry pi.  It is likely "nano".  So you'd type:

nano config.yml

Then type (or better yet, copy and paste) the info from the installation instructions, edit the config info to specifically locate your vera, and then press "control-x" and "y" to save.  Then follow the rest of the steps.

Andrew

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #31 on: September 19, 2013, 07:14:14 pm »
Ok Andrew,
I found the file and I know like edit even using vi.

I want know what lines to put in that file because I can see many ways to do. I want put this line like you are using if this is not a problem for you.

I have inserted this:

listen_for /Lights On/i do
    say "Lights on"
    open('http://192.168.0.4:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=10')
    request_completed
  end


but nothing happens and service do not start.



thanks ...



Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #32 on: September 19, 2013, 07:34:43 pm »

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #33 on: September 19, 2013, 08:32:17 pm »
Brientim,
There do not exist a step to install the plugin.
I think the lines do this automatically when we run at first time.
This line below has the - before of the word name ? I put this lines and return error and server not ups.
The name Vera can be any word or must be the name of vera system ?
  - name: 'Vera'
    git: 'git://github.com/andrewgarfield/siriproxy-vera.git'
    vera_ip: '192.168.0.4' # enter the ip or hostname for your vera
    vera_port: '3480'



Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #34 on: September 20, 2013, 09:21:45 am »
Hello !
good news,

I have tried many times and now I have the plugin installed.

next step:

what file I do the associations to my scenes ? in the same file of the plugin ? (config.yml) ? or another ?

thanks, soon I will post a complete instructions for anyone get the plugin installed in your vera.

Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline andrewgarfield

  • Full Member
  • ***
  • Posts: 108
  • Karma: +11/-1
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #35 on: September 20, 2013, 11:43:18 am »
Piwtorak,

Happy to hear you have the plugin installed now.

There are no scene associations required.  They are done for you from a configuration file pulled from your vera.  Once you get the plugin installed (as you just did), it is designed to be self configuring.

Take a look at the usage section of the read me file on github to understand what you can say to it:

https://github.com/andrewgarfield/siriproxy-vera#usage

You should also read some of the FAQs on that same file to understand limitations and or some questions that I felt people would want to know.

By the way, I fixed some of the regex in the 'set scene' listener, so you might want to perform a 'rvmsudo siriproxy update' to get the latest version.

Andrew

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #36 on: September 20, 2013, 02:30:46 pm »
Hello !
yes I am very happy !

the plugin recognizes my vera and show 64 scenes many dimmable lights and switches...

but I create a scene LIGHTS ON because I speak portuguese and my english is not so good, then I search the way more easy to speak.

and siriproxy receives the packet but siri in my iphone says I have update my iOS.

please check the picture...


If someone more want to start with this here goes:

1) buy a raspberry pi, because this uses one of that. my option was:
http://www.amazon.com/gp/product/B008XVAVAW/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1

2) use a SD card with 8gb. my is a kingston.

3) download the image with siriproxy installed. is better than an pure image and install with your own hands.
here: http://sourceforge.net/projects/siriproxyrpi/files/latest/download

4) download the win32diskmanager to apply the image in the sd card.
http://sourceforge.net/projects/win32diskimager/?source=recommended

5) format your SD card with fat32 format.

6) apply the image to your SD card using win32diskmanager.

7) put the sd card recorded in your raspberry pi (from now on: Rpi)
connect a ethernet cable to your switch (is good have a DHCP installed in your network)
connect HDMI cable to your monitor and change for that port to see the image from Rpi
to be sure the things goes ok.
in my case I did this only first time, after I am using Teraterm, download from: http://logmett.com/index.php?/download/tera-term-479-freeware.html


and turn Rpi  ON.
(is good read about Rpi, your way to remove SD and conections)

8) it will boot with the image...and in some seconds you can see the login screen.
in this image use:
user: root
passwd: siriproxy

9) check the ip your Rpi takes from your DHCP and reserve in your router that ip.
my case: 192.168.0.47

10) add the lines below to your config.yml file in /root/.siriproxy, I use vi to edit then:

vi config.yml
type i (insert)
find the place to paste the lines ( yes you can paste in this window and turn the things easy)

to save use:
<ESC>:x <enter>
to exit without save
<ESC>:q <enter?

the lines are:
  - name: 'Vera'
    git: 'git://github.com/andrewgarfield/siriproxy-vera.git'
    vera_ip: '192.168.0.47' # this is my ip address (change for yours)
    vera_port: '3480'
 
Note: this mus be inserted in plugins section and the "-" in the front of name is necessary.


11) update the siriproxy:

rvmsudo siriproxy update

12) The next step is to generate the certificate to be installed on your iPhone and to point your iPhone DNS to Raspberry Pi.

Generate the certificate by using the following command:  siriproxy gencerts
Copy the certificate to your computer using teraterm  using FILE/SSH SCP and email to your iphone the ca.pem file
the certificate is generated to : /root/.siriproxy

13) run the certificate in your iphone and install it

14) go to your wifi settings in iphone for that network and change DNS to ip address of your Rpi (in the my case: 192.168.0.47)

15) for me helps change iphone to flight mode and wait 5 seconds or more and flight mode off.


16) start your siriproxy service in your Rpi using: siriproxy server -d 192.168.0.47
* change for your rpi address.

17) if all is ok you can see the message: Siriproxy up and running. and before you will read the number of scenes you have in vera and dimmable devices, etc.

18) at this time you can test...start siri in your iphone and instantly you can see many packets arriving in your rpi terminal screen.

19) create a scene named: lights on
and activate many devices to test.

20) after create a scene you must stop service and start again, use ctrl C and
siriproxy server -d 192.168.0.47
to start again.

* I do not know how do this automatically
and another thing....when I close teraterm session, the siriproxy server stops too.

* how can I leave siriproxy running even I am not connected to my Rpi by teraterm terminal ?

* how can I do siriproxy starts with my Rpi, because power can goes off and I do not want all the time is open a session to start this service.


we have a problem in this moment and andrew was notified. let's wait for him considerations....


thanks for all help to work this...













« Last Edit: September 20, 2013, 03:12:47 pm by Piwtorak »
Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline andrewgarfield

  • Full Member
  • ***
  • Posts: 108
  • Karma: +11/-1
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #37 on: September 20, 2013, 03:19:31 pm »
Hey Piwtorak,

I believe the reason why this is coming up is due to the brand new iOS 7 that just came out.  In iOS 7 you can do things like setting airplane mode on/off, and setting bluetooth on/off, etc.  Because of this I believe that the "set <scene name>" is conflicting with that.

Try one of the other ways of saying it such as "set scene Lights on" or "set scene to lights on".  I am hoping that they work.  If they don't I think i'll have to update the phrasings to work around these new limitations.  I did not notice this happening last night but it might be something new that Apple recently did.

If you can, try also the "turn on the <light name>" command and see if that works.

Andrew

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #38 on: September 20, 2013, 03:26:27 pm »
after all this time, just with me, I deserve this
 :) :)

if this is a file to edit, I can help, where I find the file ?

if is compiled, only you is capable to change...

I will try but only night because my rpi was installed in my home and I am in the office now...

« Last Edit: September 20, 2013, 03:29:45 pm by Piwtorak »
Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #39 on: September 21, 2013, 04:58:02 am »
Well done! Good to see you are passing on your experience and no doubt it will help other that follow in your steps. Enjoy your the fruits "Raspberry flavoured" of your work.

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #40 on: September 21, 2013, 07:56:17 pm »
I made an update to my siriproxy today, and i got run a scene but my pronounce is a problem. I will create scenes more easy to speak like "table". And wait a siri speaking portuguese.
Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline wseverino

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 854
  • Karma: +0/-0
  • Da Man, Da Myth, Da Legend - in his own mind!
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #41 on: September 23, 2013, 01:15:02 pm »
Piwtorak - I got the email you sent me last week. Looks like your up and running. Sorry for the delay as I was travelling down in Brazil last week on business and didn't check my home email.
My ZWave Network: Too friggin big to list.....

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #42 on: September 23, 2013, 03:54:24 pm »
Yes, I got it.
but now the problem is adjust the spoked texts with siri interpretation....I'm brazilian (you must call me when here :) )

and my pronounce is not so good then many tries to run a scene. but works... in 8 tries I got the scene run.

thanks for interest.
Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline Ryanoc75

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #43 on: October 21, 2013, 05:02:08 pm »
I have been excited about the idea of setting this up with Vera for the past 1.5 years so thanks so much to all those who have contributed to date.  I have a few questions tho. 

1) When I visited the original siri proxy page it indicates that the siri proxy is not currently functional with iOS 7 and may never be.  Does this impact the ability to get the siri proxy working with Vera or has enough of the code been modified that its a non issue?

2) I am not opposed to buying a raspberry pi, however I have an older PC running Windows 7 that is currently not being used for anything.  Could this be used to host the siri proxy?  Is there a virtual machine that can be installed on the PC to make it run like the raspberry pi

3) If you change the dns settings on your phone to point to the siri proxy address, does that then limit siri's use to only being able to control the specific commands that Vera needs or is Siri also fully functional as she normally is with just the added commands for Vera.  Does changing the DNS setting affect web connectivity for the rest of the phone? I was just curious to know if the users thus far were dedicating their phones to just being able to act as a Vera remote?

Thanks in advance for any advice those can offer.

Vera3 2gig Thermostat, Kwickset door lock, DSC Alarm Panel wiznet - IT100, 7 DSC motion Sens 4 DSC 3way sen, 5 DSC door cont,  Aeon HEM pwr mon, Aeon 4in1 multi sens, 8 GE dimmers, 8 GE switches, 15 Intermatic plugs, GC100 Wifi, 2 F/F Sens, 5 HA07 RFremotes, Siri Homekit Bridge 10 Cams, 4 SmrtSwitch

Offline andrewgarfield

  • Full Member
  • ***
  • Posts: 108
  • Karma: +11/-1
Re: siriproxy-vera plugin for using Siri to control Vera
« Reply #44 on: October 21, 2013, 05:20:14 pm »
Hello Ryanoc75,

1. Siriproxy-vera and other Vera implementations for SiriProxy are all merely plugins that require the SiriProxy software itself to work.  So, unfortunately, right now with iOS 7 not supported, none of these plugins will work either.  If you do have a device that hasn't been upgraded from iOS 6, you can still use it and it'll work fine.

2. SiriProxy will run on pretty much any machine that can capably run the latest versions of ruby.  This is pretty much every machine made for a very long time, so no worries on that.  You could probably run SiriProxy right on the Windows 7 machine technically speaking (but I don't know the best way to get it set up), or you can run a linux based virtual machine on it and run the software on that.

3. You shouldn't need to change the DNS settings of your phone for SiriProxy to be able to proxy the connection.  They are using some kind of software in the latest version that does this automatically within your local network.  If you change your DNS settings to the SiriProxy server nothing would work unless you installed and maintained your own DNS server on that system.  This is not a recommended option.

I personally hope those SiriProxy guys can get the software up and running with iOS 7 soon.  While I still have an iPad that I held back at iOS 6 for this purpose, I really miss being able to control things via my iPhone that was upgraded.