Powerlink serial pinout, linux daemon and web interface

Forum about Visonic products like Powermax Plus and Powermax Pro

Moderators: Rene, Willem4ever

Re: Powerlink serial pinout, linux daemon and web interface

Postby ayasystems » Tue Sep 13, 2016 7:10 pm

manno wrote:It looks like I was able to get past the Seg Fault issue. It could have been something within the executed script that was causing this.

I'm now having another issue with disarming, seems that it does not execute the /etc/pmaxd/disarmed script at all. No errors at all either, just does not execute it. I see the others in the debug: "ExecuteScript:0182]Script /etc/pmaxd/armedHome & executed" but never see anything for "disarmed"

Any ideas on this?

Thanks!


I will check it....
ayasystems
Starting Member
Starting Member
 
Posts: 40
Joined: May 2014

Re: Powerlink serial pinout, linux daemon and web interface

Postby manno » Sat Sep 17, 2016 1:45 am

Thanks for all of the help ayasystems! I was having some checksum NOK issues with the wr703n and USB <-> TTL adapter so I wired the panel port directly to the wr703n TP_IN & TP_OUT pads. This fixed the checksum errors and was able to send commands to the panel (a - arm, d - disarm, g - log) but was not able to read from the panel, even after triple checking my wiring. I am having the same issues as maximillian was having earlier in this thread. Decided to try out the raspberry pi mod using the ch340 adapter to see if it is any better. Will give an update on how that works out.

Thanks for all of the great information!
manno
Starting Member
Starting Member
 
Posts: 16
Joined: September 2011

Re: Powerlink serial pinout, linux daemon and web interface

Postby ayasystems » Wed Sep 21, 2016 10:15 am

manno wrote:It looks like I was able to get past the Seg Fault issue. It could have been something within the executed script that was causing this.


Let me know what was the problem please.

manno wrote:I'm now having another issue with disarming, seems that it does not execute the /etc/pmaxd/disarmed script at all. No errors at all either, just does not execute it. I see the others in the debug: "ExecuteScript:0182]Script /etc/pmaxd/armedHome & executed" but never see anything for "disarmed"

Any ideas on this?

Thanks!



Could you test it -> https://github.com/ayasystems/pmaxd/blo ... /bin/pmaxd ??
ayasystems
Starting Member
Starting Member
 
Posts: 40
Joined: May 2014

Re: Powerlink serial pinout, linux daemon and web interface

Postby manno » Fri Sep 23, 2016 8:34 pm

ayasystems,

I'm waiting for my ch340 adapter to arrive. Once it gets here, I'll test it out and give an update.

Thanks!
manno
Starting Member
Starting Member
 
Posts: 16
Joined: September 2011

Re: Powerlink serial pinout, linux daemon and web interface

Postby manno » Tue Oct 04, 2016 7:55 pm

ayasystems,

I finally received my ch340 adapter and was able to successfully use a RPI to monitor the panel! However, everything is working correctly except that the disarm script sporadic in executing, sometimes it does, sometimes it doesn't (mostly does not). All other scripts seem to execute just fine, the only one that seems to not be working correctly is disarm.

Thanks again for the awesome work.
manno
Starting Member
Starting Member
 
Posts: 16
Joined: September 2011

Re: Powerlink serial pinout, linux daemon and web interface

Postby manno » Tue Oct 04, 2016 8:27 pm

I did just apply the new pmax_constant.h since I had an older version. So far, the disarm issue seems to have gone away and is working as expected! I'm still testing but it does seem to be working correctly now.

Thanks!
manno
Starting Member
Starting Member
 
Posts: 16
Joined: September 2011

Re: Powerlink serial pinout, linux daemon and web interface

Postby manno » Sat Oct 08, 2016 12:39 am

I've noticed something quite strange about the pmaxd daemon that could have contributed to why it was not able to execute the disarmed script...

(this testing is on a raspberry pi)

Every time I run /usr/local/bin/pmaxd (either by itself or via init), it seems to lose connection with the panel no matter what value the packet timeout is set to. So I'll start it up, arm it (which executes the armed script), maybe trip a sensor (which will execute the event script), then disarm (which will execute the disarm script). All seems ok so far.... Then I'll go to do that a second time and nothing happens. It will do nothing more (execute scripts) until I restart the pmaxd process (the daemon does not die, it's still running at this point). If I just start the pmaxd process and then wait 30mins to maybe an hour and then try to arm/disarm, it again does nothing. It seems to lose communication with the panel within about 30 mins no matter what. Memory leak or similar??

Here's the strange part:

If I run /usr/local/bin/pmaxd -fvvvvvvv (by itself or via init), it runs flawlessly. I now have it setup to run with the -fvvvvvvv via init (start-stop-daemon and piped to /dev/null) and has been running great for the last couple of days. It has not lost communication and has executed scripts perfectly over the last couple days. Still giving it some testing time to see if it will fail, but has not so far...

Any idea why that might be happening?
manno
Starting Member
Starting Member
 
Posts: 16
Joined: September 2011

Re: Powerlink serial pinout, linux daemon and web interface

Postby phoenixb » Thu Dec 08, 2016 3:48 pm

Hi,

I have follow the steps to made an connection to the powermax pro.
Only when I test the pmaxd manual with ./pmaxd -fvvvvv I see the info I was suspect

Code: Select all
 NOTICE: [Mon Dec  5 17:11:14 2016 initLog:0058]Logging initialized
 NOTICE: [Mon Dec  5 17:11:14 2016 initLog:0059]Verbose level: 6
 NOTICE: [Mon Dec  5 17:11:14 2016 main:0417]Program started by User 1000
 INFO: [Mon Dec  5 17:11:14 2016 main:0419]setting SID
 NOTICE: [Mon Dec  5 17:11:14 2016 main:0451]Starting......
 INFO: [Mon Dec  5 17:11:14 2016 initSerialPort:0071]there are 1 device in your config file
 INFO: [Mon Dec  5 17:11:14 2016 initSerialPort:0085]opening /dev/ttyUSB0
I have 3 zone:
 NOTICE: [Mon Dec  5 17:11:14 2016 PmaxInit:0165]zone: 0, name: Begane grond
 NOTICE: [Mon Dec  5 17:11:14 2016 PmaxInit:0165]zone: 1, name: 1e etage
 NOTICE: [Mon Dec  5 17:11:14 2016 PmaxInit:0165]zone: 2, name: Zolder
d NOTICE: [Mon Dec  5 17:11:21 2016 KeyPressHandling:0273]Disarm
a NOTICE: [Mon Dec  5 17:11:24 2016 KeyPressHandling:0277]Arming away
a NOTICE: [Mon Dec  5 17:11:25 2016 KeyPressHandling:0277]Arming away


Only the powermax doesn't response on the command's.
I have for test use the same USB-RS232 interface on Windows what normal works so the interface itself is ok any idea?
__________________
phoenixb
Member
Member
 
Posts: 498
Joined: July 2009
Location: Netherlands

Re: Powerlink serial pinout, linux daemon and web interface

Postby jelleeelco » Tue Jan 24, 2017 3:35 pm

First of all thanks to everybody here for making this work! My Powerlink just died and I stumbled upon this information. I got it all up and running, but somehow the program doesn't keep running.

ayasystems wrote:
manno wrote:It looks like I was able to get past the Seg Fault issue. It could have been something within the executed script that was causing this.


Could you test it -> https://github.com/ayasystems/pmaxd/blo ... /bin/pmaxd ??


That's exactly what I have. The moment a zone opens, the program stops with "segmentation fault". Could you please share what you have done? Also, how can I test the beta version of pmaxd without completely rebuilding everything?

Many thanks in advance,
Jelle
jelleeelco
Starting Member
Starting Member
 
Posts: 8
Joined: June 2011

Re: Powerlink serial pinout, linux daemon and web interface

Postby ayasystems » Tue Jan 24, 2017 5:50 pm

Are you ussing openwrt right?

Did you create the scripts at /etc/pmaxd folder?

-rwxr-xr-x 1 root root 253 Jun 18 2016 alarm
-rwxrwxr-x 1 root root 300 Nov 11 12:11 armedAway
-rwxrwxr-x 1 root root 314 Nov 11 12:12 armedHome
-rwxrwxr-x 1 root root 311 Nov 11 12:11 disarmed
-rw-r--r-- 1 root root 260 Jun 16 2016 pmaxd.conf
-rwxrwxr-x 1 root root 194 Aug 31 02:35 zoneActive
-rwxrwxr-x 1 root root 231 Jun 18 2016 zoneBatt
-rwxrwxr-x 1 root root 472 Aug 31 17:00 zoneClose
-rwxrwxr-x 1 root root 1.4K Aug 31 17:50 zoneEvent
-rwxrwxr-x 1 root root 469 Aug 31 17:00 zoneOpen

My device:


Router Name OpenWrt
Router Model TP-LINK TL-WR703N v1
Firmware Version OpenWrt Attitude Adjustment 12.09 / LuCI 0.11.1 Release (0.11.1)

Are you using the same Attitude version?

Regards!
ayasystems
Starting Member
Starting Member
 
Posts: 40
Joined: May 2014

Re: Powerlink serial pinout, linux daemon and web interface

Postby jelleeelco » Tue Jan 24, 2017 8:07 pm

Hi Ayasystems,

Thank you so much for such a quick reply!!

Hmm, could that be the issue! No i'm not using OpenWRT. I've got the usb-serial connected to a Raspberry pi, and (for now) use the alarm.html webpage.

Should I create the scripts? And do I then have to enable script in pmaxd.conf? One thing that was found out (not by me...) is that the pmaxd.conf had to be in folder /etc/pmaxd/ instead of /etc as per the instructions (on domoticz website). Other than pmaxd.conf there are no files.
jelleeelco
Starting Member
Starting Member
 
Posts: 8
Joined: June 2011

Re: Powerlink serial pinout, linux daemon and web interface

Postby ayasystems » Mon Feb 06, 2017 8:33 am

I will search the source code of my last modification in order that you can try to compile it.

The problem is that the source code is very oldest and is not compatible with the current compiler version.
ayasystems
Starting Member
Starting Member
 
Posts: 40
Joined: May 2014

Re: Powerlink serial pinout, linux daemon and web interface

Postby ayasystems » Mon Feb 06, 2017 1:41 pm

jelleeelco wrote:Hi Ayasystems,

Thank you so much for such a quick reply!!

Hmm, could that be the issue! No i'm not using OpenWRT. I've got the usb-serial connected to a Raspberry pi, and (for now) use the alarm.html webpage.

Should I create the scripts? And do I then have to enable script in pmaxd.conf? One thing that was found out (not by me...) is that the pmaxd.conf had to be in folder /etc/pmaxd/ instead of /etc as per the instructions (on domoticz website). Other than pmaxd.conf there are no files.


Hi Jelleeelco

Did you try with my git version or original?

Try it please -> https://github.com/ayasystems/pmaxd
ayasystems
Starting Member
Starting Member
 
Posts: 40
Joined: May 2014

Re: Powerlink serial pinout, linux daemon and web interface

Postby jelleeelco » Mon Feb 06, 2017 9:46 pm

Hi Ayasystems,

I got the code from https://github.com/viknet365/pmaxd.git. I had to adjust the make file based on your input to make it work for Raspberry PI.
I followed the instructions on https://www.domoticz.com/forum/viewtopi ... 38&t=11134 and it all works perfectly, but as soon as a door is opened the pmaxd programs stops with the above mentioned error.

I just deleted the pmaxd folder and used your code...guess what, it works!!! Many many thanks for this! Now when I open a door, the system just reports the 'Zone open'.

When running the program in ssh I do see it wants to execute a script, being "ZoneEvent". However I can't find that script. What is it supposed to be and what it is supposed to do?

Again...many, many thanks.
Jelle
jelleeelco
Starting Member
Starting Member
 
Posts: 8
Joined: June 2011

Re: Powerlink serial pinout, linux daemon and web interface

Postby ayasystems » Fri Feb 10, 2017 7:07 pm

jelleeelco wrote:Hi Ayasystems,

I got the code from https://github.com/viknet365/pmaxd.git. I had to adjust the make file based on your input to make it work for Raspberry PI.
I followed the instructions on https://www.domoticz.com/forum/viewtopi ... 38&t=11134 and it all works perfectly, but as soon as a door is opened the pmaxd programs stops with the above mentioned error.

I just deleted the pmaxd folder and used your code...guess what, it works!!! Many many thanks for this! Now when I open a door, the system just reports the 'Zone open'.

When running the program in ssh I do see it wants to execute a script, being "ZoneEvent". However I can't find that script. What is it supposed to be and what it is supposed to do?

Again...many, many thanks.
Jelle


I have updated README
https://github.com/ayasystems/pmaxd/blo ... E.md#binsh


regards
ayasystems
Starting Member
Starting Member
 
Posts: 40
Joined: May 2014

PreviousNext

Return to Visonic Alarm systems

Who is online

Users browsing this forum: No registered users and 1 guest