We have moved at community.getvera.com

Author Topic: Linking Iphone/Siri to control Vera?  (Read 20905 times)

Offline rlmalisz

  • Sr. Member
  • ****
  • Posts: 400
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #15 on: December 18, 2011, 09:13:01 pm »
If I get my siriproxy plugin code to a place where it is a little more generic (than what I currently have) I'll put it up on git if anyone else wants it.

I, for one, would love to see it and play with it.  Even if it's not that generic!

--Richard (M)

Offline DeltaNu1142

  • Hero Member
  • *****
  • Posts: 1153
  • Karma: +40/-67
Re: Linking Iphone/Siri to control Vera?
« Reply #16 on: December 19, 2011, 09:16:40 am »
I can't wait to try this out...  I'm still using a 3G until I'm eligible for an upgrade in April...   :(
Vera 3 @ UI5 | HomeWave | PLEG

Offline autotoronto

  • Full Member
  • ***
  • Posts: 190
  • Karma: +0/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #17 on: December 19, 2011, 03:26:09 pm »
If someone would like to get SiriProxy operating on Vera itself, that would be progress.

Offline rlmalisz

  • Sr. Member
  • ****
  • Posts: 400
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #18 on: December 19, 2011, 04:04:56 pm »
If someone would like to get SiriProxy operating on Vera itself, that would be progress.

I doubt that there's enough space or compute power for all of the libraries that SiriProxy seems to be using on a V3, let alone a V2.  And then there's Ruby, and Gem, etc.  I have SiriProxy running in an Ubuntu 11.10 VM on my MacPro, and
I was literally installing packages for an hour before I could even get started.

--Richard

Offline autotoronto

  • Full Member
  • ***
  • Posts: 190
  • Karma: +0/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #19 on: December 20, 2011, 11:42:54 am »
For the very keen, here's the quickest (and dirtiest) way of doing it:

Install SiriProxy as per the various webpages, and make sure the machine on which it runs has reachability to your Vera.

Edit ~/SiriProxy/plugins/siriproxy-example/lib/siriproxy-example.rb and add at the top
Code: [Select]
require 'open-uri'

and then somewhere in the body (should be obvious where):
Code: [Select]
listen_for /Lights On/i do
    say "Let there be light"
    open('http://xxx.xxx.xxx.xxx:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=YYY')
    request_completed
  end

  listen_for /Lights Off/i do
    say "Darkness was over the surface of the deep."
    open('http://xxx.xxx.xxx.xxx:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=ZZZ')
    request_completed
  end

where xxx.xxx.xxx.xxx is the IP address of your Vera and YYY and ZZZ are the two scenes you want to run.


Obviously there are many better and more extensible ways of doing this, but if your only object is to impress your other half, this will do the trick in the minimum of time.

In respect of running SiriProxy on Vera - Pete Lamonica's code is the proof-of-concept that follows the proof-of-concept. I'm sure something could be written that's more appropriate to the Vera platform, not using Ruby.
« Last Edit: December 20, 2011, 11:50:32 am by autotoronto »

Offline rlmalisz

  • Sr. Member
  • ****
  • Posts: 400
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #20 on: December 20, 2011, 10:59:42 pm »
I am getting there.  My config.yml lines just set a few URL components (and this could be done in the .rb file).  But I now am setting up a hash of my "house" rooms in the .rb initialize method...so adding more devices is as simple as adding another room there, or more devices to a room.  Currently, all it does is turn off/on lights and set levels for dimmers.  It shouldn't be hard to have a method that reports all the lights that are currently on, and individual light status.  Thermostat won't be hard, either.

But before my friends get over for Christmas dinner, I *have* to get the main garage door to open when Siri hears "open the pod bay doors, Hal".

When I get this stapled down a bit more, I'll let you all know.  And if I learn Ruby before I'm done, well, I guess that's okay.  First Python, and now this.  For some of this, it'd be a lot easier if I hadn't been writing Perl for 20 years.  I just keep writing it, even when it's now the language I am working in.

--Richard

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Linking Iphone/Siri to control Vera?
« Reply #21 on: December 20, 2011, 11:16:03 pm »
I *have* to get the main garage door to open when Siri hears "open the pod bay doors, Hal".

That alone would be worth the price of a 4S :)
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline rlmalisz

  • Sr. Member
  • ****
  • Posts: 400
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #22 on: December 22, 2011, 03:38:00 pm »
Table-driven.  Still haven't added anything to do locks or garage doors, but have done implemented a table-walk that matches device numbers from Vera's "status" dump to the tables, and produces this as some of its output, only reporting on sensors that are tripped, locks that are unlocked, and lights/outlets that are switched on.  Of course, Siri is saying all this stuff as well.

--Richard

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Linking Iphone/Siri to control Vera?
« Reply #23 on: August 27, 2012, 03:48:09 pm »
Hi, I was just wondering how @rimalisz or any otherswere progressing with pairing Siri and Vera?
Is it a match made in silicon heaven? I'm looking for a some easy to follow instuctions for someone who is a newbie in this area.

Offline Gjones

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +1/-0
Linking Iphone/Siri to control Vera?
« Reply #24 on: January 07, 2013, 05:52:33 pm »
Hi

I've spent the last few days getting siri proxy up and running to control lights and scenes. Did any have any luck returning status such as temperature?

Cheers

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Linking Iphone/Siri to control Vera?
« Reply #25 on: January 07, 2013, 05:55:23 pm »
Hi Gjones

Sorry to jump on you so soon after you've posted, but would you be able to share the set up and steps you took to get it working with Vera?

Offline Gjones

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #26 on: January 08, 2013, 04:03:48 am »
I've done very little different than reported by Rlmalisz and autotoronto earlier. The original siri proxy by plamoni on github appears to have some problems reported at the end of last year and is no longer being updated. I installed the Three Little Pigs siri proxy on a Ubuntu VM as this one is currently being supported.


Instructions and installer can be found at
https://github.com/jimmykane/The-Three-Little-Pigs-Siri-Proxy
http://www.am3yrus.com/

After up and running I modified the siriproxy-example.rb as described by autotoronto to send http commands to vera for devices and scenes. Once modified run 'siriproxy update .'   And the restart the proxy.

If I still find it useful when completed I may look at moving it to a raspberry pi.


Offline Gjones

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #27 on: January 08, 2013, 04:07:48 am »
Hi rlmalisz

Are you able to share an details on your advance config and status reporting?

Thanks

Offline WB-AVL

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #28 on: February 13, 2013, 04:10:09 pm »
I have everything running on the Raspberry PI.

The one problem I'm having is that my changes to the siriproxy-example.rb are not showing up when I restart siriproxy.

I have run "siriproxy update ." and have tried rebooting afterwards but none of my changes show up.

Any suggestions are greatly appreciated.

Thanks,

Will Byrum


I've done very little different than reported by Rlmalisz and autotoronto earlier. The original siri proxy by plamoni on github appears to have some problems reported at the end of last year and is no longer being updated. I installed the Three Little Pigs siri proxy on a Ubuntu VM as this one is currently being supported.


Instructions and installer can be found at
https://github.com/jimmykane/The-Three-Little-Pigs-Siri-Proxy
http://www.am3yrus.com/

After up and running I modified the siriproxy-example.rb as described by autotoronto to send http commands to vera for devices and scenes. Once modified run 'siriproxy update .'   And the restart the proxy.

If I still find it useful when completed I may look at moving it to a raspberry pi.

Offline Gjones

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #29 on: February 13, 2013, 04:35:55 pm »
I started to see the same problem. ran 'rake install' again and updates to the siriproxy-example.rb started to work.

My normal process of stopping the server. running 'siriproxy bundle' and then 'siriproxy server' then started to work again.

hope this helps