Page 11 of 16
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Tue Sep 23, 2014 3:47 pm
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
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Sat Oct 18, 2014 7:15 pm
by ayasystems
NOBODY??
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Sun Dec 14, 2014 5:33 am
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!
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Sun Jan 25, 2015 6:26 am
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.
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Tue Jan 27, 2015 4:00 pm
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
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Wed Jan 28, 2015 4:08 am
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.
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Wed Jan 28, 2015 4:06 pm
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
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Thu Jan 29, 2015 5:17 am
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.
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Wed Feb 04, 2015 12:22 am
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)
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Fri Feb 06, 2015 4:55 am
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:~#
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Fri Feb 06, 2015 10:59 pm
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.......
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Sat Feb 07, 2015 7:01 am
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.
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Wed Feb 11, 2015 1:18 pm
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
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Wed Feb 11, 2015 2:12 pm
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.
Re: Powerlink serial pinout, linux daemon and web interface
Posted: Wed Feb 11, 2015 6:18 pm
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