Paradox Alarm MQTT Hassio addon


#62

Hi RKor,

There was an issue in the way errors were handled: if internet connection was lost, my addon would disconnect from the IP150 module, but not from the MQTT server. As a result, on HA the alarm would seem available, but neither the state was updated, nor commands could be issued.

This should now be fixed in the v 0.3 of the add-on, which is pushed on github. You still need to install it as a local add-on. Sorry for the inconvenience!


#63

Hi, I’d be interested in better understanding the issue you’re experiencing when the system enters into an alarm state. This is something I programmed based on my understanding of what happens when an alarm triggers, but can not test for practical reasons.

A useful debugging setup is to disable the hassio add-on, and instead run the code from a console. If you git pull the current repository and set up virtualenv, the following command:

python ip150_mqtt.py

runs the same code as the add-on, but you see any errors or exceptions on the command line.

I also like to run a mosquitto_sub on another shell, so I can see which messages are sent.

Also, it could be useful to see a screenshot of the web GUI when it’s in alarm (and a dump of its HTML code would be ideal). That should be a decent starting point to understand what goes wrong when the system goes in alarm.

Thanks!


#64

Hi Alfredo,

Really glad you’re still updating/enhancing the plugin, I have now updated to 0.3 and only time will tell if it stays up and connected.
Thank you

One problem that I’ve always had with it, arming and disarming through hassio has never worked for me for some reason.
This is my config.yaml entry

alarm_control_panel:

  • platform: mqtt
    name: House Paradox
    state_topic: “paradox/alarm/state/1”
    command_topic: “Paradox/C/P1”
    code: ‘5555’
    payload_disarm: “DISARM”
    payload_arm_home: “ARM_HOME”
    payload_arm_away: “ARM_AWAY”

#65

Hi RKor,

You’re totally right, only time will tell! If things work properly, the add-on should now report the alarm panel as unavailable as soon as the network connection goes down, and keep re-trying to connect to the IP150 every 20 seconds (this time was picked as it’s the shortest which ensures you’d be logged off from the IP150 module, so you can re-start the full process, including login).

Re: the configuration issue, you need to make sure that the MQTT topics in the config.yaml and the add-on config match exactly. In my case, in my config.yaml file I have, among others, the following lines:

    state_topic: "paradox/alarm/state/1"
    command_topic: "paradox/alarm/cmnd/1"
    name: "Paradox"
    qos: 1
    availability_topic: "paradox/ctrl/state"

in the add-on config, I have:

  "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 see how certain topics have to match, or it won’t work.

I appreciate this is a bit of a pain. Ideally, the code I wrote for the add-on would be embedded as an HA component, and all this MQTT nonsense would disappear. Sadly, at the moment I don’t have neither the time nor the experience to turn the existing code into an HA component, although I’d love to see that happen!

Hope this helps!


#66

My friend that worked perfectly!

For some reason it wouldn’t work with availability_topic: “paradox/ctrl/state” so I removed it and I can now arm & disarm my alarm through hassio

My internet got disconnected today and the plugin reconnected to alarm without any issues :smiley:

Happy days!
Thank you so much!


#67

@alexricher how did you managed to connect to the MQTT?
I am using the built in MQTT server?
Can you write a basic installation and configuration instructions? I even can not connect to the MQTT server :slight_smile:

Here is my error log:
reading config
Traceback (most recent call last):
File “IP150-MQTTv2.py”, line 2063, in
client.connect(MQTT_IP, MQTT_Port, MQTT_KeepAlive)
File “/usr/lib/python3.6/site-packages/paho/mqtt/client.py”, line 768, in connect
return self.reconnect()
File “/usr/lib/python3.6/site-packages/paho/mqtt/client.py”, line 895, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
File “/usr/lib/python3.6/socket.py”, line 724, in create_connection
raise err
File “/usr/lib/python3.6/socket.py”, line 713, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “IP150-MQTTv2.py”, line 2080, in
logging.error(“MQTT connection error (” + str(attempts) + ": " + e)
TypeError: must be str, not TimeoutError


#68

Hey Peter, I’ve never used personally the local MQTT server of HA. Because most of the tutorials use Mosquitto, I went with this one right at the start.

A quick glance at your logs seem to point to a connection issue with your MQTT server. Is it properly configured? Can you ping the IP/hostname you’ve put in the config? It seems to currently time out.

If you look above in this post, there are some examples on how to configure it. I personally followed this specific post: Paradox Alarm MQTT Hassio addon


#69

Hey Alex,
The mosquito server is working properly. It is serving more than 60 devices. I can see that the issue is with the connection with the mqtt server.
If i add a remote mqtt server it is not working aswell. So I think there is something that I miss.
Can you share with me what is your config.ini file?
The addon can not connect to the broker at all


#70

Good morning!

Could anyone out there decipher this for me and suggest where my connection problem comes from?

I am using the latest version of Hassio on a Raspberry Pi 3, Mosquitto mqtt broker, DuckDNS with Letsencrypt.

Paradox adaptor settings:
{
“IP150_ADDRESS”: “http://192.168.[xxx].[xxx]:10000”,
“PANEL_CODE”: “[xxxx]”,
“PANEL_PASSWORD”: “[xxxxxxxxx]”,
“MQTT_ADDRESS”: “mqtt://192.168.[xxx].[xxx]”,
“MQTT_USERNAME”: “[xxx]”,
“MQTT_PASSWORD”: “[xxxxx]”,
“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”
}

Mosquitto broker setup:
{
“plain”: true,
“plain_websockets”: false,
“ssl”: true,
“ssl_websockets”: false,
“anonymous”: false,
“logins”: [
{
“username”: “[xxxxx]”,
“password”: “[xxxxxxx]”
}
],
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}

Duck DNS / LetsEncrypt setup:
{
“lets_encrypt”: {
“accept_terms”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
},
“token”: “[xxxxxxxxxxxxxxxxxx]”,
“domains”: [
“[xxxxxx].duckdns.org”
],
“seconds”: 300
}

Everything else functions correctly, just struggling to connect to my IP150 module. I have the Paradox Evo192 (software v. 4.50.3) with IP150 module (software v. 1.34 hardware v. 0.20).

This is my log output:

raise six.reraise(type(error), error, _stacktrace)

File “/usr/lib/python3.6/site-packages/urllib3/packages/six.py”, line 685, in reraise
raise value.with_traceback(tb)
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 601, in urlopen
chunked=chunked)
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 387, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 383, in _make_request
httplib_response = conn.getresponse()
File “/usr/lib/python3.6/http/client.py”, line 1331, in getresponse
response.begin()
File “/usr/lib/python3.6/http/client.py”, line 297, in begin
version, status, reason = self._read_status()
File “/usr/lib/python3.6/http/client.py”, line 266, in _read_status
raise RemoteDisconnected(“Remote end closed connection without”
urllib3.exceptions.ProtocolError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’,))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “ip150_mqtt.py”, line 129, in
ip_mqtt.loop_forever()
File “ip150_mqtt.py”, line 111, in loop_forever
self.ip.login(self._cfg[‘PANEL_CODE’], self._cfg[‘PANEL_PASSWORD’])
File “/ip150.py”, line 129, in login
‘{}/login_page.html’.format(self.ip150url), verify=False)
File “/usr/lib/python3.6/site-packages/requests/api.py”, line 72, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/api.py”, line 58, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/sessions.py”, line 508, in request
resp = self.send(prep, **send_kwargs)
File “/usr/lib/python3.6/site-packages/requests/sessions.py”, line 618, in send
r = adapter.send(request, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/adapters.py”, line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’,))
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 601, in urlopen
chunked=chunked)
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 387, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 383, in _make_request
httplib_response = conn.getresponse()
File “/usr/lib/python3.6/http/client.py”, line 1331, in getresponse
response.begin()
File “/usr/lib/python3.6/http/client.py”, line 297, in begin
version, status, reason = self._read_status()
File “/usr/lib/python3.6/http/client.py”, line 266, in _read_status
raise RemoteDisconnected(“Remote end closed connection without”
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/requests/adapters.py”, line 440, in send
timeout=timeout
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/lib/python3.6/site-packages/urllib3/util/retry.py”, line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File “/usr/lib/python3.6/site-packages/urllib3/packages/six.py”, line 685, in reraise
raise value.with_traceback(tb)
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 601, in urlopen
chunked=chunked)
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 387, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 383, in _make_request
httplib_response = conn.getresponse()
File “/usr/lib/python3.6/http/client.py”, line 1331, in getresponse
response.begin()
File “/usr/lib/python3.6/http/client.py”, line 297, in begin
version, status, reason = self._read_status()
File “/usr/lib/python3.6/http/client.py”, line 266, in _read_status
raise RemoteDisconnected(“Remote end closed connection without”
urllib3.exceptions.ProtocolError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’,))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “ip150_mqtt.py”, line 129, in
ip_mqtt.loop_forever()
File “ip150_mqtt.py”, line 111, in loop_forever
self.ip.login(self._cfg[‘PANEL_CODE’], self._cfg[‘PANEL_PASSWORD’])
File “/ip150.py”, line 129, in login
‘{}/login_page.html’.format(self.ip150url), verify=False)
File “/usr/lib/python3.6/site-packages/requests/api.py”, line 72, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/api.py”, line 58, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/sessions.py”, line 508, in request
resp = self.send(prep, **send_kwargs)
File “/usr/lib/python3.6/site-packages/requests/sessions.py”, line 618, in send
r = adapter.send(request, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/adapters.py”, line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’,))


#71

Hi Claude,

It seems the add-on cannot establish a network connection to the IP150 module. Are the IP, port and protocol correct? Also, I haven’t tried the add-on with the Evo alarm, although if the IP150 interface is the same, it should make no difference.


#72

Hi Claud,
It may be a simple issue, but I had trouble with this too.
Try changing your MQTT line to: mqtt://core-mosquitto
Instead of having your IP address in there. Then save and restart the IP150 addon and let us know how that goes :slight_smile:
ALSO, confirm that the port you’re trying to connect to on your IP150 module is the HTTP port, and not the CONTROL port. I had trouble accessing it once, had to physically restart the module before I could get it back on, but it’s been solid ever since.


#73

If anyone else is having issues please post and I’ll try to assist too. I’ve managed to get mine working and helping others to get it working too is a small price to pay for the satisfaction of having my alarm controlled in HA! Thank you Alfredo!


#74

Appears to be working now. Thanks for your help. My problem was solved by ‘xessiv’. See comment below.


#75

Many thanks. Solved now. As you suspected the problem was to do with the HTTP vs. CONTROL port. I had the wrong one. For anyone else having the same issue, here is a brief outline of how my connection issue was solved.

On my router I had port forwarding set up for my IP150 module with the starting port at 10000 and ending at 10001. I had been battling with various configurations using port 10000 for weeks, until ‘xessiv’ suggested I may be using the CONTROL PORT and not the HTTP PORT. Long story short, changed the port to 10001 and everything works.

Many thanks to everyone involved in the development and assistance with this module.


#76

@Claude_Renaud, @xessiv, @alexricher please advise the version of IP150 you are are using and were able to integrate successfully.
There are ebay listings where ver 4.0, 4.1 and 4.3 are offered and I need to make a choice, therefore some guidance is needed.
Thanks!


#77

Here’s my system info:
Panel:
Type - MG5050
Firmware version - 4.81

IP module:
Firmware version - 3.01.00
Hardware -020
ECO - N009

So what I think you’re asking about on mine is v3.01.00.

I’d probably get the lowest version you can find. You can always flash up but can’t necessarily flash down. I did read somewhere that there may be issues with v4+ firmware versions, but can’t be sure if accurate…


#78

Mine seems to be a bit older (installed in 2016).

IP module firmware version: 1.34.00
Hardware: 020
ECO: N009
IP boot: 2.12


#79

How are the zones and the names of my alarm devices installed? Why did the installer do it?


#80

@alfredo
Everything has been working great!

I’d like to ask though, is there any chance to send a command to the internal siren to silence it for an amount of time?
I’ve recorded my voice deterring the potential robbers and I’d like to play it on my google homes around the house when the alarm is triggered…
But I need the alarm to be quiet while that plays then it can resume “screaming” :grin:


#81

Hi Rkor,

I’m not aware of such functionality offered through the web interface, so I’m not confident what you want to do can be achieved this way. Even if there was such functionality, it may get tricky to have it controlled from within home assistant (certainly not from the alarm control panel – you may need to define a new switch, and set up an automation that triggers the switch that mutes the siren when the alarm goes into the “in alarm” state, which sounds overcomplicatedand prone to race conditions).

Maybe, a better approach for your use case is to see whether, from the proprietary Paradox applications that installers use to configure the overall alarm (that is where you define zones, PIR sensitivity etc), you can configure the siren to kick in with a delay. Once you have that done, you can build an automation that triggers your voice when the alarm is triggered, and that should be about it. Does it sound reasonable?