Author Topic: iRule and Vera  (Read 4586 times)

dfhage

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
iRule and Vera
« on: February 15, 2011, 04:28:56 am »
Anybody got any experience integrating irule with Vera using a HTTP Gateway?

Thanks in advance

Dave Hage

jamie

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +2/-0
Re: iRule and Vera
« Reply #1 on: February 15, 2011, 09:08:50 am »
I did some tests with it, and it worked quite well.  While it doesn't "learn" your devices, you can easily set up buttons to send commands to vera port 3480 like this:

http://192.168.0.200:3480/data_request?id=lu_action&DeviceNum=69&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

I believe the command is "data_request?id=lu_action&DeviceNum=69&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1"  and you set up your gateway on the remote with vera's IP address and port to use if I remember correctly.

Playing with openremote.org 's Open Remote now, so I can do similar things on Android, but miss iRule's simplicity of building the panels... may go back and pay for the builder license....  I used it only during the 14 day demo period to see if it would work... and with the iTach / Vera setup it worked very well!

Jamie

jamie

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +2/-0
Re: iRule and Vera
« Reply #2 on: February 15, 2011, 09:11:12 am »
Keep in mind however, that you won't see the status of your devices in your remote... they are send only, and won't show you the current state of say a light, or thermostat.

But the panels you can build are simply BEAUTIFUL!

dfhage

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Re: iRule and Vera
« Reply #3 on: February 15, 2011, 12:06:51 pm »
Many thanks guys, very useful

Regards

Dave Hage

dfhage

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Re: iRule and Vera
« Reply #4 on: February 16, 2011, 09:16:16 am »
Having a bit of trouble getting this to work, can you remember if you set up Vera in iRule as a "network gateway" or an "http gateway", one gives the option of a port number, which I'm not sure is necessary. Does Vera listen on all ports for http commands?, I'm not much of a programmer, and the Vera documentation leaves a bit to be desired, to say the least,

Thanks in advance

Dave Hage

jamie

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +2/-0
Re: iRule and Vera
« Reply #5 on: February 16, 2011, 09:59:40 am »
Okay this is from memory, as my ipod is at home, and I no longer have access to the builder online app, as my trial period has expired....

but, I think I used http gateway....  in the builder the command was like :

data_request?id=lu_action&DeviceNum=69&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

(where DeviceNum=69 (69 being the number of the device you want to control))

and on the ipod settings, where you add gateways, the gateway was :

http://ip_of_vera:3480    (just included the port number like that...)

Will take a look at it tonight if ipod still lets me access the gateway assignments.

jamie

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +2/-0
Re: iRule and Vera
« Reply #6 on: February 16, 2011, 06:45:57 pm »
Here's the step-by-step walkthrough for creating the device, adding commands, and setting up the gateway:

http://www.iruleathome.com/tutorials/http-gateway.html


In step 4, the command (data field, lower left) is like this:

data_request?id=lu_action&DeviceNum=69&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

and in step 7, the address is like this:

192.168.0.200:3480/  (use your Vera's ip address, but the :3480 needs to stay, as that's the port you will use)


Hope this helps, and lemme know how it goes.

dfhage

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Re: iRule and Vera
« Reply #7 on: February 16, 2011, 10:55:41 pm »
Many thanks Jamie, I'll give it a go.

Regards

Dave Hage

dfhage

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Re: iRule and Vera
« Reply #8 on: February 17, 2011, 12:57:50 am »
Jamie,

Many thanks, works perfectly, I love the interface of iRule, have managed to run scene via the buttons on iRule as well.
A quick question, still struggling with the syntax for a dimmable light.

Many thanks

Dave Hage

glaso

  • Jr. Member
  • **
  • Posts: 59
  • Karma: +0/-0
Re: iRule and Vera
« Reply #9 on: February 17, 2011, 06:35:35 am »
Quote
still struggling with the syntax for a dimmable light.

data_request?id=lu_action&output_format=json&DeviceNum=46&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget&newLoadlevelTarget=10

dfhage

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Re: iRule and Vera
« Reply #10 on: February 17, 2011, 08:11:20 am »
Thanks Guys,  all working now, even have the Vera UI as a page within iRule, works great on an iPad.

Regards

Dave Hage