Page 2 of 6

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Tuesday 10 May 2016 13:19
by opaulzen
Tnx for the guide, been looking for integrating the visonic Powermax into Domoticz for a longer time. I've recieved a rfxcom trx868 already for my sensors, but alarm status is something i still miss.

I have a few questions though:

1. I run Domoticz on my Synology nas. Is it possible to use a RPI to connect to the Powermax and run pmaxd, and connect to it trough IP from the synology domoticz? I guess i should just edit the lua script? (local visonic=assert(io.popen('curl http://ip/cgi-bin/jsongetxplstate.cgi'))) where IP is the raspberry?

2. One step further: Would it be possible to run pmaxd on synology, so i wouldnt need the RPI anymore?

3. How long can an usb cable be before having connections issues with the usb to rs232 adapter? It would be nice if i would't have to install the rpi next to the alarm panel, since it is in the middle of my hallway.

Regards,

Oliver

Step by step guide: Visonic Powermax Pro integration

Posted: Tuesday 10 May 2016 13:23
by Flopp
opaulzen wrote:Tnx for the guide, been looking for integrating the visonic Powermax into Domoticz for a longer time. I've recieved a rfxcom trx868 already for my sensors, but alarm status is something i still miss.

I have a few questions though:

1. I run Domoticz on my Synology nas. Is it possible to use a RPI to connect to the Powermax and run pmaxd, and connect to it trough IP from the synology domoticz? I guess i should just edit the lua script? (local visonic=assert(io.popen('curl http://ip/cgi-bin/jsongetxplstate.cgi'))) where IP is the raspberry?

2. One step further: Would it be possible to run pmaxd on synology, so i wouldnt need the RPI anymore?

3. How long can an usb cable be before having connections issues with the usb to rs232 adapter? It would be nice if i would't have to install the rpi next to the alarm panel, since it is in the middle of my hallway.

Regards,

Oliver
1. Yes, just change IP to your actual ip of RPi. I am running two RPi where one is next to Visonic

3. USB can be 10 meters same for RS232.
You can have 10 meters to USB converter then have 10 meter from USB converter to Visonic, totally 20 meters. Try it before you make it as a permanent installation.

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Tuesday 10 May 2016 22:37
by opaulzen
Ok tnx, one more thing, maybe a stupid question,bit I'm not used to creating these kind of tweaks :-). What Cables should i use for connecting the visonic to the module? Where can i get these single pin Cables?

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Tuesday 10 May 2016 22:49
by Flopp
opaulzen wrote:Ok tnx, one more thing, maybe a stupid question,bit I'm not used to creating these kind of tweaks :-). What Cables should i use for connecting the visonic to the module? Where can i get these single pin Cables?
You can use any cable that fits to the pin, but I think almost everyone is using cables with dupont connection.
https://www.ebay.com/itm/221464799105

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Tuesday 10 May 2016 22:54
by Holland
Hi opaulzen,

About your question if can install pmaxd on your Synology. You probably can, but my advice is to refrain from installing anything on your NAS that's not from Synology. Personally I wouldn't want to risk making my NAS unstable, brick or anything in that direction.

The cables are called jumper cables. Have a look over herehttps://www.kiwi-electronics.nl/compone ... afe-female

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Wednesday 11 May 2016 9:59
by opaulzen
Already foundation the Cables, tnxs. Will start as door as i get them.

Just one more thing: how does this solution affect my powermax system? What happens if my rpi crashes? I've read about other solutions where the powerlink2 module is emulated (Vera/Domotica used this serial connection). With these setups it seems that the powermax complains if there is something wrong with that connection, since it sees a module error.

As I understand the solution described in this guide uses a different port, and won't affect the powermax itself if the rpi fails (besides from domoticz not being able to communicate with it). Is this assumption correct?

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Thursday 12 May 2016 10:57
by Holland
The alarm system is not effected in any way. As far as I know, the powermax is not even aware, that something is connected. It is also not required to include the Pi as is required with the powerlink

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 14 May 2016 18:00
by frezzie
I'm about start working on integrating my Powermax Plus with Domiticz, I've got the hardware (USR-TCP232 Serial to ethernet) to communicate with the Powermax. I'm running Domoticz from an Ubuntu 14.04 LTS, some of the comments in this thread is related to Rpi. Will I ru into some difficulties trying this on an Ubuntu server? I don't have any programming skills but can run CLI and understand some of the basics of Linux.
My goal is to integrate the alarm panel in Domoticz if possible.

If you have any good ideas to share when it comes to running this on Ubuntu, please share them here..

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 14 May 2016 18:25
by booster
I'd like to try to connect my powermax plus to domoticz, but I see that mt powermax serial connector consists of 2x6 pins...already fried my 1st ch340 :oops:
who knows the pin layout and what pins to use before I try again? Is there some (foolproof) way for me to check/find out?

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Saturday 14 May 2016 20:55
by Flopp
Today I changed my IP range in my router.

After this change my RPi with Visonic integration started to get crazy.
Sometimes it doesn't respond at all and 9 out of 10 tries(jsongetxplstate.cgi) it doesn't give me status(disarm/armed) and the webpage Alarm.html is not showing correct data.

Anyone that can give me a hint or you seen this before?

I have restarted RPi many times without success.

When I try ./pmaxd -fvvvvvvvv it is extremly slow, take ~20 minutes to list my devices(11) 2 days ago it took ~1 minute to list them.

Step by step guide: Visonic Powermax Pro integration

Posted: Sunday 15 May 2016 22:14
by Flopp
Now it seems to be OK again.
I change timeout from 2000 to 3000 in conf file, after change I tried webpage and CGI but same bad result. I left it to be 3000 and now it is OK. Maybe I stressed it or something.
Webpage and CGI is answering correct every time now.

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Sunday 15 May 2016 23:16
by Holland
@Booster. Best to have a look on domoticaforum.eu, and hopefully they have an example with your config.

No foolproof ( :) ) method, you need the correct pins.

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Sunday 22 May 2016 0:42
by Flopp
Flopp wrote:Now it seems to be OK again.
I change timeout from 2000 to 3000 in conf file, after change I tried webpage and CGI but same bad result. I left it to be 3000 and now it is OK. Maybe I stressed it or something.
Webpage and CGI is answering correct every time now.
I was wrong CGI sometimes give bad answer. I done have any clue what is wrong.
Think I will reinstall RPi from scratch

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Sunday 29 May 2016 16:39
by opaulzen
After editing Makefile (and tabbing al the spaces) and using the make command I keep getting te following error:

gcc -I /FLU -fsigned-char -c pmaxd.c
pmaxd.c:16:24: fatal error: libconfig.h: No such file or directory
#include <libconfig.h>
^
compilation terminated.
Makefile:16: recipe for target 'pmaxd.o' failed
make: *** [pmaxd.o] Error 1


any ideas?

Step by step guide: Visonic Powermax Pro integration

Posted: Sunday 29 May 2016 16:41
by Flopp
It says that It doesn't find libconfig.h

Run this and try again, I had to do the same

sudo apt-get install libconfig-dev

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Sunday 29 May 2016 21:44
by Holland
Thanks Flopp. Indeed the libconfig-dev needs to be installed. I will adjust the guide to reflect this

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Monday 30 May 2016 10:43
by CaryDubois
Hello everyone...i am new to this forum. I used a module with a ch340 chip, since I could not make it work with 2303 chip. .The Powermax Pro has a port (2x5) labeled PC, see pictures below. This is the port to use, since it’s voltage is 3,3v and that is the voltage that usb-serial port can handle. Don’t use the dual serial port which is an optional component of the Powermax pro series. The serial port has a voltage of 12v, connecting the serial usb module to this port will fry the module immediately.

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Thursday 02 June 2016 19:23
by opaulzen
ok,

libconfig is ok now :)

I seem to have an issue with the cabling, cant arm or disarm with visonic driver.
Triple checked but not really sure what is going on. The device gets connected and it sees all the zones, but i cannot disarm or arm.
Thought it was a driver issue on windows10 with the ch340, but apperently not.

After I run pmaxd i get these errors:

DEBUG: [Thu Jun 2 19:17:59 2016 main:0453]Sarting main loop....
DEBUG: [Thu Jun 2 19:17:59 2016 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
DEBUG: [Thu Jun 2 19:17:59 2016 calculChecksum:0164]checksum: 00FE
ERR: [Thu Jun 2 19:17:59 2016 deFormatBuffer:0200]checksum NOK calculated:00FE in packet:0000
ERR: [Thu Jun 2 19:17:59 2016 packetManager:0356]Packet not correctly formated

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Thursday 02 June 2016 22:08
by Holland
Hi opaulzen,

Must be a cabling issue, and that makes it complicated. Please recheck the domoticaforum.eu , there is a lot of info over there related to this issue.

This guide only works for the Powermax Pro. If you have different type of Visonic alarm, then the port layout and labeling is different. In that case domoticaforum.eu can help you.

Re: Step by step guide: Visonic Powermax Pro integration

Posted: Monday 20 June 2016 19:27
by daan256
Hi,

First of all... thanks for all your work and effort you put into this.

I have run into a couple of issues i can't seem to resolve. I am not a programmer but with Google as my friend I usually get further but now this is not the case.

Please know i can successfully execute all commands (arm/disarm) via the alarm.html website.

1) I have the following error:
016-06-20 19:19:01.665 Error: EventSystem: in script_device_etc.lua: /home/pi/domoticz/scripts/lua/JSON.lua:383: html passed to JSON:decode():

2) Whatever i try to do i can't get xPL_Hub to run after a reboot. I tried all the steps but when use "Top" it's not shown. pmaxd is shown.

3) When in Domoticz pressing the ARM or DISARM button nothing happens and there is no log entry.

Can you help me?