Powerlink serial pinout, linux daemon and web interface

Forum about Visonic products like Powermax Plus and Powermax Pro

Moderators: Rene, Willem4ever

clement
Starting Member
Starting Member
Posts: 8
Joined: Fri Jun 28, 2013 11:52 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by clement »

Hi,
I'm trying to improve my script in order to send me a Push notification and an email (with PushingBox.com) as soon as there is an intrusion.
Currently I have a script on an other server that checks every 30s the URL http://myrouter/cgi-bin/jsongetxplstate.cgi

Here is an example of the output :

Code: Select all

{
   "status":"disarmed",
   "pmaxstatus":"disarmed",
   "readytoarm":"",
   "sensor":[
      {
         "zone":"Hall entree",
         "type":"interior",
         "alert":"false",
         "armed":"false",
         "tamper":"false",
         "low-battery":"false"
      },
      {
         "zone":"Cuisine",
         "type":"interior",
         "alert":"false",
         "armed":"false",
         "tamper":"false",
         "low-battery":"false"
      }
   ]
}
My script parse the "status" value. Possible values are "disarmed" and "armed". On intrusion, the value is still "armed".
I also test the values of "pmaxstatus". Possible values are "disarmed", "arming-away" and "armed-away".
But nothing that can indicate an intrusion.
Any idea? How have you handle this?
Fred_B
Starting Member
Starting Member
Posts: 1
Joined: Sat Apr 05, 2014 4:05 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by Fred_B »

Hello,

You make a terrific job that I tried to perform for my powermax pro.
I received all needed to.
I do my best (not to all understand but to "just" use your job) but...
I need some help.

My configuration :
PL2303 usb to rs232 stick
WR703N router
USB (2 Go) for memory

I have installed as explained by ggero (page 8) but I can't do "/etc/init.d/xPL_Hub enable"
because "xPL_Hub" doesn't exist in "/etc/init.d".
The other services "pmaxd" and "lighttpd" seem to be running. They are marked 'running'
in Web Luci interface.

I tested my pl2303 stick : no problem.

I tried to ask my wr703N :

for "pmaxd -f":
I have 8 zone:
NB : It is right but I need to force by Ctrl c to stop this process !

for "/www/cgi-bin/jsongetxplstate.cgi":
Content-Type:text/html;charset=iso-8859-1
{ "status":"","pmaxstatus":"","readytoarm":"","sensor":[]}

What is the problem ?

Fred
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Re: Powerlink serial pinout, linux daemon and web interface

Post by Phaeton »

Does anybody have an example how to arm THE alarm with a command from a webpage other than the supplied webpage? For example with an xpl script?

How do you guys see if alarm has been triggered on the cgi? I'd like to use this for my domoticasystem hs3.
groeten,
Harry
viknet
Member
Member
Posts: 65
Joined: Thu Jan 26, 2012 1:48 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by viknet »

sorry not to have replied before, please PM me if you see no answer.
@clement: intrusion are not detected, xpl does not seem to suggest how to handle intrusion message and I don't know if the protocol description is precise enough to handle detection

@Fred_B: 1) you can run xpl_hub by yourself (type "xpl_hub &" for example) and see if it improve.
if you don't want to type it each time you restart, create a file inside /etc/init.d/ to start it and enable it with the command line given by ggero

@phaeton,
of course you can arm with xpl,
- with xplsend from a terminal
- with an android phone there are some utility
- with a wget call to the right web page you can easily enable the alarm
something like: wget http://myalarm/cgi-bin/xplsendjson.cgi ?xplpacket=[{"name":"command","value":"arm-away"}]
(not tested)
dad
Starting Member
Starting Member
Posts: 30
Joined: Thu Jun 13, 2013 10:20 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by dad »

@Clement: You might want to look at the xpl security schema for formats for messages:
Schema - SECURITY - XPLProject

HTH
clement
Starting Member
Starting Member
Posts: 8
Joined: Fri Jun 28, 2013 11:52 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by clement »

dad wrote:@Clement: You might want to look at the xpl security schema for formats for messages:
Schema - SECURITY - XPLProject
HTH
You're right, it would be better to listen XPL messages than requesting an URL every 30s...

@viknet, thank you, this is bad, I have to found an other way to get real time intrusion alert...
viknet
Member
Member
Posts: 65
Joined: Thu Jan 26, 2012 1:48 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by viknet »

@clement: if it is xpl compatible, why are'nt you trying to modify pmaxd ? it isn't that hard just find how to get the information from the powermax and if a certain event arrive, trigger an alarm in xpl format
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Re: Powerlink serial pinout, linux daemon and web interface

Post by Phaeton »

it i if you don't understand the code :oops:
I just tried to read the source, but it was a little over my head.
That's a shame cause I like this solution.

Clement, can you code? Because, like you, I really like to see if the alarm is being triggered.
groeten,
Harry
clement
Starting Member
Starting Member
Posts: 8
Joined: Fri Jun 28, 2013 11:52 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by clement »

Not really sure how and where to start.
I also took a look at the code, not so simple...
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Re: Powerlink serial pinout, linux daemon and web interface

Post by Phaeton »

that's a shame. Viknet, a very impolite question. Is it a lot of work for you to add this? I can make a donation, but unfortionately cannot add this.
groeten,
Harry
viknet
Member
Member
Posts: 65
Joined: Thu Jan 26, 2012 1:48 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by viknet »

money is not an issue.....
time is :=)

it's not a lot of work I already put code on github if anybody want to have a look, things need to be changed are in this file:
https://github.com/viknet365/pmaxd/blob ... constant.h
around line 390 I think

the question is how to handle message and how to report them answering these question are tricky:
the pmaxd daemon keep a cached copy of the powermax state: it know its status (armed or not) and the status of each sensor (open close for door, triggered for IR)
what we could do is add a "column" with a state "ALARMED:yes/no" and fill this column: if sensor change and status is armed then sensor.alarmed=yes

the problem is then: for how long do you keep this info (it seems normal to reset it on re-arm for example) but otherwise ?
what happen when by-passing a zone (that is not handled at all by pmaxd by the way)
what to do after pmaxd get this info ? send an xpl message ? who is gonna get it ? set an xpl flag for when the webui is getting info which one, xpl seems to handle it


Please tell me your requirement, find some beta tester and we could start working otherwise I won't spend time on it sorry....
ayasystems
Starting Member
Starting Member
Posts: 40
Joined: Wed May 28, 2014 5:05 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by ayasystems »

May possible compile it for a raspbeery pi?

(sorry for my poor english)



Best regards
ayasystems
Starting Member
Starting Member
Posts: 40
Joined: Wed May 28, 2014 5:05 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by ayasystems »

I can,t compile it with mi raspberry

pi@raspbmc:~/powermax/pmaxd$ gcc test pmaxd.c
In file included from pmaxd.c:23:0:
pmaxd-xpl.c:2:17: fatal error: xPL.h: No such file or directory
compilation terminated.


I need xPL project too? Do you know how can continue?

Best regards
viknet
Member
Member
Posts: 65
Joined: Thu Jan 26, 2012 1:48 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by viknet »

see http://www.xpl4java.org/xPL4Linux/
for the xpl version,
if you can't compile it you can also try source here and there: (only some makefile tweak)
https://github.com/hwstar/xPLLib-hwstar
https://github.com/viknet365/xPLLib-hwstar

good luck
ayasystems
Starting Member
Starting Member
Posts: 40
Joined: Wed May 28, 2014 5:05 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by ayasystems »

I will try it

I'll tell you the results.

Best regards!
Post Reply

Return to “Visonic Alarm systems”