Page 2 of 2
Re: How to Disarm system via automated process?
Posted: Sun Jan 05, 2014 10:04 am
by imagineerBurky
I think I'm getting closer.
You were correct, the local EnvisaLink pw is "user"
I believe the reason I am not having success is (reading the TPI guide closely) is that the Socket connection must be persistent! The socket utility I'm using, to try and take the easy course, closes the connection with every transmission.
Guess I'll have to dust off the socket comm code I wrote last year, and use that!
Oh well, I guess I wanted something fun to do while trapped in the winter snows here.
Re: How to Disarm system via automated process?
Posted: Sun Jan 05, 2014 7:20 pm
by K-Man
Yep, this is a garden-variety, old-school, TCP interface to the Envisalink.
If you are on your LAN and you want something that is not session oriented, you could, as someone else on this thread meantioned, just "can" the HTTP GET your browser sends to the Envisalink to arm/disarm the panel.
Considering that your application is so simple, you might find this easier.
Re: How to Disarm system via automated process?
Posted: Sun Jan 05, 2014 7:52 pm
by imagineerBurky
K-Man wrote:... you just "can" the HTTP GET your browser sends to the Envisalink to arm/disarm the panel.
Considering that your application is so simple, you might find this easier.
That sounds intriguing, but not sure what you mean by "can the HTTP GET" The only prior post in this thread I saw that might relate was...
http://192.168.1.81/2?A=4&p=1&X=1234
I assume that "p" is the partition and x="alarm Code" but what is "A"
BTW- I tried this with my actual Alarm Code but it only took me to the standard status page that plain old ordinary http:192.168.1.82 takes me to.
Re: How to Disarm system via automated process?
Posted: Mon Jan 06, 2014 9:48 am
by K-Man
"Can" is a CompSci term for a data object that should be dynamically generated but isn't. You would call the HTTP request you referenced as "canned".
I have no idea what the "A" stands for (before my time here), but it refers to the CGI method in the GET.
3 = ARM
4 = DISARM
You can also put the username and password AUTH credentials in the GET to make it truly sessionless.
Re: How to Disarm system via automated process?
Posted: Mon Jan 06, 2014 10:14 am
by imagineerBurky
Thanks. I was confused because I hadn't referred to anything I did as "canned".
All is clear now, and the GCI works, kinda.
The problem is when "
http://192.168.1.81/2?A=4&p=1&X=1234" is sent, the response is a request for login/pw entry which is a form entry not easily submitted by automation.
As soon as I manually entered that info and hit Enter, the security system armed itself!
Does the GCI support login/pw submission too as part of the parameter string?
If so, this approach appears to do everything I want in an easy manner.
PS- just a guess, but it would make sense for the "A" to stand for "Arming"
Re: How to Disarm system via automated process?
Posted: Mon Jan 06, 2014 12:37 pm
by imagineerBurky
K-Man
I just noticed that you indicated exactly what I was curious about, and that is that the CGI does support login/pw parameters.
How is that done?
Also can Status be fetched via the CGI?
Even better, is there a CGI document for the interface? Then I can answer my own questions!
Re: How to Disarm system via automated process?
Posted: Mon Jan 06, 2014 9:57 pm
by K-Man
Don't quote me but I think it is..
http://username:password@xx.xx.xx.xx
The only status that is available is what you see on the web page. You could "scrape" it, I know of other developers who do this.
We don't really support the local web page and further we reserve the right to remove it in the future if it interferes with new features (due to code space). Envisacor only supports the TPI.
I don't think A is for arming as it is used for other actions. Maybe it means "Action".
Re: How to Disarm system via automated process?
Posted: Tue Jan 07, 2014 8:54 am
by imagineerBurky
K-Man (or should I say Super-Man?) -
You can henceforth be quoted on that!
Sending
http://user:user@192.168.1.81
logs in, and followed by
http://192.168.1.81/2?A=4&p=1&X=1234
successfully Disarms the system.
Awesome!
Thanks so very much !
I wasn't looking forward to having to dust off my socket comm I wrote for a JSON interface control and tweaking it to work with this.
No problem with the "scraping". I am already doing that anyway in another part of my security control software to enable/disable motion triggering on selected cameras depending on the Alarm state. I was just hoping to save some CPU cycles, by not having to parse all the page html to find what I needed.