CAI WEB CONTROL BEST APP FOR CONTROL

adamww

New Member
Hello , Just ordered cai board , but i am looking for the best software to access from ipod or iphone . I am in the process of automating my house using an Allen Bradley industrial plc with a hmi (touch screen). I tought it would be cool to access the system via wireless/worldwide . I am planing on addressing bits with the cai board . example I will turn on bit 1 , bit 2 and bit 3 it will equal function #7 then use bit 6 as on , bit 7 as off and bit 8 as enter. I would program the on board cia plc to reset the bit after a few seconds and be ready for the next cammand. My allen bradley would accept these bits and with logic control my functions in my house.
 
You can do this by making a website with a password protected page that uses the "get" and "set" commands described in the CAI manual. You don't need to know any HTML code to make a website. There also is an Iphone APP described on the CAI site but not sure how well it works.

Example of mine http://lassenvistaranch.com/systems.html the data won't appear on this page becuase it uses LAN addresses.
 
There is an iPhone app called CasaRemote. You can contact the author of that software, Philippe Mesaric, to see if he could have the app for your version of WebControl and iPhone.
 
You can do this by making a website with a password protected page that uses the "get" and "set" commands described in the CAI manual. You don't need to know any HTML code to make a website. There also is an Iphone APP described on the CAI site but not sure how well it works.

Example of mine http://lassenvistara...om/systems.html the data won't appear on this page becuase it uses LAN addresses.


Thanks for the reply , Ok I get the set and get , but can you set multiple output with one line or one button on your website ,
example on yours http://192.168.0.99:9900/api/setttloutput.cgi?output=5&state=1,but i want to set 4 outputs at one time. Thanks
 
Depending on the software used to make a website/page (I use SiteSpinner) a link with multiple commands could be made under the same button. Or even better if someone knew HTML code (I don't) then there's no limit to what interface could be built.

Another way would be to send a single output from the website or app and use the webcontrol PLC code to turn the other ouputs on.
 
Depending on the software used to make a website/page (I use SiteSpinner) a link with multiple commands could be made under the same button. Or even better if someone knew HTML code (I don't) then there's no limit to what interface could be built.

Another way would be to send a single output from the website or app and use the webcontrol PLC code to turn the other ouputs on.

That is how I would do it. You can set variables using the REST commands and then write plc code to set the outputs however you want when the variable is set to whatever variable you want. The combinations would amount to 8 bit or 256 possibilites.
 
There is an iPhone app called CasaRemote. You can contact the author of that software, Philippe Mesaric, to see if he could have the app for your version of WebControl and iPhone.
Thanks for the reply , This will set output 2 to on (http://192.168.200.216/api/setttloutput.cgi?output=2&state=1)in my network , can I modify this statement to turn on multiple outputs with only one statement. If yes can you give an example. Thanks you.
 
That is how I would do it. You can set variables using the REST commands and then write plc code to set the outputs however you want when the variable is set to whatever variable you want. The combinations would amount to 8 bit or 256 possibilites.
Ok , This is what I come up with from your advise and it works:
START
TSTEQ VAR1 1
CALLSUB BEDLTON
TSTEQ VAR1 2
CALLSUB DINELTON
END
BEDLTON:
SET OP1 1
SET OP2 1
SET OP3 1
SET OP4 1
SET OP5 1
DELAY 5000
SET OP1 0
SET OP2 0
SET OP3 0
SET OP4 0
SET OP5 0
SET OP6 0
SET OP7 0
SET OP8 0
SET VAR1 0
RET
DINELTON:
SET OP1 1
SET OP2 0
SET OP3 0
SET OP4 0
SET OP5 0
SET OP5 1
SET OP6 1
DELAY 5000
SET OP1 0
SET OP2 0
SET OP3 0
SET OP4 0
SET OP5 0
SET OP6 0
SET OP7 0
SET OP8 0
SET VAR1 0
RET
This is a lot of code , But if I can set multiple outputs directly and clear them based on time in the cai plc , it would be very simple. If I can modify this line to set multi outputs : http://192.168.200.216/api/setttloutput.cgi?output=2&state=1. Thanks in advance.
 
It is a lot of lines, but really no big deal.

Just write you PLC code in MS Word and do lots of copy/pasting and you can write this stuff in a few minutes.
 
It is a lot of lines, but really no big deal.

Just write you PLC code in MS Word and do lots of copy/pasting and you can write this stuff in a few minutes.

Ok thanks for the reply , Yes you are correct , no big deal. This cai card is very cool , I have bought a ttl input card for my allen bradley plc , hard wired 10 wires including gnd and +5 from the cai card . Started writing the code , the result was very flaky and unstable. Turns out the ttl output from the cai card is not clean when changing states but a simple time on delay of .5 seconds in the allen bradley plc solved the problem after beating my head against the wall for a while trying to figure out the problem. Here something else cool , as you know the variable is sent out as a web page address , on an ipod you can set a shortcut to a web page on one of your home screens and name it so I now have 10 icons labled "liv lt on" "liv lt off" "hall lt on" "hall lt off" ect ect....
and i have 256 options so 128 ons and 128 offs this is more then enough for the whole house. Very cool card!!!!!
 
I think if the TTL output is controlled by input and input is "bouncing", then the output will follow. If you could add some non-blocking delay on input to act as "debouncer", the output would be probablya lot cleaner.
 
http://www.openremote.org/display/HOME/OpenRemote

Openremote is the best one I have found so far. I can get it to pull data from and push data to the board just fine. I'm not that happy about the online designer, but it does look good. It can be used for iPad, iPhone, and android. Very customizable!

http://code.google.com/p/openhab/

Openhab is another one that I tried out. It takes a lot more time to configure and understand. The interface is nicer, but a real pain to configure.

In the future I plan on making my own interface with php, but until then I'll use openremote.
 
At the moment I'm starting work with [url="http://nodejs.org/]node.js[/url], some Arduinos and a lot more. Very cool stuff but I have a ways to go before I can make anything useful. I also don't know what it can and can not do yet.

Okay this should have been posted with the Arduino stuff (sorry too many monitors). But the Node.js stuff does make it easy to toss together a web server and some AJAX to pull together disparate technologies. Right now I'm working with dynamic updates and HTML & SVG. I'm also pulling in data from web service (SOAP) and I hope to be able to display it all on the web page.
 
Back
Top