Interfacing to a CAI WebControl Module

Posted on
Sat Jul 15, 2017 7:34 am
rjeffl offline
Posts: 21
Joined: Sep 28, 2013
Location: Otto, NC

Interfacing to a CAI WebControl Module

I picked up a CAI WebControl 8 module to use for collecting data from door sensors (dry contact).
Seems like a great little ethernet connected IO module with tons of capability, and it seems relatively easy to poll using http.
This will allow me to integrate the existing door sensors into my Indigo-based home security system.

I saw while browsing the forums that another user or two may be using one of these.
For anyone who has one of these, what method are you using to collect data: simple scheduled poll with http, GhostXML, etc.?

The concern I have with simple polling is that the update interval would need to be relatively short in order for the system to be responsive to intrusion.
There is already processing delay for Indigo to trigger and perform and action, such as turning on a siren, so adding a large polling delay will just make the lag worse.

The ideal case would be to program the WebControl module to push IO state changes to the Indogo server.
However, this will be more of a challenge from a software perspective.

Thanks in advance.

--
jeff

Jeff

Posted on
Sat Jul 15, 2017 7:48 am
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Interfacing to a CAI WebControl Module

I used a couple of them for years when they first came out but have since moved to Arduinos and RPIs. At the time I just polled, one as frequently as once per second and never had problems that I remember. The current firmware allows the Wedcontrol to hit a URL if I remember correctly, that would allow you to target Indigo's REST interface pretty easily. If you haven't already, go over to the CAI forum on cocoontech.com. Everything you'd need to know about setting up a URL on the WC8 should be there.

Terry


Sent from my iPhone using Tapatalk

Posted on
Sat Jul 15, 2017 8:20 am
rjeffl offline
Posts: 21
Joined: Sep 28, 2013
Location: Otto, NC

Re: Interfacing to a CAI WebControl Module

Thanks for the quick reply.

When you polled, did you do this with an embedded python script?
Also, did you use the getall.cgi and parse the response to load variables, or did you use the individual .cgi for specific inputs?

Seems like one of these would be the quickest way to get things up and running.

Jeff

Posted on
Sat Jul 15, 2017 8:50 am
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Interfacing to a CAI WebControl Module

[MODERATOR NOTE] moved to a more appropriate forum.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Jul 15, 2017 8:58 am
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Interfacing to a CAI WebControl Module

rjeffl wrote:
Thanks for the quick reply.

When you polled, did you do this with an embedded python script?
Also, did you use the getall.cgi and parse the response to load variables, or did you use the individual .cgi for specific inputs?

Seems like one of these would be the quickest way to get things up and running.


Yep, I polled getall.cgi and parsed with beautiful soup. The script wasn't embedded but rather external, too worried I'd run into the 10 second timeout for embedded scripts, though I don't think I ever did.

I doubt I still have the script anywhere but I'll check when I get home.

Terry



Sent from my iPhone using Tapatalk

Posted on
Sat Jul 15, 2017 9:29 am
rjeffl offline
Posts: 21
Joined: Sep 28, 2013
Location: Otto, NC

Re: Interfacing to a CAI WebControl Module

Thanks, Jay, for moving this to a more appropriate place.

I timed the getall curl command piped through SED, and it seems to come back within 370-400ms.
So, this leaves me with with the pre-parsed raw input values which can be stuffed into variables.
Since the http access is over the local lan, it should have a pretty consistent response time.

In retrospect, an RPI may have been a better choice, but the cost is about the same.
At the end of the day, as long as I can get it to reliably report the state of the inputs, it will get stuffed in the wiring closet and forgottedn.

Thanks.

Jeff

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests