Help build binding for Paradox Alarm Panel with IP150

ip150
paradox
alarm
Tags: #<Tag:0x00007fe052099090> #<Tag:0x00007fe04fbd3ee0> #<Tag:0x00007fe04fbd3d50>

(John Mel) #315

Is there a command to bypass a zone?


(David Cole) #316

Not that Iā€™m aware of. Have a look in to readme at the control topics


(John Mel) #317

What i mean is that for a specific zone i get as payload OPEN/CLOSE although for another, i get ON/OFF with a number after it. See the attached images.


(Vincent Regaud) #318

Ok so for a payload like for Paradox/Zone/LR/Windows you will need a JS transform to extract the value
I assume that ON will be OPEN and OFF closed

Create a file called paradox_windows.js in your transform folder with the following content:

(function(payload) {
    var data = payload.split(" ")[0];  // "ON" or "OFF"
    var result = "";
    if (data == "ON") result = "OPEN";
    if (data == "OFF") result = "CLOSED";
    return result;
})(input)

Make sure the JS (Javascript) transformation in installed in the paperUI

Use the transformation for CONTACT items as it returns OPEN and CLOSED


(John Mel) #319

Thanks!!! Its working great!!!


(John Mel) #320

Another thing i am trying to do is to run it as a service. what i get from systemctl status paradoxip.service i get

pi@OPENHABSRV:~ $ systemctl status paradoxip.service
ā— paradoxip.service - Starts and stops the Paradox IP150 Python script
   Loaded: loaded (/usr/lib/systemd/system/paradoxip.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-02-12 11:51:54 EET; 4h 10min ago
     Docs: https://github.com/Tertiush/ParadoxIP150v2
 Main PID: 10433 (python)
   Memory: 15.6M
      CPU: 2.326s
   CGroup: /system.slice/paradoxip.service
           ā””ā”€10433 /usr/bin/python /home/pi/paradoxip/IP150-MQTTv2.py

Feb 12 15:48:28 OPENHABSRV python[10433]: ERROR:root:******************* Error reading config.ini file (will use defaults): [Errno 13] Permission denied: '/h
Feb 12 15:48:28 OPENHABSRV python[10433]: ERROR:root:MQTT connection error (3: 'NoneType' object has no attribute 'encode'
Feb 12 15:51:01 OPENHABSRV python[10433]: ERROR:root:MQTT connection error (2: 'NoneType' object has no attribute 'encode'
Feb 12 15:53:33 OPENHABSRV python[10433]: ERROR:root:MQTT connection error (1: 'NoneType' object has no attribute 'encode'
Feb 12 15:56:06 OPENHABSRV python[10433]: ERROR:root:State01:Error within State_Machine: 1: 'NoneType' object has no attribute 'encode'
Feb 12 15:56:06 OPENHABSRV python[10433]: ERROR:root:State01:Going to State_Machine: 0
Feb 12 15:56:06 OPENHABSRV python[10433]: ERROR:root:******************* Error reading config.ini file (will use defaults): [Errno 13] Permission denied: '/h
Feb 12 15:56:06 OPENHABSRV python[10433]: ERROR:root:MQTT connection error (3: 'NoneType' object has no attribute 'encode'
Feb 12 15:58:38 OPENHABSRV python[10433]: ERROR:root:MQTT connection error (2: 'NoneType' object has no attribute 'encode'
Feb 12 16:01:11 OPENHABSRV python[10433]: ERROR:root:MQTT connection error (1: 'NoneType' object has no attribute 'encode'


(John Mel) #321

Never mind got it permission issues. Thanks once more.

Why with the fork of tertius i always get zone labels, but with psyciknz fork i get them after a lot of the script restart?