Step by step guide: Visonic Powermax Pro integration

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

Holland
Posts: 179
Joined: Friday 12 July 2013 13:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta Ch
Location: The Netherlands
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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?
BornToKill
Posts: 15
Joined: Sunday 18 September 2016 9:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by BornToKill »

Yes recompilation doesn’t make it works :/
Holland
Posts: 179
Joined: Friday 12 July 2013 13:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta Ch
Location: The Netherlands
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by Holland »

Anyone already contacted ayasystems ?

Otherwise I could do that
fridde
Posts: 3
Joined: Thursday 18 January 2018 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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
fridde
Posts: 3
Joined: Thursday 18 January 2018 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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
ejcosta
Posts: 1
Joined: Wednesday 07 March 2018 15:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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?
slagterbas
Posts: 10
Joined: Wednesday 27 December 2017 15:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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?
Bobbie
Posts: 4
Joined: Friday 26 August 2016 15:03
Target OS: Linux
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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
jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco »

Not sure if you can switch the X10 devices...

How did you install xPLLib? I get the message : Forbidden...
Ivo1986
Posts: 16
Joined: Tuesday 07 January 2020 10:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Urmond - Netherlands
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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)
swedishcook
Posts: 3
Joined: Saturday 02 May 2020 18:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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
swedishcook
Posts: 3
Joined: Saturday 02 May 2020 18:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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.
Last edited by swedishcook on Saturday 02 May 2020 21:49, edited 1 time in total.
BornToKill
Posts: 15
Joined: Sunday 18 September 2016 9:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by BornToKill »

Dear,

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

Is great!
swedishcook
Posts: 3
Joined: Saturday 02 May 2020 18:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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 ?
BornToKill
Posts: 15
Joined: Sunday 18 September 2016 9:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by BornToKill »

Check the wiki.
No difference (I have 2 windows and 4 motions)
I stop pmaxd process and that it. So same connections.
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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!
rtozer
Posts: 2
Joined: Saturday 20 June 2020 15:24
Target OS: -
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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... :)
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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
rtozer
Posts: 2
Joined: Saturday 20 June 2020 15:24
Target OS: -
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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!
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest