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!

I'm in the good way...

Thanks!!

Code: Select all

pi@raspberrypi ~/pmaxd $ make
cc  -c pmaxd.c
pmaxd.c:299:6: warning: conflicting types for 'serialHandler' [enabled by default]
pmaxd-xpl.c:44:7: note: previous implicit declaration of 'serialHandler' was here
pmaxd.c:335:6: warning: conflicting types for 'packetManager' [enabled by default]
pmaxd.c:327:9: note: previous implicit declaration of 'packetManager' was here
cc  pmaxd.o -o pmaxd -lxPL -lconfig
cc  -c xplsendjson.c
cc  xplsendjson.o -o xplsendjson.cgi -lxPL
cc  -c jsongetxplstate.c
cc  jsongetxplstate.o -o jsongetxplstate.cgi -lxPL
cc  -c testpmaxd.c
cc  testpmaxd.o -o testpmaxd -lxPL -lconfig
pi@raspberrypi ~/pmaxd $
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 »

Its not working....


I've put the conf file in /etc/ after it error I/O not show

Execute pmaxd but doesn't work. The cpu is up to 98% but nothing happens
Captura.PNG
Captura.PNG (75.85 KiB) Viewed 17918 times
Any idea?

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 »

Hi

I'm still working to do a build to raspberry.

As you can see in this link http://www.raspberrypi.org/forums/viewt ... 6&p=289490 the getopt() function works diferently in raspberry so is needed add this check to exit

while (((c = getopt (argc, argv, "fvh")) != -1) && (c != 255))
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 »

Now seems works....

It is needed complile with "gcc -fsigned-char" option.


pi@raspberrypi ~/pmaxd $ pmaxd[14658]: [Sat Jun 7 21:33:46 2014 initLog:0058]Logging initialized
pmaxd[14658]: [Sat Jun 7 21:33:46 2014 initLog:0059]Verbose level: 5
pmaxd[14658]: [Sat Jun 7 21:33:46 2014 main:0415]Program started by User 1000


Raspberry Pi (Debian) doesn't have service_start instruction so I don't know what code put in /etc/restart.sh

Could you help me??
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'm installed apache 2 on raspby.

Move www file on your source code to /var/www/
and move *.cgi to /usr/lib/cgi-bin/

wget http://localhost/cgi-bin/jsongetxplstate.cgi
restult: { "status":"","pmaxstatus":"","readytoarm":"","sensor":[]}

I think it is ready to test connected to powermax
Lunch pmaxd: (without powermax connected)

Code: Select all

pi@raspberrypi /var/www $ pmaxd -f -vvvvv
 NOTICE: [Sat Jun  7 23:53:37 2014 initLog:0058]Logging initialized
 NOTICE: [Sat Jun  7 23:53:37 2014 initLog:0059]Verbose level: 5
 NOTICE: [Sat Jun  7 23:53:37 2014 main:0415]Program started by User 1000
 NOTICE: [Sat Jun  7 23:53:37 2014 main:0449]Starting......
I have 8 zone:
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 0, name: R.D.C.
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 1, name: Etage
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 2, name: Salon
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 3, name: Salle a manger
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 4, name: cuisine
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 5, name: porte garage
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 6, name: volet garage
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 7, name: detecteur incendie
 ERR: [Sat Jun  7 23:53:37 2014 deFormatBuffer:0203]checksum NOK calculated:00EE in packet:0000
 ERR: [Sat Jun  7 23:53:37 2014 packetManager:0359]Packet not correctly formated
 ERR: [Sat Jun  7 23:53:37 2014 logBuffer:0158]Buffer: 0B 06 00
 ERR: [Sat Jun  7 23:53:42 2014 deFormatBuffer:0203]checksum NOK calculated:00A7 in packet:00B6
 ERR: [Sat Jun  7 23:53:42 2014 packetManager:0359]Packet not correctly formated
 ERR: [Sat Jun  7 23:53:42 2014 logBuffer:0158]Buffer: 25 25 EC B6 BC 25 EC B6 00 00 00 00 A8 D5 EF B6 00 00 00 00 00 00 00 00 36 00 00 00 02 54 00 00 D9 44 DD BE 6C 45 DD BE 40 E2 E2 B6 00 05 00 00 05 00 00 00 BF 00 00 00 3B 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 80 76 E9 B6 2C 45 DD BE 00 00 00 00 00 00 00 00 D4 C7 00 00 04 00 00 00 02 00 02 00 00 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 EC B6 0F 00 00 00 0F 00 00 00 00 05 00 00 05 00 00 0000 00
The next text will be with powermax connected.

Thank you for your work!

I'll write result with the panel connected. I'll use a ftdi USB - TLL
d0min0
Starting Member
Starting Member
Posts: 2
Joined: Sun Jun 08, 2014 9:16 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by d0min0 »

ayasystems wrote:I'm installed apache 2 on raspby.

Move www file on your source code to /var/www/
and move *.cgi to /usr/lib/cgi-bin/

wget http://localhost/cgi-bin/jsongetxplstate.cgi
restult: { "status":"","pmaxstatus":"","readytoarm":"","sensor":[]}

I think it is ready to test connected to powermax
Lunch pmaxd: (without powermax connected)

Code: Select all

pi@raspberrypi /var/www $ pmaxd -f -vvvvv
 NOTICE: [Sat Jun  7 23:53:37 2014 initLog:0058]Logging initialized
 NOTICE: [Sat Jun  7 23:53:37 2014 initLog:0059]Verbose level: 5
 NOTICE: [Sat Jun  7 23:53:37 2014 main:0415]Program started by User 1000
 NOTICE: [Sat Jun  7 23:53:37 2014 main:0449]Starting......
I have 8 zone:
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 0, name: R.D.C.
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 1, name: Etage
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 2, name: Salon
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 3, name: Salle a manger
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 4, name: cuisine
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 5, name: porte garage
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 6, name: volet garage
 NOTICE: [Sat Jun  7 23:53:37 2014 PmaxInit:0162]zone: 7, name: detecteur incendie
 ERR: [Sat Jun  7 23:53:37 2014 deFormatBuffer:0203]checksum NOK calculated:00EE in packet:0000
 ERR: [Sat Jun  7 23:53:37 2014 packetManager:0359]Packet not correctly formated
 ERR: [Sat Jun  7 23:53:37 2014 logBuffer:0158]Buffer: 0B 06 00
 ERR: [Sat Jun  7 23:53:42 2014 deFormatBuffer:0203]checksum NOK calculated:00A7 in packet:00B6
 ERR: [Sat Jun  7 23:53:42 2014 packetManager:0359]Packet not correctly formated
 ERR: [Sat Jun  7 23:53:42 2014 logBuffer:0158]Buffer: 25 25 EC B6 BC 25 EC B6 00 00 00 00 A8 D5 EF B6 00 00 00 00 00 00 00 00 36 00 00 00 02 54 00 00 D9 44 DD BE 6C 45 DD BE 40 E2 E2 B6 00 05 00 00 05 00 00 00 BF 00 00 00 3B 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 80 76 E9 B6 2C 45 DD BE 00 00 00 00 00 00 00 00 D4 C7 00 00 04 00 00 00 02 00 02 00 00 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 EC B6 0F 00 00 00 0F 00 00 00 00 05 00 00 05 00 00 0000 00
The next text will be with powermax connected.

Thank you for your work!

I'll write result with the panel connected. I'll use a ftdi USB - TLL
Hi,

I'm also connecting my Raspberry PI to my PowerMax Complete, however I am using Debian.

If you get it to work, could you do an installation guide for dummies? :-)

Thanks.

// Michael
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've checksum issue....

I can get it works

Code: Select all

 NOTICE: [Tue Jun 10 00:43:25 2014 initLog:0058]Logging initialized
 NOTICE: [Tue Jun 10 00:43:25 2014 initLog:0059]Verbose level: 5
 NOTICE: [Tue Jun 10 00:43:25 2014 main:0418]Program started by User 1000
 NOTICE: [Tue Jun 10 00:43:25 2014 main:0452]Starting......
 NOTICE: [Tue Jun 10 00:43:25 2014 main:0455]initXpl....
 NOTICE: [Tue Jun 10 00:43:25 2014 main:0457]initSerialPort....
 NOTICE: [Tue Jun 10 00:43:29 2014 main:0460]PmaxInit....
 NOTICE: [Tue Jun 10 00:43:29 2014 main:0461]PASS
I have 8 zone:
 NOTICE: [Tue Jun 10 00:43:29 2014 PmaxInit:0163]zone: 0, name: R.D.C.
 NOTICE: [Tue Jun 10 00:43:29 2014 PmaxInit:0163]zone: 1, name: Etage
 NOTICE: [Tue Jun 10 00:43:29 2014 PmaxInit:0163]zone: 2, name: Salon
 NOTICE: [Tue Jun 10 00:43:29 2014 PmaxInit:0163]zone: 3, name: Salle a manger
 NOTICE: [Tue Jun 10 00:43:29 2014 PmaxInit:0163]zone: 4, name: cuisine
 NOTICE: [Tue Jun 10 00:43:29 2014 PmaxInit:0163]zone: 5, name: porte garage
 NOTICE: [Tue Jun 10 00:43:29 2014 PmaxInit:0163]zone: 6, name: volet garage
 NOTICE: [Tue Jun 10 00:43:29 2014 PmaxInit:0163]zone: 7, name: detecteur incendie
v NOTICE: [Tue Jun 10 00:43:46 2014 KeyPressHandling:0292]getting versions string
 ERR: [Tue Jun 10 00:43:46 2014 deFormatBuffer:0206]checksum NOK calculated:00F5 in packet:000D
 ERR: [Tue Jun 10 00:43:46 2014 packetManager:0362]Packet not correctly formated
 ERR: [Tue Jun 10 00:43:46 2014 logBuffer:0161]Buffer: 02 FD 0A
 ERR: [Tue Jun 10 00:43:46 2014 deFormatBuffer:0206]checksum NOK calculated:00B6 in packet:0033
 ERR: [Tue Jun 10 00:43:46 2014 packetManager:0362]Packet not correctly formated
 ERR: [Tue Jun 10 00:43:46 2014 logBuffer:0161]Buffer: 04 36 4A 2D 37 30 30
 ERR: [Tue Jun 10 00:43:46 2014 deFormatBuffer:0206]checksum NOK calculated:0073 in packet:0039
 ERR: [Tue Jun 10 00:43:46 2014 packetManager:0362]Packet not correctly formated
 ERR: [Tue Jun 10 00:43:46 2014 logBuffer:0161]Buffer: 20 76 34 2E 34 2E 31
 ERR: [Tue Jun 10 00:43:46 2014 deFormatBuffer:0206]checksum NOK calculated:00AD in packet:0076
 ERR: [Tue Jun 10 00:43:46 2014 packetManager:0362]Packet not correctly formated
 ERR: [Tue Jun 10 00:43:46 2014 logBuffer:0161]Buffer: 37 30 30 35 35 30 20
 ERR: [Tue Jun 10 00:43:46 2014 deFormatBuffer:0206]checksum NOK calculated:003B in packet:00FF
 ERR: [Tue Jun 10 00:43:46 2014 packetManager:0362]Packet not correctly formated
 ERR: [Tue Jun 10 00:43:46 2014 logBuffer:0161]Buffer: 34 2E 32 30 FF FF
 ERR: [Tue Jun 10 00:43:46 2014 deFormatBuffer:0206]checksum NOK calculated:0000 in packet:00FF
 ERR: [Tue Jun 10 00:43:46 2014 packetManager:0362]Packet not correctly formated
 ERR: [Tue Jun 10 00:43:46 2014 logBuffer:0161]Buffer: FF FF FF FF FF FF FF
 ERR: [Tue Jun 10 00:43:46 2014 deFormatBuffer:0206]checksum NOK calculated:00EC in packet:0071
 ERR: [Tue Jun 10 00:43:46 2014 packetManager:0362]Packet not correctly formated
 ERR: [Tue Jun 10 00:43:46 2014 logBuffer:0161]Buffer: FF 0A 07 08 01 F8 FF
 ERR: [Tue Jun 10 00:43:49 2014 deFormatBuffer:0206]checksum NOK calculated:007C in packet:0031
 ERR: [Tue Jun 10 00:43:49 2014 packetManager:0362]Packet not correctly formated
 ERR: [Tue Jun 10 00:43:49 2014 logBuffer:0161]Buffer: 3F 00 04 36 4A 2D 37 30 30 33 35 37 20 76 34 2E 34 2E
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 don't know what can i do....

Code: Select all

pi@raspberrypi ~/pmaxd $ pmaxd -vvvvvvvvvvvvvvvvvvvvvvvvvvvvv -f
 NOTICE: [Tue Jun 10 01:21:47 2014 initLog:0058]Logging initialized
 NOTICE: [Tue Jun 10 01:21:47 2014 initLog:0059]Verbose level: 29
 NOTICE: [Tue Jun 10 01:21:47 2014 main:0418]Program started by User 1000
 INFO: [Tue Jun 10 01:21:47 2014 main:0420]setting SID
 NOTICE: [Tue Jun 10 01:21:47 2014 main:0452]Starting......
 NOTICE: [Tue Jun 10 01:21:47 2014 main:0455]initXpl....
 NOTICE: [Tue Jun 10 01:21:47 2014 main:0457]initSerialPort....
 INFO: [Tue Jun 10 01:21:47 2014 initSerialPort:0071]there are 1 device in your config file
 INFO: [Tue Jun 10 01:21:47 2014 initSerialPort:0074]Intentando comunicar con
 INFO: [Tue Jun 10 01:21:52 2014 initSerialPort:0085]opening /dev/rfcomm1
 NOTICE: [Tue Jun 10 01:21:52 2014 main:0460]PmaxInit....
 NOTICE: [Tue Jun 10 01:21:52 2014 main:0461]PASS
 DEBUG: [Tue Jun 10 01:21:52 2014 logBuffer:0160]BufferSize: 180
 DEBUG: [Tue Jun 10 01:21:52 2014 logBuffer:0161]Buffer: 30 03 B5 01 02 00 01 00 04 67 00 00 00 00 00 00 08 C0 B4 01 90 93 02 00 00 00 00 00 02 00 00 00 A8 C1 B4 01 00 00 00 00 00 00 00 00 11 00 00 00 75 73 65 72 63 6F 64 65 00 00 00 00 11 00 00 00 05 00 00 00 50 03 B5 01 00 00 00 00 49 00 00 00 00 03 B5 01 98 03 B5 01 20 04 B5 01 60 07 B5 01 C0 07 B5 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 00 00 00 C8 03 B5 01 07 00 00 00 08 04 B5 01 00 00 00 00 08 C0 B4 01 90 93 02 00 00 00 00 00
I have 8 zone:
 NOTICE: [Tue Jun 10 01:21:52 2014 PmaxInit:0163]zone: 0, name: R.D.C.
 NOTICE: [Tue Jun 10 01:21:52 2014 PmaxInit:0163]zone: 1, name: Etage
 NOTICE: [Tue Jun 10 01:21:52 2014 PmaxInit:0163]zone: 2, name: Salon
 NOTICE: [Tue Jun 10 01:21:52 2014 PmaxInit:0163]zone: 3, name: Salle a manger
 NOTICE: [Tue Jun 10 01:21:52 2014 PmaxInit:0163]zone: 4, name: cuisine
 NOTICE: [Tue Jun 10 01:21:52 2014 PmaxInit:0163]zone: 5, name: porte garage
 NOTICE: [Tue Jun 10 01:21:52 2014 PmaxInit:0163]zone: 6, name: volet garage
 NOTICE: [Tue Jun 10 01:21:52 2014 PmaxInit:0163]zone: 7, name: detecteur incendie
 DEBUG: [Tue Jun 10 01:21:52 2014 sendBuffer:0177]Sending the following buffer to serial TTY
 DEBUG: [Tue Jun 10 01:21:52 2014 logBuffer:0160]BufferSize: 12
 DEBUG: [Tue Jun 10 01:21:52 2014 logBuffer:0161]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Tue Jun 10 01:21:52 2014 calculChecksum:0170]checksum: 001A
 DEBUG: [Tue Jun 10 01:21:52 2014 sendBuffer:0186]result of serial write:: 15
 DEBUG: [Tue Jun 10 01:21:52 2014 sendBuffer:0177]Sending the following buffer to serial TTY
 DEBUG: [Tue Jun 10 01:21:52 2014 logBuffer:0160]BufferSize: 12
 DEBUG: [Tue Jun 10 01:21:52 2014 logBuffer:0161]Buffer: AB 06 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Tue Jun 10 01:21:52 2014 calculChecksum:0170]checksum: 000B
 DEBUG: [Tue Jun 10 01:21:52 2014 sendBuffer:0186]result of serial write:: 15
 DEBUG: [Tue Jun 10 01:21:52 2014 main:0464]Sarting main loop....
 DEBUG: [Tue Jun 10 01:21:52 2014 packetManager:0342]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Tue Jun 10 01:21:52 2014 calculChecksum:0170]checksum: 0000
 ERR: [Tue Jun 10 01:21:52 2014 deFormatBuffer:0206]checksum NOK calculated:0000 in packet:000A
 ERR: [Tue Jun 10 01:21:52 2014 packetManager:0362]Packet not correctly formated
 DEBUG: [Tue Jun 10 01:21:52 2014 logBuffer:0160]BufferSize: 3
 ERR: [Tue Jun 10 01:21:52 2014 logBuffer:0161]Buffer: 02 43 BA
 DEBUG: [Tue Jun 10 01:21:52 2014 packetManager:0369]End of packet treatment
 DEBUG: [Tue Jun 10 01:21:53 2014 packetManager:0342]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Tue Jun 10 01:21:53 2014 calculChecksum:0170]checksum: 0084
 ERR: [Tue Jun 10 01:21:53 2014 deFormatBuffer:0206]checksum NOK calculated:0084 in packet:000D
 ERR: [Tue Jun 10 01:21:53 2014 packetManager:0362]Packet not correctly formated
 DEBUG: [Tue Jun 10 01:21:53 2014 logBuffer:0160]BufferSize: 31
 ERR: [Tue Jun 10 01:21:53 2014 logBuffer:0161]Buffer: 09 01 00 00 00 00 00 00 00 00 43 0D 0A 0D 02 43 BA 0A 0D A5 09 01 00 00 00 00 00 00 00 00 43
 DEBUG: [Tue Jun 10 01:21:53 2014 packetManager:0369]End of packet treatment
t NOTICE: [Tue Jun 10 01:21:56 2014 KeyPressHandling:0288]try re-enroll
 DEBUG: [Tue Jun 10 01:21:56 2014 sendBuffer:0177]Sending the following buffer to serial TTY
 DEBUG: [Tue Jun 10 01:21:56 2014 logBuffer:0160]BufferSize: 12
 DEBUG: [Tue Jun 10 01:21:56 2014 logBuffer:0161]Buffer: AB 06 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Tue Jun 10 01:21:56 2014 calculChecksum:0170]checksum: 000B
 DEBUG: [Tue Jun 10 01:21:56 2014 sendBuffer:0186]result of serial write:: 15
 DEBUG: [Tue Jun 10 01:21:56 2014 packetManager:0342]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Tue Jun 10 01:21:56 2014 calculChecksum:0170]checksum: 0053
 ERR: [Tue Jun 10 01:21:56 2014 deFormatBuffer:0206]checksum NOK calculated:0053 in packet:0000
 ERR: [Tue Jun 10 01:21:56 2014 packetManager:0362]Packet not correctly formated
 DEBUG: [Tue Jun 10 01:21:56 2014 logBuffer:0160]BufferSize: 254
 ERR: [Tue Jun 10 01:21:56 2014 logBuffer:0161]Buffer: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 36 00 00 00 02 54 00 00 B9 94 E8 BE 4C 95 E8 BE 40 E2 E7 B6 00 05 00 00 05 00 00 00 BF 00 00 00 3B 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 80 76 EE B6 0C 95 E8 BE 00 00 00 00 00 00 00 00 00 C8 00 00 04 00 00 00 02 00 02 00 00 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 F1 B6 0F 00 00 00 0F 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 3B 8A 00 00 00 03 100 00
 DEBUG: [Tue Jun 10 01:21:56 2014 packetManager:0369]End of packet treatment
 DEBUG: [Tue Jun 10 01:21:56 2014 packetManager:0342]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Tue Jun 10 01:21:56 2014 calculChecksum:0170]checksum: 00F5
 ERR: [Tue Jun 10 01:21:56 2014 deFormatBuffer:0206]checksum NOK calculated:00F5 in packet:0000
 ERR: [Tue Jun 10 01:21:56 2014 packetManager:0362]Packet not correctly formated
 DEBUG: [Tue Jun 10 01:21:56 2014 logBuffer:0160]BufferSize: 7
 ERR: [Tue Jun 10 01:21:56 2014 logBuffer:0161]Buffer: 09 01 00 00 00 00 00
 DEBUG: [Tue Jun 10 01:21:56 2014 packetManager:0369]End of packet treatment
 DEBUG: [Tue Jun 10 01:21:56 2014 packetManager:0342]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Tue Jun 10 01:21:56 2014 calculChecksum:0170]checksum: 00D1
 ERR: [Tue Jun 10 01:21:56 2014 deFormatBuffer:0206]checksum NOK calculated:00D1 in packet:0000
 ERR: [Tue Jun 10 01:21:56 2014 packetManager:0362]Packet not correctly formated
 DEBUG: [Tue Jun 10 01:21:56 2014 logBuffer:0160]BufferSize: 13
 ERR: [Tue Jun 10 01:21:56 2014 logBuffer:0161]Buffer: 43 0D 0A 0D 02 43 BA 0A 0D A5 09 01 00
 DEBUG: [Tue Jun 10 01:21:56 2014 packetManager:0369]End of packet treatment
 DEBUG: [Tue Jun 10 01:21:56 2014 packetManager:0342]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Tue Jun 10 01:21:56 2014 calculChecksum:0170]checksum: 00BC
 ERR: [Tue Jun 10 01:21:56 2014 deFormatBuffer:0206]checksum NOK calculated:00BC in packet:000D
 ERR: [Tue Jun 10 01:21:56 2014 packetManager:0362]Packet not correctly formated
 DEBUG: [Tue Jun 10 01:21:56 2014 logBuffer:0160]BufferSize: 5
 ERR: [Tue Jun 10 01:21:56 2014 logBuffer:0161]Buffer: 00 00 00 00 43
 DEBUG: [Tue Jun 10 01:21:56 2014 packetManager:0369]End of packet treatment
Please any help!

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 »

definitely a problem with timeout, try changing it, otherwise it is a pretty good start
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 »

It is working finally thanks to viknet !!!

Raspberry need higher timeout value

It is the make file with the correct options to compile pmaxd sources into raspbian

I'm ussing apache2 to publish web


Note: you can execute make install to copy compiled files.

Code: Select all

# build helloworld executable when user executes "make"
CFLAGS          += -I $(SRCDIR)/FLU $(OPTIMIZE) $(DEBUG) -fsigned-char
LDFLAGS         += -fsigned-char
CC              = $(CROSS_COMPILE)gcc
all: pmaxd xplsendjson jsongetxplstate testpmaxd

install: pmaxd xplsendjson jsongetxplstate testpmaxd
	cp -f pmaxd /usr/bin/pmaxd
	cp -f testpmaxd /usr/testpmaxd
	cp -f xplsendjson.cgi /usr/lib/cgi-bin/xplsendjson.cgi
	cp -f jsongetxplstate.cgi /usr/lib/cgi-bin/jsongetxplstate.cgi

	
pmaxd: pmaxd.o
	$(CC) $(LDFLAGS) pmaxd.o -o pmaxd -lxPL -lconfig 
pmaxd.o: pmaxd.c
	$(CC) $(CFLAGS) -c pmaxd.c 
xplsendjson: xplsendjson.o
	$(CC) $(LDFLAGS) xplsendjson.o -o xplsendjson.cgi -lxPL 
xplsendjson.o: xplsendjson.c
	$(CC) $(CFLAGS) -c xplsendjson.c 
jsongetxplstate: jsongetxplstate.o
	$(CC) $(LDFLAGS) jsongetxplstate.o -o jsongetxplstate.cgi -lxPL 
jsongetxplstate.o: jsongetxplstate.c
	$(CC) $(CFLAGS) -c jsongetxplstate.c 
testpmaxd: testpmaxd.o
	$(CC) $(LDFLAGS) testpmaxd.o -o testpmaxd -lxPL -lconfig 
testpmaxd.o: testpmaxd.c
	$(CC) $(CFLAGS) -c testpmaxd.c 
		
	
	

# remove object files and executable when user executes "make clean"
clean:
	rm *.o pmaxd testpmaxd xplsendjson.cgi jsongetxplstate.cgi
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 »

Finally mount wr702N

It's working fine!
Attachments
2014-06-20 20.17.12.jpg
2014-06-20 20.17.12.jpg (289.03 KiB) Viewed 17530 times
2014-06-20 20.16.46.jpg
2014-06-20 20.16.46.jpg (197.25 KiB) Viewed 17530 times
bartbakels
Advanced Member
Advanced Member
Posts: 515
Joined: Tue May 31, 2011 6:44 pm
Contact:

Re: Powerlink serial pinout, linux daemon and web interface

Post by bartbakels »

Hi,

Great work all,

Im quite interested in a prebuild image for a raspberry to interface the visonic, which can be readout by HS3. Probably via the custom webinterface u guess created by Get and Put commands.

regards

Bart
Software: HS3, HStouch, Plugwise , BLBackup, BLLatestImage, Zwave, JowiHUE, PHlocation, Netcam, Harmony Plugin, ThinkingCleaner, HSPhone, Eneco Toon Script, Pushover, Visonic Powermax LV Interface

(ON ESXI )on NUC
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 »

bartbakels wrote:Hi,

Great work all,

Im quite interested in a prebuild image for a raspberry to interface the visonic, which can be readout by HS3. Probably via the custom webinterface u guess created by Get and Put commands.

regards

Bart
Hi Bartbakels,

I can compile viknet code to raspberry but it is not working fine. It is having problems with serial link. I don't have enough knowledge to modify it.

To compilte it to raspberry only is needed a correct makefile file. Raspberry don't understan char unsigned and it must be specified in the makefile file.

Could you adapt viknet serial code to works in rapsberry?

In the actual state in raspberry is not funcional.

Best regards!
bartbakels
Advanced Member
Advanced Member
Posts: 515
Joined: Tue May 31, 2011 6:44 pm
Contact:

Re: Powerlink serial pinout, linux daemon and web interface

Post by bartbakels »

sorry, the reason that I asked for an image, is that my linux knowledge is very high level ;). Maybe someone else can help. I Know Phaeton is also still looking for an possibility to interface the visonic in HS3. I also started a thread, to recreate an HS3 plugin in the Visonic plugin setion, but no much animo i guess...

regards

Bart
Software: HS3, HStouch, Plugwise , BLBackup, BLLatestImage, Zwave, JowiHUE, PHlocation, Netcam, Harmony Plugin, ThinkingCleaner, HSPhone, Eneco Toon Script, Pushover, Visonic Powermax LV Interface

(ON ESXI )on NUC
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 »

ayasystems, I don't really understand where you are connected on the powermax, aren't you using the PC/IP port ?
Post Reply

Return to “Visonic Alarm systems”