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.
Flopp
Posts: 354
Joined: Sunday 03 January 2016 15:55
Target OS: -
Domoticz version:
Location: Sweden
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by Flopp » Monday 20 June 2016 20:12

daan256 wrote: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?
What version of Domoticz do you run?
Where do you run Domoticz?

can you upload your script_device_etc.lua here

daan256
Posts: 12
Joined: Sunday 01 March 2015 14:49
Target OS: -
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by daan256 » Monday 20 June 2016 21:50

1) I run V3.4834

2) On a Raspberry Pi 3.. i used a the IMG file from Domotics especially for Raspberry

3) See below the contents of the script :

json = (loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")()

local visonic=assert(io.popen('curl http://192.168.1.34/cgi-bin/jsongetxplstate.cgi'))
local status = visonic:read('*all')
visonic:close()
local jsonStatus = json:decode(status)

local visonic_woonkamer = 'Visonic Alarm Status'

--print("Eerste JSON stappen met LUA")
print(status)

powermaxstatus = jsonStatus['pmaxstatus']

commandArray = {}

print(powermaxstatus)


if (powermaxstatus == "disarmed" or powermaxstatus == "armed" or powermaxstatus == "armed-home" or powermaxstatus == "armed-away") then
if powermaxstatus == "disarmed" then
print('<font color="blue">Visonic: Het alarm staat uit</font>')
commandArray[visonic_woonkamer]='Off'
if (uservariables["VisonicStatus"] == "ARMED") then
commandArray['Variable:VisonicStatus']='DISARMED'
print("Uservar VisonicStatus updated to DISARMED")
end
end
if (powermaxstatus == "armed" or powermaxstatus == "armed-home"or powermaxstatus == "armed-away") then
print('<font color="red">Visonic: Het alarm is ingeschakeld!</font>')
commandArray[visonic_woonkamer]='On'
if (uservariables["VisonicStatus"] == "DISARMED") then
commandArray['Variable:VisonicStatus']='ARMED'
print("Uservar VisonicStatus updated to ARMED")
end
end
end

return commandArray

daan256
Posts: 12
Joined: Sunday 01 March 2015 14:49
Target OS: -
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by daan256 » Tuesday 21 June 2016 22:46

Tried another time and succeeded partially.
I now have everything working except the part with the Arm, disarm selector button of the dummy switch which has to be created
I linked the buttons to the *.sh scripts which where required but nothing happens.
I manually started xplhub to see if this made a change.
Any tips/tricks?

daan256
Posts: 12
Joined: Sunday 01 March 2015 14:49
Target OS: -
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by daan256 » Tuesday 21 June 2016 23:01

Cool... one step further again. Found out that the Arm, Disarm, and Arm home scripts where not working so had to make them executable.
if i now run them as root they work... but when pressing the buttons in domoticz nothing happens.
Any ideas?

Flopp
Posts: 354
Joined: Sunday 03 January 2016 15:55
Target OS: -
Domoticz version:
Location: Sweden
Contact:

Step by step guide: Visonic Powermax Pro integration

Post by Flopp » Tuesday 21 June 2016 23:02

Great work

It should be written on Domoticz and how to use LUA. Google it.

Something with "chmod 777 filename"

Flopp
Posts: 354
Joined: Sunday 03 January 2016 15:55
Target OS: -
Domoticz version:
Location: Sweden
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by Flopp » Tuesday 21 June 2016 23:05


daan256
Posts: 12
Joined: Sunday 01 March 2015 14:49
Target OS: -
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by daan256 » Wednesday 22 June 2016 0:38

thanks for the hint!
In the button i had to identify the script. I used two slashes instead of 3.

so

script:// instead of script:///

the rights action did not change anything. So to make the SH files executable for domoticz the following suffices for me
sudo chmod +x yourscript.sh

it now works fine.

Still some notes on the issues i had.
1) everything is working fine even while "top" is not mentioning that xPL Hub is running but still my arming buttons in domoticz are now working. I think that if you get the alarm.html working after a reboot your safe to say that the xPL Hub is running in the background somewhere even while "Top" is telling you otherwhise.

2) The path as mentioned in the arm, disarm*.sh scripts contained a different path to xPLsend
as mentioned in the manual which for me did not work: for example the arm-home script
/home/pi/xPL/xPLSend -c security.basic command=arm-home

what did work was the following path

/home/pi/xPLLib/examples/xPLSend -c security.basic command=arm-home

Still a cool journey to execute! Great stuff... thanks for the ride :-)

BornToKill
Posts: 12
Joined: Sunday 18 September 2016 9:41
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by BornToKill » Sunday 18 September 2016 13:22

Hi !

First of all I would like to congratulate Holland, Viknet, ayasystems and all others contributors for this great DIY Powerlink :)
I need your help because I receive :

Code: Select all

root@raspberrypi:~/pmaxd# ./pmaxd -fvvvvvvvv
(null):0 - file I/O error
Before requesting your help, I want you to know that :
1/ My FTDI -> PowerMaxPro connection is OK on Windows : VisonicDriver.exe works as expected.

2/ My FTDI is working on raspian :

Code: Select all

[    6.109952] usbserial: USB Serial support registered for generic
[    6.143892] usbcore: registered new interface driver ftdi_sio
[    6.144127] usbserial: USB Serial support registered for FTDI USB Serial Device
[    6.145075] usbcore: registered new interface driver brcmfmac
[    6.145802] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[    6.146055] usb 1-1.2: Detected FT232RL
[    6.159443] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
3/ When connecting (loopback) RX to TX i'm able to read what i'm typing on keyboard with :

Code: Select all

screen /dev/ttyUSB0 9600
4/ I'm able to compile with ayasystems Makefile. Here is the output :

Code: Select all

root@raspberrypi:~/pmaxd# make
gcc -I /FLU   -fsigned-char -c pmaxd.c
pmaxd.c:302:6: warning: conflicting types for 'serialHandler'
 void serialHandler() {
      ^
In file included from pmaxd.c:23:0:
pmaxd-xpl.c:44:7: note: previous implicit declaration of 'serialHandler' was here
       serialHandler();
       ^
pmaxd.c:338:6: warning: conflicting types for 'packetManager'
 void packetManager(struct PlinkBuffer  * commandBuffer) {
      ^
pmaxd.c:330:9: note: previous implicit declaration of 'packetManager' was here
         packetManager(&commandBuffer);
         ^
gcc -fsigned-char pmaxd.o -o pmaxd -lxPL -lconfig
gcc -I /FLU   -fsigned-char -c xplsendjson.c
gcc -fsigned-char xplsendjson.o -o xplsendjson.cgi -lxPL
gcc -I /FLU   -fsigned-char -c jsongetxplstate.c
gcc -fsigned-char jsongetxplstate.o -o jsongetxplstate.cgi -lxPL
gcc -I /FLU   -fsigned-char -c testpmaxd.c
gcc -fsigned-char testpmaxd.o -o testpmaxd -lxPL -lconfig
5/ my /etc/pmaxd.conf file exists (with good password):

Code: Select all

root@raspberrypi:~/pmaxd# cat /etc/pmaxd.conf 
  # authenticator
    usercode=0x1111;
    device = ["/dev/ttyUSB0"]; // Use more than 2
    zonename = ["R.D.C.", "Etage", "Salon", "Salle a manger", "cuisine", "porte garage", "volet garage", "detecteur incendie"]; // Use more than 2
    restartscript = "/etc/restart.sh";
    packet_timeout = 2000;
    execute_scripts=0;//1 to enable
6/ xPL_Hub is running :

Code: Select all

root@raspberrypi:~/pmaxd# ps aux | grep -i xpl
root       621  0.0  0.0   2216    88 ?        S    08:57   0:00 /usr/local/bin/./xPL_Hub
root       622  0.0  0.1   2460  1444 ?        S    08:57   0:01 /usr/local/bin/./xPL_Hub
root     29332  0.0  0.1   4860  1860 pts/0    S+   13:23   0:00 grep -i xpl
I will appreciate your help.
Thank you.

BornToKill
Posts: 12
Joined: Sunday 18 September 2016 9:41
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by BornToKill » Sunday 18 September 2016 13:32

Found !
pmaxd.conf must be locate here /etc/pmaxd/pmaxd.conf (and not /etc/pmaxd.conf)
I found this with strace :)

Code: Select all

strace ./pmaxd

...
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2840) = 2840
lseek(3, 1236500, SEEK_SET)             = 1236500
read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\23\1\24"..., 47) = 47
fstat64(3, {st_mode=S_IFREG|0755, st_size=1242776, ...}) = 0
mmap2(NULL, 1312152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x76dc1000
mprotect(0x76eec000, 65536, PROT_NONE)  = 0
mmap2(0x76efc000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12b000) = 0x76efc000
mmap2(0x76eff000, 9624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x76eff000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f85000
set_tls(0x76f854c0, 0x76f85ba8, 0x76f8a050, 0x76f854c0, 0x76f8a050) = 0
mprotect(0x76efc000, 8192, PROT_READ)   = 0
mprotect(0x76f45000, 20480, PROT_READ|PROT_WRITE) = 0
mprotect(0x76f45000, 20480, PROT_READ|PROT_EXEC) = 0
cacheflush(0x76f45000, 0x76f4a000, 0, 0x15, 0x7ef94890) = 0
mprotect(0x76f89000, 4096, PROT_READ)   = 0
munmap(0x76f32000, 73990)               = 0
brk(0)                                  = 0xa11000
brk(0xa32000)                           = 0xa32000
open("/etc/pmaxd/pmaxd.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "(null):0 - file I/O error\n", 26(null):0 - file I/O error
) = 26
exit_group(1)                           = ?
+++ exited with 1 +++

Hope it will help.

User avatar
phoenixblue
Posts: 77
Joined: Friday 25 November 2016 12:20
Target OS: Raspberry Pi
Domoticz version: 3.7392
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by phoenixblue » Monday 05 December 2016 18:14

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?
scripts on github: Link

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Wednesday 04 January 2017 16:33

Hi,

I have a domoticz setup on my Raspberry Pi, using Jessie. I have followed the instructions but I get stuck in two places.
First, it seems that rc.local doesn't run. I added the sentence before ' Exit 0 ' but it doesn't show up in TOP.

When I run the script manually (by typing " /usr/local/bin/./xPL_Hub & " it does run and in TOP the xPL_Hub will show for a few seconds.

Second problem, when replace the Makefile with the content in the guide, and type make, it gives me the following error:

" Makefile:8: *** missing operator (did you mean TAB instead of 8 spaces?). Stop. "

Anyone a clue? Help is much appreciated!

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Thursday 05 January 2017 15:11

Ok that was stupid from me. I read the whole forum with a little bit more attention, and found the answers already to my problems.

I'm up to the point in the guide where you test the link using "./pmaxd -fvvvvvvvv". It starts running, but it basically hangs on "Sarting main loop...".

Also, I could NOT arm/disarm via ./pmaxd. Also, the website ' Alarm.html' comes up, but pressing the buttons doesn't do anything.

As far as i can tell the system is correctly configured, but somehow it doesn't seem to communicate with the Powermax Pro. The cabeling should be correct, with Windows I can arm/disarm using the mentioned tool.

Anyone a clue were I can start looking?
Thanks
Jelle

BornToKill
Posts: 12
Joined: Sunday 18 September 2016 9:41
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by BornToKill » Thursday 05 January 2017 15:16

hi,

xPL is running ?

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Thursday 05 January 2017 15:22

Ok I'm a step further. When I run "./pmaxd -fvvvvvvvv" it will just run forever, with the following output:

Code: Select all

 NOTICE: [Thu Jan  5 13:18:47 2017 initLog:0058]Logging initialized
 NOTICE: [Thu Jan  5 13:18:47 2017 initLog:0059]Verbose level: 8
 NOTICE: [Thu Jan  5 13:18:47 2017 main:0417]Program started by User 1000
 INFO: [Thu Jan  5 13:18:47 2017 main:0419]setting SID
 NOTICE: [Thu Jan  5 13:18:47 2017 main:0451]Starting......
 INFO: [Thu Jan  5 13:18:47 2017 initSerialPort:0071]there are 2 device in your config file
 INFO: [Thu Jan  5 13:18:47 2017 initSerialPort:0085]opening /dev/ttyUSB1
I have 6 zone:
 NOTICE: [Thu Jan  5 13:18:47 2017 PmaxInit:0165]zone: 0, name: Voordeur
 NOTICE: [Thu Jan  5 13:18:47 2017 PmaxInit:0165]zone: 1, name: Overloop
 NOTICE: [Thu Jan  5 13:18:47 2017 PmaxInit:0165]zone: 2, name: Achterdeur
 NOTICE: [Thu Jan  5 13:18:47 2017 PmaxInit:0165]zone: 3, name: Woonkamer
 NOTICE: [Thu Jan  5 13:18:47 2017 PmaxInit:0165]zone: 4, name: Eetkamer
 NOTICE: [Thu Jan  5 13:18:47 2017 PmaxInit:0165]zone: 5, name: Woonkamer
 DEBUG: [Thu Jan  5 13:18:47 2017 sendBuffer:0174]Sending the following buffer to serial TTY
 DEBUG: [Thu Jan  5 13:18:47 2017 logBuffer:0157]BufferSize: 12
 DEBUG: [Thu Jan  5 13:18:47 2017 logBuffer:0158]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Thu Jan  5 13:18:47 2017 calculChecksum:0167]checksum: 001A
 DEBUG: [Thu Jan  5 13:18:47 2017 sendBuffer:0183]result of serial write:: 15
 DEBUG: [Thu Jan  5 13:18:47 2017 sendBuffer:0174]Sending the following buffer to serial TTY
 DEBUG: [Thu Jan  5 13:18:47 2017 logBuffer:0157]BufferSize: 12
 DEBUG: [Thu Jan  5 13:18:47 2017 logBuffer:0158]Buffer: AB 06 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Thu Jan  5 13:18:47 2017 calculChecksum:0167]checksum: 000B
 DEBUG: [Thu Jan  5 13:18:47 2017 sendBuffer:0183]result of serial write:: 15
 DEBUG: [Thu Jan  5 13:18:47 2017 main:0456]Sarting main loop....
So while this is running, I go to my windows PC and enter the alarm.html in the browser. It comes up, when I push a button the following code appears:

Code: Select all

 DEBUG: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0015]Received a pmaxd Message from viknet-webgateway.default of type 1 for security.basic

 DEBUG: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0016]xpl message received: xpl-cmnd
{
hop=1
source=viknet-webgateway.default
target=*
}
security.basic
{
command=arm-away
}

 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0017]command: arm-away
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0021]arming away.........
 DEBUG: [Thu Jan  5 13:15:22 2017 sendBuffer:0174]Sending the following buffer to serial TTY
 DEBUG: [Thu Jan  5 13:15:22 2017 logBuffer:0157]BufferSize: 12
 DEBUG: [Thu Jan  5 13:15:22 2017 logBuffer:0158]Buffer: A1 00 00 05 64 12 00 00 00 00 00 43
 DEBUG: [Thu Jan  5 13:15:22 2017 calculChecksum:0167]checksum: 009F
 DEBUG: [Thu Jan  5 13:15:22 2017 sendBuffer:0183]result of serial write:: 15
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0033]not a security basic
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0197]end message handling
 DEBUG: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0015]Received a pmaxd Message from viknet-webgateway.default of type 1 for security.request

 DEBUG: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0016]xpl message received: xpl-cmnd
{
hop=1
source=viknet-webgateway.default
target=*
}
security.request
{
request=zonelist
}

 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0017]command: (null)
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0033]not a security basic
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0035]a security request
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0103]requesting zonelist.....
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0120]zonelist:
 DEBUG: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0122]xpl message sent: xpl-stat
{
hop=1
source=visonic-powermaxplus.default
target=*
}
security.zonelist
{
zone-list=
}

 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0197]end message handling
 DEBUG: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0015]Received a pmaxd Message from viknet-webgateway.default of type 1 for security.request

 DEBUG: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0016]xpl message received: xpl-cmnd
{
hop=1
source=viknet-webgateway.default
target=*
}
security.request
{
request=gatestat
}

 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0017]command: (null)
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0033]not a security basic
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0035]a security request
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0037]requesting getstat.....
 DEBUG: [Thu Jan  5 13:15:22 2017 sendBuffer:0174]Sending the following buffer to serial TTY
 DEBUG: [Thu Jan  5 13:15:22 2017 logBuffer:0157]BufferSize: 12
 DEBUG: [Thu Jan  5 13:15:22 2017 logBuffer:0158]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Thu Jan  5 13:15:22 2017 calculChecksum:0167]checksum: 001A
 DEBUG: [Thu Jan  5 13:15:22 2017 sendBuffer:0183]result of serial write:: 15
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0048]lst serial command too old
 INFO: [Thu Jan  5 13:15:22 2017 pmaxdMessageHandler:0197]end message handling
So somehow it doesn't get through.. Does anyone have a clue where I can start digging? is it an issue in the PI setup, or between PI and PowerMax PRo?

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Thursday 05 January 2017 15:23

BornToKill wrote:hi,

xPL is running ?
Thanks for your quick help!! Hi, Yes, xPL seems to be running:

Code: Select all

  872 root      20   0    2216     88     16 S   0.0  0.0   0:00.00 xPL_Hub
  873 root      20   0    2460   1448   1344 S   0.0  0.2   0:00.42 xPL_Hub
I also see several instancens of pmaxd....

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Thursday 05 January 2017 15:27

Maybe it's got to do with file locations...? I have to run the pmaxd command from the following directory:

Code: Select all

pi@raspberrypi:~/pmaxd $
If I run it in the basic startup folder, it tells me:

Code: Select all

pi@raspberrypi:~ $ ./pmaxd -fvvvvvvvv
-bash: ./pmaxd: Is a directory
pi@raspberrypi:~ $

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Thursday 05 January 2017 17:25

Ok, got it. Cabeling was wrong (after trying to get the powerlink back up, as that broke for the second time in 6 years) and the config file somehow selected the wrong USB port, so I took out the USB1 (P1 cabel) to force it to use USB0.

Many thanks to all for this guide!!

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Friday 06 January 2017 9:04

Botap wrote:@Holland, the guide was pretty clear so that was great!
Only issue I have is that for some reason the pxamd program will not start during boot time.
I added both the xPL_Hub and the pmaxd lines to the rc.local file.
The xPL_Hub starts everytime when I reboot the pi, but the pmaxd doesn't start for some reason.
So for now I start it manually as I am still testing, but I also noticed that the pmaxd program stops after a few hours.
So that is something I need to work out.
With regards to the script, I will test with the time based version but if I understand it correctly it will only read the status every min.
Do you think it is possible that the pmaxd generate commands based on status changes?
Hi Botap, did you work out the fact why the pmaxd program stops after a few hours? I got all setup and running in Domoticz (except the status, will have to dive into domoticz wiki) and can switch on/off the alarm. But indeed after a few hours it no longer works, until I reboot...

Would be great if you found a solution!
Thanks
Jelle

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Tuesday 24 January 2017 15:13

Ok I completely rebuild the raspberry pi, and run pmaxd on a clean install. Same problem: after 20-odd minutes the program stops.

I opened a shell and ran ./pmaxd -fvvvvvvvv manually. After abt 20 minutes (right after a status change... it seems to react to all sensors) the program stops with "segmentation fault".

Can this be a memory issue? Or an issue in the program itself? Any help would be MUCH appreciated!

jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 16:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Step by step guide: Visonic Powermax Pro integration

Post by jelleeelco » Tuesday 24 January 2017 17:18

And again a step further: it seems to break on 'zone open'. All the other status updates it keeps running....

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests