Powerlink serial pinout, linux daemon and web interface

Forum about Visonic products like Powermax Plus and Powermax Pro

Moderators: Rene, Willem4ever

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 »

Hi to all

I'm ready to publish android app to comunicate with viknet software.

Does anybody try it?

https://play.google.com/store/apps/deta ... larmviknet

Please comment about it here
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 »

NOBODY??
maximillian
Starting Member
Starting Member
Posts: 8
Joined: Sun Dec 14, 2014 5:25 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by maximillian »

ayasystems wrote:Hello Vikent.

I bought the RS232 adapter and doing reverse engineering took the pinout of this area (CELL/PC)
I had a PLink2 but it died for some reason. Instead of dishing out more money to Visonic for questionable hardware I decided to follow this route. Come to find out, many people were already on it!

You did a nice job! Could I possibly get a pinout of the cell/pl/pc connector. It's a little hard to see where you connected the wires. Also, the second white wire going to the TP-link board, is this ground? Where does this connect to the TP-Link?

I have a 12V-5V converter and the TP-Link setup according to the guide on page 6. I would like to follow your guide for wiring since it seems the cleanest. Then I would also like to try your app.

Thanks a bunch!
maximillian
Starting Member
Starting Member
Posts: 8
Joined: Sun Dec 14, 2014 5:25 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by maximillian »

Hello,

I know this is an old thread but in case anything still reads I am looking for some help...

I got the hardware wired up and working. If I do:

pmaxd -fvvvvvv

I can arm and disarm, so I can't be too far off. If I do:

/www/cgi-bin/jsongetxplstate.cgi

I get: { "status":"","pmaxstatus":"","readytoarm":"","sensor":[]}

which I think is wrong so it looks like I am missing something.

I hooked the unit up similarly to ayasystems method. I bought a 12V to 5V adapter and run wires directly from the the test points on the Powermax to the RX/TX pins on the TL-WR703N. I used TP35 and connect to RX and TP33 and connect to TX. I think these are correct but perhaps I am only transmitting and not receiving? I will have to dig deeper.

Thanks.

The web interface isn't working. Actually, lighttpd gives me a Segmentation Fault when I try to run it. But since uhttpd is running I can go to alarm.html and see that page but it doesn't work yet.
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 »

no you are not so far :=)

pmaxd use xpl to communicate with the web page, so just make sure xplhub is working and retry /www/cgi-bin/jsongetxplstate.cgi

don't try to go further until it work.

best regards
maximillian
Starting Member
Starting Member
Posts: 8
Joined: Sun Dec 14, 2014 5:25 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by maximillian »

Thanks for the reply. Here's some checking that I did:

root@OpenWrt:~# ps | grep xPL_Hub
1807 root 1492 S grep xPL_Hub <- not loading automatically.

root@OpenWrt:~# xPL_Hub

root@OpenWrt:~# ps | grep xPL_Hub
1809 root 896 S xPL_Hub
1810 root 904 S xPL_Hub
1812 root 1492 S grep xPL_Hub

root@OpenWrt:~# /www/cgi-bin/jsongetxplstate.cgi

Content-Type:text/html;charset=iso-8859-1
{ "status":"","pmaxstatus":"","readytoarm":"","sensor":[]}

Looks to be about the same result.

I have libxpl_1_ar71xx.ipk and xPLLibexample_1_ar71xx.ipk copied locally and opkg install them. Also did a force-reinstall for got the same result.

Thanks for your help.
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 »

try running xPL_Logger to see if you get something on the xpl_hub, you can also use xpl_send to send arm or disarm command directly from command line
you can also use xpl clock to test your xpl setup
maximillian
Starting Member
Starting Member
Posts: 8
Joined: Sun Dec 14, 2014 5:25 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by maximillian »

After starting xPL_Hub manually, if I do: xPL_Logger -v

I get this:
15/01/29 03:15:28 [xPL_MSG] TYPE=xpl-stat, SOURCE=cdp1802-logger.C0A801AA00eca4bd, TARGET=*, CLASS=config, TYPE=app

And when I load the alarm page I get this:
15/01/29 03:16:42 [xPL_MSG] TYPE=xpl-stat, SOURCE=viknet-webgateway.default, TARGET=*, CLASS=hbeat, TYPE=app
15/01/29 03:16:42 [xPL_MSG] TYPE=xpl-cmnd, SOURCE=viknet-webgateway.default, TARGET=*, CLASS=security, TYPE=request
15/01/29 03:16:42 [xPL_MSG] TYPE=xpl-cmnd, SOURCE=viknet-webgateway.default, TARGET=*, CLASS=security, TYPE=request

I have to brush up on xPL since I am not familiar on how to use it. Then I can try the send and clock commands.

Thanks.
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 »

for those who want to test the daemon without having a working web interface, you can always run this command:

Code: Select all

 xPLSend -c security.basic command=arm-home
this broadcast an xpl message that should arm-home the alarm (also work with arm-away and disarm)
maximillian
Starting Member
Starting Member
Posts: 8
Joined: Sun Dec 14, 2014 5:25 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by maximillian »

Thanks for the syntax. xPLSend works! Also able to do command=arm-away and command=disarm.

I then retried: /www/cgi-bin/jsongetxplstate.cgi
and get the same thing as before:

Content-Type:text/html;charset=iso-8859-1

{ "status":"","pmaxstatus":"","readytoarm":"","sensor":[]}root@OpenWrt:~#
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 »

kill pmaxd and testpmaxd if used, then run pmaxd -fvvvvvvv (7 v if you count)
then launch on another terminal pmaxd -fvvvvvvv
and semnd me the full log + the content of your pmaxd.conf file.

don't expect any answer soon, i am moving and might be away of the internet for a few days.......
maximillian
Starting Member
Starting Member
Posts: 8
Joined: Sun Dec 14, 2014 5:25 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by maximillian »

I appreciate your help. Here's the info you are looking for:

Code: Select all

root@OpenWrt:~# pmaxd -fvvvvvvv
 NOTICE: [Sat Feb  7 04:56:57 2015 initLog:0044]Logging initialized
 NOTICE: [Sat Feb  7 04:56:57 2015 initLog:0045]Verbose level: 7
 NOTICE: [Sat Feb  7 04:56:57 2015 main:0346]Program started by User 0
 INFO: [Sat Feb  7 04:56:57 2015 main:0348]setting SID
 NOTICE: [Sat Feb  7 04:56:57 2015 main:0384]Starting......
 INFO: [Sat Feb  7 04:56:57 2015 initSerialPort:0055]there are 1 device in your config file
 INFO: [Sat Feb  7 04:56:57 2015 initSerialPort:0068]opening /dev/ttyATH0
I have 5 zone:
 DEBUG: [Sat Feb  7 04:56:57 2015 sendBuffer:0157]Sending the following buffer to serial TTY
 DEBUG: [Sat Feb  7 04:56:57 2015 logBuffer:0140]BufferSize: 12
 DEBUG: [Sat Feb  7 04:56:57 2015 logBuffer:0141]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Sat Feb  7 04:56:57 2015 calculChecksum:0150]checksum: 001A
 DEBUG: [Sat Feb  7 04:56:57 2015 sendBuffer:0166]result of serial write:: 15
 DEBUG: [Sat Feb  7 04:56:57 2015 main:0391]Sarting main loop....
 DEBUG: [Sat Feb  7 04:56:57 2015 packetManager:0272]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Sat Feb  7 04:56:57 2015 calculChecksum:0150]checksum: 0088
 DEBUG: [Sat Feb  7 04:56:57 2015 deFormatBuffer:0182]checksum OK
 DEBUG: [Sat Feb  7 04:56:57 2015 packetManager:0274]Packet received
 DEBUG: [Sat Feb  7 04:56:57 2015 logBuffer:0140]BufferSize: 12
 DEBUG: [Sat Feb  7 04:56:57 2015 logBuffer:0141]Buffer: A5 0D 01 00 00 00 00 00 00 00 80 43
 INFO: [Sat Feb  7 04:56:57 2015 packetManager:0286]Packet not recognized
 DEBUG: [Sat Feb  7 04:56:57 2015 logBuffer:0140]BufferSize: 12
 INFO: [Sat Feb  7 04:56:57 2015 logBuffer:0141]Buffer: A5 0D 01 00 00 00 00 00 00 00 80 43
 DEBUG: [Sat Feb  7 04:56:57 2015 sendBuffer:0157]Sending the following buffer to serial TTY
 DEBUG: [Sat Feb  7 04:56:57 2015 logBuffer:0140]BufferSize: 2
 DEBUG: [Sat Feb  7 04:56:57 2015 logBuffer:0141]Buffer: 02 43
 DEBUG: [Sat Feb  7 04:56:57 2015 calculChecksum:0150]checksum: 00BA
 DEBUG: [Sat Feb  7 04:56:57 2015 sendBuffer:0166]result of serial write:: 5
 DEBUG: [Sat Feb  7 04:56:57 2015 packetManager:0299]End of packet treatment
 DEBUG: [Sat Feb  7 04:56:57 2015 packetManager:0272]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Sat Feb  7 04:56:57 2015 calculChecksum:0150]checksum: 00FE
 ERR: [Sat Feb  7 04:56:57 2015 deFormatBuffer:0185]checksum NOK calculated:00FE in packet:0000
 ERR: [Sat Feb  7 04:56:57 2015 packetManager:0292]Packet not correctly formated
 DEBUG: [Sat Feb  7 04:56:57 2015 logBuffer:0140]BufferSize: 2
 ERR: [Sat Feb  7 04:56:57 2015 logBuffer:0141]Buffer: 80 80
 DEBUG: [Sat Feb  7 04:56:57 2015 packetManager:0299]End of packet treatment

Code: Select all

root@OpenWrt:~# pmaxd -fvvvvvvv
 NOTICE: [Sat Feb  7 04:57:00 2015 initLog:0044]Logging initialized
 NOTICE: [Sat Feb  7 04:57:00 2015 initLog:0045]Verbose level: 7
 NOTICE: [Sat Feb  7 04:57:00 2015 main:0346]Program started by User 0
 INFO: [Sat Feb  7 04:57:00 2015 main:0348]setting SID
 NOTICE: [Sat Feb  7 04:57:00 2015 main:0384]Starting......
 INFO: [Sat Feb  7 04:57:00 2015 initSerialPort:0055]there are 1 device in your config file
 INFO: [Sat Feb  7 04:57:00 2015 initSerialPort:0068]opening /dev/ttyATH0
I have 5 zone:
 DEBUG: [Sat Feb  7 04:57:00 2015 sendBuffer:0157]Sending the following buffer to serial TTY
 DEBUG: [Sat Feb  7 04:57:00 2015 logBuffer:0140]BufferSize: 12
 DEBUG: [Sat Feb  7 04:57:00 2015 logBuffer:0141]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Sat Feb  7 04:57:00 2015 calculChecksum:0150]checksum: 001A
 DEBUG: [Sat Feb  7 04:57:00 2015 sendBuffer:0166]result of serial write:: 15
 DEBUG: [Sat Feb  7 04:57:00 2015 main:0391]Sarting main loop....

conf:

Code: Select all

  # authenticator
    usercode=0x####;
    device = ["/dev/ttyATH0"]; // Use more than 2
    zonename = ["Front door", "Back door", "Garage door", "Back door", "Child room"]; // Use more than 2
I do have several more zones, but I only have the above for testing.
kingofnuls
Starting Member
Starting Member
Posts: 4
Joined: Mon Dec 08, 2014 10:50 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by kingofnuls »

Hello,

I want to connect my visonic powermaster30 (in my dream to a RPi) and so, i wonder if the viknet solution works on all openwrt hardware or specifically on this TP-LINK WRT703N which is hard to find today.

Thanks for your help
Last edited by kingofnuls on Thu Feb 12, 2015 12:21 pm, edited 1 time in total.
kingofnuls
Starting Member
Starting Member
Posts: 4
Joined: Mon Dec 08, 2014 10:50 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by kingofnuls »

Can the TP-Link be replaced by another openwrt hardware like this one ( GL.iNet Wi-Fi Router OpenWrt SSH USB 64Mbyte RAM Wireless Repeater PCB Board - Green ) ?
http://eud.dx.com/product/gl-inet-wi-fi ... NtBjfnh08o
It has serial pins available and some GPIO.
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 »

try

Code: Select all

device = ["/dev/ttyATH0","/dev/ttyATH0"]; // Use more than 2
instead if I remember correctly it's better to have more than two
Post Reply

Return to “Visonic Alarm systems”