Page 5 of 6

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Monday 13 November 2017 22:03
by Holland
@BornToKill

Well done. Wouldn't have found the solution myself. Strange that it is related to a new firmware version.

This is temp solution, but Pmaxd should be able to run also on kernel 4.9

Have you, or anyone else already compiled Pmaxd on kernel 4.9? Does that make a difference?

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Tuesday 14 November 2017 9:04
by BornToKill
Yes recompilation doesn’t make it works :/

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Wednesday 15 November 2017 9:56
by Holland
Anyone already contacted ayasystems ?

Otherwise I could do that

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 03 February 2018 9:45
by fridde
Hi,

I'm trying this installation now, but I'm stuck right in the beginning.
This web page seems to be down.
Anyone have the file needed somewhere else online?
Holland wrote: Saturday 19 March 2016 15:35

Code: Select all

$ wget http://www.xpl4java.org/xPL4Linux/downloads/xPLLib.tgz

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Tuesday 13 February 2018 8:43
by fridde
Got it to work. The files I needed was available on GitHub.

Code: Select all

https://github.com/Tieske/xPL4Linux
If you want "door open" statuses to work, you should use

Code: Select all

https://github.com/ayasystems/pmaxd.git
instead of

Code: Select all

https://github.com/viknet365/pmaxd.git

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Thursday 08 March 2018 15:54
by ejcosta
Hi,
Probably an extreme dumb question, apologize if it's the case, but why we cannot use the serial port available on raspberry to communicate directly with powermax?

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Thursday 07 March 2019 16:33
by slagterbas
Has anyone done this recently? I have a PowerMax Express that I want to connect to Domoticz on my Pi.
Before I start with all this, I want to check if everything still applies? Maybe there are simpler options in the meantime?

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Tuesday 08 October 2019 13:23
by Bobbie
Thanks all,
It works..I can control my Visonic alarm panel to Arm,Home and disarm.

How can I switch the x10 switches connected to my Visonic alarm system?.
Thx

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Friday 18 October 2019 14:01
by jelleeelco
Not sure if you can switch the X10 devices...

How did you install xPLLib? I get the message : Forbidden...

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Friday 28 February 2020 16:02
by Ivo1986
Hi, I want to connect my Visonic sensors to Domoticz (on a Pi3b)
I've got the RFLink 868.3/ Arduino/

But the sensors als on 868,9 Mhz :(
And they are supported in RFLink but how!

(http://www.rflink.nl/blog2/devlist 868 devices)

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 02 May 2020 18:33
by swedishcook
Looks like its a few years since anyone tried this setup, wondering if anyone has seen the same issue as me. I wired up, checked with USB to serial in my Windows PC - works nicely. When I get to testing pmaxd I don't get anything back from the panel, unless I power off and on the panel (I read that this should autoenrol PowerLink if there is one connected to the RS232) and at this point I get some data from the panel but bad checksums.

Tried a few hours to get this going with same result, so I thought, well it works in the PC, not on the Pi, maybe its the baud rate thats wrong, I used "stty -F /dev/ttyUSB0 9600 cs8" to set the serial params, checked they were set with "stty -F /dev/ttyUSB0 -a" and reran pmaxd "./pmaxd -fvvvvvvvv", didn't work, but I did notice that the serial port settings were now wrong and the port was showing as set to cs5 not cs8.

Just tried running "./pmaxd -fvvvvvvvv" and while its running issue "stty -F /dev/ttyUSB0 9600 cs8" in another terminal - IT WORKS all of a sudden, so it seems my problem with pmaxd is possibly quite minor, for some reason it is setting the port to the wrong settings (a quick scan of the source suggests it is trying to set cs8).

Has anyone seen this behaviour and fixed it ?

P.S. I tried both versions of pmaxd - https://github.com/ayasystems/pmaxd.git and https://github.com/viknet365/pmaxd.git

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 02 May 2020 21:35
by swedishcook
So, it looks like its a problem in the way the serial line settings are set in pmaxd.c, there is a bitmask which is used to set comms options, I'm guessing that at some point the meaning of these bits changed on the raspberry pi and it has highlighted a lurking issue in the code. Will advise author.

In pmaxd you will find two lines :
options.c_cflag |= (CLOCAL | CREAD | CS8 );
options.c_cflag &= ~(PARENB | CSTOPB | CSIZE);


Looking at the values for these constants in /usr/include/asm-generic/termbits.h
CS8 0000060
CLOCAL 0004000
CREAD 0000200
Or'ed together = 0004260

options.c_cflag &= ~(PARENB | CSTOPB | CSIZE);
PARENB 0000400
CSTOPB 0000100
CSIZE 0000060
Or'ed together= 0000560
Negated = FFFFA9F

So the bitwise AND of the second line is ANDing the 6 (sixth digit) with the 9 giving 0 ... which resets the two bits that are used for the character set leaving you with CS5 (which is defined as 0000000 in the include file).

Solution - edit pmaxd.c and swap these two lines over.


Now pmaxd test seems to be working, moving on to the next stage. MANY thanks for the work people have done here, much appreciated !!

P.S. I'm using Pi 3 model B, latest verison of Raspian Buster as of todays date.

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 02 May 2020 21:45
by BornToKill
Dear,

Last week I move to HomeAssistant (bored about the low activity of Domoticz).
https://github.com/davesmeghead/visonic

Is great!

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 02 May 2020 21:53
by swedishcook
Thanks for the steer, any difference in functionality (I'm new to both, I just want to web enable the alarm) ?

And is there a tutorial on how to configure ?

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 02 May 2020 22:40
by BornToKill
Check the wiki.
No difference (I have 2 windows and 4 motions)
I stop pmaxd process and that it. So same connections.

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Sunday 14 June 2020 13:57
by ayasystems
I have create an ESP8266 program to control Powermax Alarm with MQTT over Wifi....

If anyone wants test it -> https://github.com/ayasystems/PowerMaxEsp8266

Best regards!

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 20 June 2020 16:22
by rtozer
@ayasystems
Excellent timing!
I've been trying to piece together something like this for the last couple of days, and just found your project this morning.

I flashed the v2 4MB release you provided a couple of days ago (despite using an ESP-01S 1MB, not a 4MB device), and it fired up fine and provided the AP for configuration. It then connected to my network, powermax complete and mqtt server and published stat and flags. But according to the logs it can't mount the fs to save settings, so it only works until a reboot. I assume this is because the mem location for the fs is dependent on the flash size and I'm using the wrong size.

So I cloned your project and tried to build it myself. I haven't used Arduino IDE before but I found the ESP boards and built and exported for generic esp8266. It appears to have worked - I don't see any errors and a bin file is produced. I flashed it to the esp and I can see the AP come up but if I join the network I don't get the prompt to login (on my phone) and there is no config page at 192.168.4.1 so I guess I'm missing some steps.

Could you provide steps to build in the readme for us newbies? Or provide a 1MB release?

Thanks for making this project available!

Edit: read up on spiffs/littlefs and tried the various partitioning options but didn't appear to make any difference; what am I missing?

Edit 2: Got it working. Just had no idea what I was doing with Arduino IDE, helps to read some getting started tutorials... :)

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Monday 22 June 2020 18:31
by ayasystems
Did you compile the software or are you using the realease version? release version was compiled to use with 4MB maybe it is the problem...

I will publish a 1MB release!

Check it and let me know please

https://github.com/ayasystems/PowerMaxEsp8266/releases

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Monday 22 June 2020 18:35
by rtozer
I managed to build it myself for 1MB. Config is saved. Alarm events are reported but zone names are missing and it will arm but not disarm at the moment. But I suspect this is a problem with the alarm panel not the esp code. I'll post an update when I've figured it all out.

Edit: Quick update. I ran diagnostics on the sensors one at a time and they changed from 'Not-OK' to 'Strong', rebooted the ESP and now all the zone information is populated. Arming and disarming work, events are coming in fully populated. It's doing everything I need. Thank you very much!

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Wednesday 24 June 2020 12:20
by ayasystems
Thanks for your feedback.

I'm working on Update esp code over web page now.
I will publish it asap.

You are welcome