Paradox Alarm MQTT Hassio addon

thanks for all. Keep up the good work both @alfredo and @cesareino

I use the add-on for 5 months and it’s very useful for me. :pray:

Hi @alfredo happy new year to you and all guys here!
I am looking foreword the new relase with the fix for triggered alarm.
Now i have a question related with zones. All zones are correctly configured and all of them are working properly. The thing is that when the PIR sensor is triggered the binary sensor activates after ~3-4 seconds. This is not normal behavior because i have other devices using the same mqtt server and all of them are working almost instantly.
I tried to see if the problem is with the html page from the IP150 module and when I test a zone to be active it becomes active with the same delay.
What could be the reason? I am totally lost from ideas

Ciao Alfredo.

I’ve copied all the files in GitHub and replaced the 0.3 version in the addons folder, configuring with my values.

Strangely, I still see 0,3 version in the addons page

38

I’ve also clicked on “Rebuild”.

Starting the addon I get this error repeated plenty of times:

/usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

What can I do to fix both issue?

Thanks

Hi @Peter_Iliev,

If the web page shows the same delay, my best guess is that this is something related to the Paradox PIR sensors configuration. For example, often times they are configured with very low sensitivity, to avoid false alarms (e.g. a cat or a dog walking by). Hence, you have to insistently move in front of them before they are triggered. Also, to save battery, wireless PIR sensors disable themselves for a while after being triggered, so that they don’t waste battery. In fact, while I did implement in the add-on the zone sensor functionality upon request, I don’t actually use it myself for the reasons above.

That said, you can make further tests: if you have a Paradox wall panel, it can also report open zones: you can check whether the same delay appears there, or if it is specific to your web interface. A more brutal, but equally effective test, is to arm your alarm and let it trigger: check if the alarm triggers before the web interface reports an open zone.

Finally, please note the add-on polls the web interface, currently once per second (this is a parameter in the code, but intentionally cannot be configured from the add-on as I want to keep things simple for the average user – and no one complained of latency so far :wink: ). The Paradox web interface actually does the same thing, in fact with an even slower refresh rate, so you may want to keep that in mind as well.

Hope this helps!

Hi @woody4165,

I’d recommend you completely uninstall the 0.3 add-on from the hassio interface, before updating the code and re-installing.

Also note you don’t need to change anything in the code you copy into the addon directory. All the configuration can (in fact, must) be done via the hassio add-on interface, after you have installed the add-on, and before you start it.

Hope this clarifies.

Thanks for your reply @alfredo . My PIR sensors are wired. When i move the PIR sensor triggers immediately but the signal comes with delay around 3 or 4 seconds. The wall panel keyboard indicates immediately the triggered “Open” status of the sensor but the signal comes to my MQTT with delay. Could it be from the network connection? My IP150 is connected to a router which is wireless connected to other router.
What is the latency of your PIR sensor?

Hi Alfredo

I’ve just done a complete new install cloning the repository and installing the addon from Hassio.

This is the log I’ve got

`/usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
Traceback (most recent call last):
  File "ip150_mqtt.py", line 139, in <module>
    ip_mqtt.loop_forever()
  File "ip150_mqtt.py", line 121, in loop_forever
    self.ip.login(self._cfg['PANEL_CODE'], self._cfg['PANEL_PASSWORD'])
  File "/ip150.py", line 143, in login
    'Wrong page fetcehd. Did you connect to the right server and port? Server returned: {}'.format(lpage.text))
ip150.Paradox_IP150_Error: Wrong page fetcehd. Did you connect to the right server and port? Server returned: <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
<html>
<head>
	<meta http-equiv='content-type' content='text/html; charset=UTF-8' />
	<link rel='stylesheet' type='text/css' href='webstyles.css' />
	<script type='text/javascript' src='langue.js'></script><script type='text/javascript' src='commun.js'></script></head><body><div id = 'ERROR' style='margin-top:60px;'></div><title>casa</title><script type='text/javascript'>;var sre = "<table><tr><td align='middle'><div class='box' style='width:460px;margin:80px;'><div class='box-title strips'>" + top.ln_cant[1] + "</div><div class='box-content'><div class='msg' id='MESSAGE'></div></div></div></td></tr></table>";document.getElementById('ERROR').innerHTML = sre; document.getElementById('MESSAGE').innerHTML = top.cant('System Master');</script></body></html>` 

Then after one or two minutes, I get log full of

/usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

This is my config

{
  "IP150_ADDRESS": "https://192.168.xx.xx:xxxx",
  "PANEL_CODE": "panelcode",
  "PANEL_PASSWORD": "password",
  "MQTT_ADDRESS": "mqtt://192.168.zz.zz",
  "MQTT_USERNAME": "mqttusername",
  "MQTT_PASSWORD": "mqttpassword",
  "ALARM_PUBLISH_TOPIC": "paradox/alarm/state",
  "ALARM_SUBSCRIBE_TOPIC": "paradox/alarm/cmnd",
  "ZONE_PUBLISH_TOPIC": "paradox/zone/state",
  "CTRL_PUBLISH_TOPIC": "paradox/ctrl/state",
  "CTRL_SUBSCRIBE_TOPIC": "paradox/ctrl/cmnd"
}

If I go from my Chrome browser to the https://192.168.xx.xx:xxxx/login_page.html I get the correct page to login and using same panelcode and panelpassword from the config I can access to the Alarm panel.

Any suggestion?

Thanks

Hi @woody4165, try to use the http protocol instead of the https in the IP150_ADDRESS parameter. It should work.

Hi @cesareino

I’ve tried now to define the http port in the config, but since in the Paradox config is defined to use also the https, it switches to the https automatically.

16

Same thing from the browser.

Now the log says:

Traceback (most recent call last): File "ip150_mqtt.py", line 139, in &lt;module&gt; ip_mqtt.loop_forever() File "ip150_mqtt.py", line 121, in loop_forever self.ip.login(self._cfg['PANEL_CODE'], self._cfg['PANEL_PASSWORD']) File "/ip150.py", line 143, in login 'Wrong page fetcehd. Did you connect to the right server and port? Server returned: {}'.format(lpage.text)) ip150.Paradox_IP150_Error: Wrong page fetcehd. Did you connect to the right server and port? Server returned: &lt;!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv='content-type' content='text/html; charset=UTF-8' /&gt; &lt;link rel='stylesheet' type='text/css' href='webstyles.css' /&gt; &lt;title&gt;&lt;/title&gt; &lt;script type='text/javascript'&gt;function redirect(){var port="XXXX";window.location = "https://" + window.location.hostname + ":" + port + window.location.pathname + window.location.search;} redirect();&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;

where XXXX is not the http port defined in the addon config, but the https port.

And I don’t want to use http only.

Hello Woody,

I have exactly the same error message.

To go from 0.3 to 0.5 I had to delete the Paradox_IP150 directory from the addons directory and do a complete reinstall.

However, I get the same error message as you.

Traceback (most recent call last): File “ip150_mqtt.py”, line 139, in <module> ip_mqtt.loop_forever() File “ip150_mqtt.py”, line 121, in loop_forever self.ip.login(self._cfg[‘PANEL_CODE’], self._cfg[‘PANEL_PASSWORD’]) File “/ip150.py”, line 143, in login ‘Wrong page fetcehd. Did you connect to the right server and port? Server returned: {}’.format(lpage.text)) ip150.Paradox_IP150_Error: Wrong page fetcehd. Did you connect to the right server and port? Server returned: <!DOCTYPE HTML PUBLIC ‘-//W3C//DTD HTML 4.01 Transitional//EN’ ‘http://www.w3.org/TR/html4/loose.dtd’> <html> <head> <meta http-equiv=‘content-type’ content=‘text/html; charset=UTF-8’ /> <link rel=‘stylesheet’ type=‘text/css’ href=‘webstyles.css’ /> <script type=‘text/javascript’ src=‘langue.js’></script><script type=‘text/javascript’ src=‘commun.js’></script></head><body><div id = ‘ERROR’ style=‘margin-top:60px;’></div><title>Meyer</title><script type=‘text/javascript’>;var sre = “<table><tr><td align=‘middle’><div class=‘box’ style=‘width:460px;margin:80px;’><div class=‘box-title strips’>” + top.ln_cant[1] + “</div><div class=‘box-content’><div class=‘msg’ id=‘MESSAGE’></div></div></div></td></tr></table>”;document.getElementById(‘ERROR’).innerHTML = sre; document.getElementById(‘MESSAGE’).innerHTML = top.cant(‘Geoffroy’);</script></body></html>

It is succesfully connected as can be seen from the Event log.

I am connecting through http only, but no luck either.

Kind regards

For now I’ve disabled it, also because even if it seems to be connected, I don’t get email notification configured directly in the Alarm system when this addon is enabled.

I will check further release if it will work for me.

Thanks anyway to Alfredo!

I want to thank everyone involved in creating and contributing to this addon, this is by far the most useful addon I use.
I have been using version 0.2 for a few months for the limited functionality I needed and recently reinstalled HA and setup version 0.5 from scratch which went smoothly with full functionality.

I was also wondering if anyone has used this for anything besides the obvious automations? Currently, I am using it for, room presence detection, switch/light control and my favourite detecting if someone forgot to arm the alarm when leaving the house.

Thanks again.

Hello JP,

Interesting to see it is wrking for you. Could you share your config details ?

Many thanks

Sure, I will put as much detail as possible, I was meaning to jot down my steps anyway and it might help others. Most of this info I copied from other peoples posts.

After a clean install of Hassio (0.85) on a RPI3, I installed and configured the SSH Server, Mosquitto broker and configurator add-ons.

Make sure you or anyone else is not logged into the ip150 web interface or HA cant connect.

While in the /addons folder via ssh, I then did a

git clone GitHub - maisken/Paradox_IP150: Hassio add-on, Python and MQTT bindings for controlling a Paradox alarm via the IP150 web interface

Then in the “add-on store” under “Local add-ons” click and install the “Paradox IP150 MQTT Adapter” add-on.

Once it is done installing you should, on that same install page get a config block to fill in your settings.
I had to wait a while and possibly even restart to get the config block to show.
Here are my settings in the config block of the add-on.

{
“IP150_ADDRESS”: “http://192.168.1.XXX”,
“PANEL_CODE”: “12345”,
“PANEL_PASSWORD”: “LoginPassword”,
“MQTT_ADDRESS”: “mqtt://core-mosquitto”,
“MQTT_USERNAME”: “mqttUsername”,
“MQTT_PASSWORD”: “mqttPassword”,
“ALARM_PUBLISH_TOPIC”: “paradox/alarm/state”,
“ALARM_SUBSCRIBE_TOPIC”: “paradox/alarm/cmnd”,
“ZONE_PUBLISH_TOPIC”: “paradox/zone/state”,
“CTRL_PUBLISH_TOPIC”: “paradox/ctrl/state”,
“CTRL_SUBSCRIBE_TOPIC”: “paradox/ctrl/cmnd”
}

You can now start the add-on.
In theory it should now be connected to your IP150 module:)

Before we get to the yaml configs and to prevent possible confusion and a bunch of mistakes I previously made. The below two files in the plugin folder DO NOT need to be edited and I think break stuff if you do. Leave them as default here is what are in mine.

core-ssh:/addons/Paradox_IP150# cat config.json

{
“name”: “Paradox IP150 MQTT Adapter”,
“version”: “0.5”,
“slug”: “paradox_ip150_mqtt”,
“description”: “Expose an MQTT interface for the Paradox IP150 web interface”,
“url”: “GitHub - maisken/Paradox_IP150: Hassio add-on, Python and MQTT bindings for controlling a Paradox alarm via the IP150 web interface”,
“startup”: “services”,
“boot”: “auto”,
“options”: {
“IP150_ADDRESS” : “http://127.0.0.1”,
“PANEL_CODE” : “0000”,
“PANEL_PASSWORD” : “Password”,

    "MQTT_ADDRESS" : "mqtt://127.0.0.1",
    "MQTT_USERNAME" : "MQTT_user",
    "MQTT_PASSWORD" : "MQTT_pwd",

    "ALARM_PUBLISH_TOPIC"   : "paradox/alarm/state",
    "ALARM_SUBSCRIBE_TOPIC" : "paradox/alarm/cmnd",
    "ZONE_PUBLISH_TOPIC"    : "paradox/zone/state",
    "CTRL_PUBLISH_TOPIC"    : "paradox/ctrl/state",
    "CTRL_SUBSCRIBE_TOPIC"  : "paradox/ctrl/cmnd"
    },   

“schema”: {
“IP150_ADDRESS” : “url”,
“PANEL_CODE” : “str”,
“PANEL_PASSWORD” : “str”,

    "MQTT_ADDRESS" : "url",
    "MQTT_USERNAME" : "str",
    "MQTT_PASSWORD" : "str",

    "ALARM_PUBLISH_TOPIC"   : "str",
    "ALARM_SUBSCRIBE_TOPIC" : "str",
    "ZONE_PUBLISH_TOPIC"    : "str",
    "CTRL_PUBLISH_TOPIC"    : "str",
    "CTRL_SUBSCRIBE_TOPIC"  : "str"
    }

core-ssh:/addons/Paradox_IP150# cat options.json

{
“IP150_ADDRESS” : “http://127.0.0.1”,
“PANEL_CODE” : “0000”,
“PANEL_PASSWORD” : “Password”,

    "MQTT_ADDRESS" : "mqtt://127.0.0.1",
    "MQTT_USERNAME" : "MQTT_user",
    "MQTT_PASSWORD" : "MQTT_pwd",

    "ALARM_PUBLISH_TOPIC"   : "paradox/alarm/state",
    "ALARM_SUBSCRIBE_TOPIC" : "paradox/alarm/cmnd",
    "ZONE_PUBLISH_TOPIC"    : "paradox/zone/state",
    "CTRL_PUBLISH_TOPIC"    : "paradox/ctrl/state",
    "CTRL_SUBSCRIBE_TOPIC"  : "paradox/ctrl/cmnd"

}

Lets continue, in configuration.yaml add the below:

sensor:

  • platform: mqtt
    state_topic: “paradox/alarm/state/1”
    name: Alarm_State

  • platform: mqtt
    state_topic: “paradox/ctrl/state”
    name: Hassio_connected

and under binary sensors each pir and contact,

binary_sensor:

  • platform: mqtt
    state_topic: “paradox/zone/state/4”
    name: “Lounge_PIR”
    payload_on: ‘on’
    payload_off: ‘off’
    device_class: motion

  • platform: mqtt
    state_topic: “paradox/zone/state/9”
    name: “Kitchen_PIR”
    payload_on: ‘on’
    payload_off: ‘off’
    device_class: motion

  • platform: mqtt
    state_topic: “paradox/zone/state/1”
    name: “Frontdoor_contact”
    payload_on: ‘on’
    payload_off: ‘off’
    device_class: motion

Then still in configuration.yaml I also have:

alarm_control_panel:

  • platform: mqtt
    name: “Home Alarm”
    state_topic: “paradox/alarm/state/1”
    command_topic: “paradox/alarm/cmnd/1”
    payload_disarm: “DISARM”
    payload_arm_home: “ARM_HOME”
    payload_arm_away: “ARM_AWAY”
    qos: 1

The only other entry I have is in my groups.yaml:

Alarm:
name: Alarm
entities:
- sensor.Alarm_State
- sensor.Hassio_connected
- binary_sensor.Lounge_PIR
- binary_sensor.Kitchen_PIR
- binary_sensor.Frontdoor_contact
- binary_sensor.motion_front

For completeness here are some of my Paradox and IP150 details:

Panel
Type SP6000
Firmware version 4.95

IP module
Firmware version 3.01.00 (Version 4 or higher will not work)

IP 150 Configuration:
software port 10000
http port 80
https no

paradoxmyhome.com no

Sorry about the super long post, if there are any questions or more info required just shout.

Regards

3 Likes

I will be setting this up in about 2 months time so thank you for the write up.

Does this mean that at no point can someone use the Paradox app on their phone to access the system without causing dramas with HA? Or will HA reconnect once they close the app? Just wondering, I don’t even have the alarm panel yet (still in the mail).

Hi sparkydave,

The simple answer is yes only one user can be in the web interface at a time. the second device to connect will not be able to login. HA will prevent the app from getting in.

The more complex answer, I don’t use the Paradox App, the old version of the app which works on firmware older than version 4 of the ip module is terrible. When I need to use an app other than HA I use, Alarmin and disable the HA plugin so it can connect. (https://play.google.com/store/apps/details?id=com.rashoft.alarmin&hl=en_US). If however you have the newer Paradox app called InsiteGold it apparently works fairly well now, however that app only works on firmware version 4 and up which does not work with HA…

Did you manage to find an ip150 module with an older than version 4 firmware?

Hmm… this could be a problem then… I just ordered it yesterday so I’m guessing it will be whatever the latest firmware is (unless its old stock) and therefore not work :expressionless:

Yeah that will be an issue, if you are lucky and the version is not too high, from version 4 I hear it auto updates as well so check the version before you let it go online and maybe you can preform this downgrade.

MG5000 fw 4.76 with IP150 v 4.10 - Problem logging in · Issue #22 · Tertiush/ParadoxIP150v2 · GitHub

also check out this thread,

Help build binding for Paradox Alarm Panel with IP150 - Bindings - openHAB Community

I hope it works.

Thanks. I’ll find out in a week or so I guess

Dear JP,

Thank you for the write-up as well. Very useful.

It still does not work for me, but I have a different panel (EVO192), which might be the issue.

regards