We have moved at community.getvera.com

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

Offline WB-AVL

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #30 on: February 13, 2013, 05:11:38 pm »
Thanks for the suggestion but I'm still not having luck. In my SiriProxy directory I ran "rake install", "siriproxy update .", "siriproxy bundle" then "siriproxy server"

Still no changes showing up. I will try a reboot for the heck of it. Any ideas?

Will Byrum

Offline WB-AVL

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #31 on: February 20, 2013, 08:57:54 am »
FYI:

I was able to get everything working by changing the siriproxy-example.rb file in the usr/rvm etc. etc. directory. Then I run "siriproxy bundle" after any change.

It works great!

Offline MDoc

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +3/-3
Re: Linking Iphone/Siri to control Vera?
« Reply #32 on: February 20, 2013, 01:35:06 pm »
Just as reference I posted instuctions to set up a Proxy Server for those interested.   Probly should have posted here... My Bad

http://forum.micasaverde.com/index.php/topic,13324.msg99059.html#msg99059

Offline cubs2b23

  • Full Member
  • ***
  • Posts: 102
  • Karma: +2/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #33 on: February 26, 2013, 11:10:18 am »
Does anyone have any other examples of how to interact with Siri?  I saw the example to run a Scene and I've used that successfully. But can we interact with individual devices instead of a scene? Is there a way to poll the status of a device for Siri to return?

Thanks

Offline Gjones

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #34 on: February 26, 2013, 11:20:10 am »
Hi

I've listed my commands for turning a device off, setting the DIM level and reporting the thermostat temperature. To return the status i used HTTParty. I didn't get time to work out how to load the HTTParty gem seperately so just enabled the default thermostat plugin in the /.siriproxy/config.yml file which installed it for me


#Turn Device off
listen_for /Living room light off/i do
    open('http://10.0.30.35:3480/data_request?id=lu_action&DeviceNum=35&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0')

#Set Dim Level
listen_for /Living room light ([0-9,]*[0-9])%/i do |dimlevel|
    say "Set Living room light to: #{dimlevel} percent."
     open("http://10.0.30.35:3480/data_request?id=lu_action&DeviceNum=35&action=SetLoadLevelTarget&serviceId=urn:upnp-org:serviceId:Dimming1&newLoadlevelTarget=#{dimlevel}")

listen_for /Hall temperature/i do
  halltemp = HTTParty.get("http://10.0.30.35:49451/data_request?id=lu_variableget&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&DeviceNum=14")

     
        say "Hall temperature #{halltemp} degrees."
     

Offline cubs2b23

  • Full Member
  • ***
  • Posts: 102
  • Karma: +2/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #35 on: February 26, 2013, 12:08:08 pm »
Thanks Gjones - that will help me get started with on/off/dimmer.

Do we know if there is anyway to have siri pull up an image from a webcam that's connected to Vera?

Offline cubs2b23

  • Full Member
  • ***
  • Posts: 102
  • Karma: +2/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #36 on: February 26, 2013, 02:47:18 pm »
Another question as I dig into this further: Has any one written a siriproxy plugin for vera?  I'm wondering if we can use the one done for the ISY-99i controller and modify it to use Vera commands instead. 

https://github.com/elvisimprsntr/siriproxy-isy99i

Offline spudjr

  • Full Member
  • ***
  • Posts: 133
  • Karma: +2/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #37 on: March 08, 2013, 01:44:55 pm »
GJones
New to this stuff. Just want to clarify. The code you posted is in the siriproxy-example.rb file and NOT  the config.yml file or do I modify the config.yml?

Enable the default thermostat plugin, i gather that is get rid of # in line name: Thermostat, and change the host ip address line to the siri-proxy?

Thanks

Offline Gjones

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +1/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #38 on: March 08, 2013, 04:32:31 pm »
That's right the config.yml just needs the comments removing from the thermostat section, as it's not being used other than to load the httparty gem the IP can be left as it is.

the siriproxy-example.rb should have the vera commands added.

rlmalisz looks to have a far more elegant solution though on this post.
http://forum.micasaverde.com/index.php/topic,9070.msg104399.html#msg104399

Offline spudjr

  • Full Member
  • ***
  • Posts: 133
  • Karma: +2/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #39 on: March 09, 2013, 11:50:08 am »
GJones
Thanks for the reply. Making some progress :)
Having issues with dimmer control. changed the device number to that found under advanced, id of the GE dimmer. Needed to add scheme to the URN:  Still no go. guess I found a project for the evening.

Offline spudjr

  • Full Member
  • ***
  • Posts: 133
  • Karma: +2/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #40 on: March 15, 2013, 07:04:53 pm »
Can anybody confirm if the CT-100 thermostat will work with Siri Proxy.
Uncommented the 3 lines in the config.yml file for the thermostat plugin. since the CT-100 is not ip enabled I set the ip address to the vera box. Ran siriproxy bundle and update.  If  ask for the thermostae status it just tells me it is off. Running command bundle show I see "siriproxy-thermostat 0.0.1 badb55d. Any ideas on the badb55d

Offline knewmania

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: +0/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #41 on: March 16, 2013, 10:41:14 am »
Hi

I've listed my commands for turning a device off, setting the DIM level and reporting the thermostat temperature. To return the status i used HTTParty. I didn't get time to work out how to load the HTTParty gem seperately so just enabled the default thermostat plugin in the /.siriproxy/config.yml file which installed it for me


#Turn Device off
listen_for /Living room light off/i do
    open('http://10.0.30.35:3480/data_request?id=lu_action&DeviceNum=35&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0')

#Set Dim Level
listen_for /Living room light ([0-9,]*[0-9])%/i do |dimlevel|
    say "Set Living room light to: #{dimlevel} percent."
     open("http://10.0.30.35:3480/data_request?id=lu_action&DeviceNum=35&action=SetLoadLevelTarget&serviceId=urn:upnp-org:serviceId:Dimming1&newLoadlevelTarget=#{dimlevel}")

listen_for /Hall temperature/i do
  halltemp = HTTParty.get("http://10.0.30.35:49451/data_request?id=lu_variableget&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&DeviceNum=14")

     
        say "Hall temperature #{halltemp} degrees."
     

So I have been working on this project for a little while now and I finally have SiriProxy running on the Raspberry Pi. I am having problems with getting it to control my devices. I hope someone can assist me:

As an example I am trying to get SiriProxy to lock/unlock my Kwikset Deadbolt. Here is the code I have entered into the SiriProxy-example.rb file:

Code: [Select]
#Unlock Foyer Deadbolt
  listen_for /Unlock Deadbolt/i do
    open("http://192.168.0.5:3480/data_request?id=lu_action&output_format=xml&DeviceNum=4&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=0")
 
  request_completed #always complete your request! Otherwise the phone will "spin" at the user!
  end

I get the following response from SiriProxy when I issue the Unlock Deadbolt command:

Code: [Select]
Plugin Crashed: No such file or directory - http://192.168.0.5:3480/data_request?id=lu_action&output_format=xml&DeviceNum=4&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=0

I can enter that http string into a browser and the Deadbolt does unlock. Any ideas?


**EDIT. Disregard I figured it out.

 I was missing the require 'open-uri' at the beginning of the example file.
« Last Edit: March 16, 2013, 01:48:03 pm by knewmania »
Vera 2. UI 1.5.622 / Vera 3. UI 1.7.760

Offline spudjr

  • Full Member
  • ***
  • Posts: 133
  • Karma: +2/-0
Re: Linking Iphone/Siri to control Vera?
« Reply #42 on: March 17, 2013, 11:27:18 am »
I want to use the example dim control code and use it for setting a thermostat. What variable is available other than "%" in the line

#Set Dim Level
listen_for /Living room light ([0-9,]*[0-9])%/i do |dimlevel|

Tried putting in a word instead of % and it did not like it