Paradox Alarm MQTT Hassio addon

Hi all,

I’m having a problem with zoning… My system has 3 zones, 2 of them are for windows and one is for motion detectors… In order to do a “ARM_HOME”, what it looks like would need to happen is that I would need to send an “ARM_AWAY” to 2 of the zones (for the windows), whereas for an “ARM_AWAY” I would have to send it to the 3rd zone (for motion detectors), and possibly the other 2 as well if all the windows are closed… Is there any way to configure at least using separate zones for “ARM_HOME” and “ARM_AWAY”?

Thanks.

Hello,
any chance to make it work with docker for Synology?
Thanks

Right. I tired core-mosquitto which couldn’t be resloved. But with the ip address I can see the events pushed to the broker by subscribing to the topic, so the add-on-to mosquitto integration works.
I created a virtualbox vm and basically started from scratch, keeping it to bare minimum - mqtt and paradox alarm add-on. Ended up with the same result.
I would gladly appreciate your generous offer for remote assistance. I’m in EEST (gmt+2).

Hi @Leon_Li,

I’ve looked hard into this, and I came to the conclusion there are no ways of triggering the alarm from the web interface, be it panic (no siren) or regular alarm (with bells).

One way to go would be to add a remotely controlled relay to the alarm GPIO, and use that for the trigger. This requires some wiring in the alarm module, and the purchase of a remotely controlled relay (say controlled via MQTT over WiFi, or Zigbee). Once you have that, you would need to add the switch in Home Assistant.

2 Likes

Hi @scstraus,

My take here would be to define an alarm panel for each zone, then set up an automation or a script for arming/disarming. That is, one instance of the addon is running, providing info for all zones (under different MQTT paths). Each alarm panel is configured to operate on different zones (i.e. different MQTT paths, each corresponding to a different zone).

Would that work in your case?

1 Like

I"m looking at the following…

G

so… that was it… a case of “ vs ". Problem solved!

Well, yes, right now I have 3 alarm panels, so I can go in and manually arm and disarm all 3 zones, but that’s pretty cumbersome… I’d like to have one alarm panel for all of them…

I’m thinking of trying to build something using the Manual Alarm Panel, which then sends the necessary requests to the 3 other panels… But then I have to build all the state handling and everything too… Kind of a hassle… But maybe someday I will get motivated to do it…

It would still be awfully nice if we could just have some config option to arm/disarm multiple zones with a single panel in this MQTT addon though.

that mean need to trigger a zone by wifi relay. It will be good to program any kind of sensors to the system via home assistant to create a better alarm system on top of the exisiting.

does anybody have issues using SSL communication to the broker? I’ve switched from self signed certs to Let’s Encrypt in order to eliminate certificate related issues but can’t get the add-on to talk to the broker. More specifically

mqtt://broker.fqdn:1883

works fine, while

mqtts://broker.fqdn:4883

does not.
No errors in this add-on’s log, the only error on the mqtt broker is:

OpenSSL Error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number

On the mqtt broker support thread I got a suggestion to try to specify the ask version of the cert, though I’m not sure how to do that.

I re-read the discussion from scratch so now let me change my question a bit:
Is anybody using this add-on with
1)SSL-encrypted communication to their MQTT broker
2)SSL-encrypted communication to their IP150x
Currently I can’t setup either and I really feel awkward having HA sitting with that big ‘DISARM’ button and all that plain text talk going on back and forward.
Thanks

OK I found a temporary fix. Like in surviving till the next restart of the add-on. If interested, please read on. If anybody feels I’m spamming this thread please let me know.
This addon is using paho mqtt python client. After some research I found out that in order to do a successful pub/sub via mqtts paho (and most mqtt clients) require the CA cert files that should be treated as trusted. For my particular case this represents a bit of a problem as

  1. I’m using Let’s Encrypt (actually switched from self-signed because of this issue)
  2. Apparently the LetsEncrypt CA files are not included in the base image used to build this add-on (at least I couldn’t recognize the file name in /etc/ssl/certs)

As a PoC I logged into the running addon container, created a file and pasted the letsencrypt CA certificates in it, then entered the following line of code just before the call to mqc.connect() in ip150_mqtt.py:

mqc.tls_set(ca_certs='path/to/letsencrypt_ca.pem')

Just like that, I have the Paradox Alarm talking to my MQTT broker via mqtts!
Now obviously this isn’t sustainable, so I’m looking for a way to
a) access the homeassistant container filesystem where I can store the CA cert files from the Paradox Alarm MQTT container, or
b) add code that pulls (curl, wget?) the cert files from letsencrypt.org and adds them to the live container
obviously the latter is much dirtier and less reliable so I’d rather avoid it. Plus if I setup the former I can add a config option so that others might change their CA cert file names.
Can anybody help me with this approach?

1 Like

I’ve been trying for a long time to work, I’ve tried almost everything, go to hass.io, in docker, because I thought that it would be easier for the repository, but nothing …
I have followed all this thread many times and it always gives me error, I share the error in case someone knows how to indicate me …

Traceback (most recent call last):
File “ip150_mqtt.py”, line 139, in
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 137, in login
‘{}/login_page.html’.format(self.ip150url), verify=False)
File “/usr/lib/python3.6/site-packages/requests/api.py”, line 75, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/usr/lib/python3.6/site-packages/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/adapters.py”, line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’,))

Looks like your IP150S just isn’t answering the request for connection… A few questions/ideas:

1)Which version of IP150 and firmware are you using?
2)Are you connected to the web ui on another device while trying to access the IP150? If so, you shouldn’t be.
3)Double check the network and IP settings and make sure that you can log into the IP150 with the settings you gave to the hassio addon

If none of that works, give your config and the full log.

Hello all.

I have had huge success with this addon (thanks to Alfredo and Xessiv for their time assisting me). Almost everything is working perfectly with very quick response rates. The only problem: I still cannot get the system to arm in ‘home’ or ‘stay’ mode. Absolutely everything else works and looks great in HA.

I am hoping someone new has come to this group with some fresh ideas about the problem. Otherwise this can serve as an example of how to get a new system up and running so that you don’t have to scroll too far up this chat… My configuration is as follows:

Addon config:

{
  "IP150_ADDRESS": "http://Your_IP_address_here:10001",
  "PANEL_CODE": "Your_panel_code_here",
  "PANEL_PASSWORD": "Your_panel_password_here",
  "MQTT_ADDRESS": "mqtt://core-mosquitto",
  "MQTT_USERNAME": "Your_username_here",
  "MQTT_PASSWORD": "Your_password_here",
  "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"
}

configuration.yaml

alarm_control_panel: !include includes/alarm_control_panel.yaml

alarm_control_panel.yaml

- platform: mqtt
  state_topic: 'paradox/alarm/state/1'
  command_topic: 'paradox/alarm/cmnd/1'
  name: alarm_house
  payload_disarm: "DISARM"
  payload_arm_home: "ARM_HOME"
  payload_arm_away: "ARM_AWAY"
  qos: 1
  code: !secret paradox_panel_code

- platform: mqtt
  state_topic: 'paradox/alarm/state/2'
  command_topic: 'paradox/alarm/cmnd/2'
  name: alarm_garage
  payload_disarm: 'DISARM'
  payload_arm_home: 'ARM_HOME'
  payload_arm_away: 'ARM_AWAY'
  qos: 1
  code: !secret paradox_panel_code
etc.....................................................................

Binary sensors:

# Smoke alarm (house) ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/14'
  name: smoke_alarm_house
  device_class: smoke

# Panic button ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/16'
  name: panic_button
  device_class: safety

# Lounge PIR ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/18'
  name: lounge_pir
  payload_on: 'on'
  payload_off: 'off'
  device_class: motion
# Dining room PIR ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/21'
  name: dining_room_pir
  payload_on: 'on'
  payload_off: 'off'
  device_class: motion
# Entrance hall PIR ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/22'
  name: entrance_hall_pir
  payload_on: 'on'
  payload_off: 'off'
  device_class: motion
etc...........................................................

# Master bathroom door ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/9'
  name: master_bathroom_door
  payload_on: 'on'
  payload_off: 'off'
  device_class: door
# Bar door ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/10'
  name: bar_door
  payload_on: 'on'
  payload_off: 'off'
  device_class: door
# Lounge door ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/19'
  name: lounge_door
  payload_on: 'on'
  payload_off: 'off'
  device_class: door
# Kitchen door ##############################################
- platform: mqtt
  state_topic: 'paradox/zone/state/23'
  name: kitchen_door
  payload_on: 'on'
  payload_off: 'off'
  device_class: door
etc......................................................................

Other sensors:

- platform: mqtt
  state_topic: "paradox/ctrl/state"
  name: alarm_connection_status

############################################################################
# Last motion detection (Paradox PIRs)
############################################################################
- platform: template
  sensors:
    alarm_last_motion:
      friendly_name: 'Last Motion'
      icon_template: 'mdi:walk'
      entity_id:
        - binary_sensor.lounge_pir
        - binary_sensor.toves_office_pir
        - binary_sensor.dining_room_pir
        - binary_sensor.entrance_hall_pir
        - binary_sensor.skylight_pir
        - binary_sensor.guest_room_pir
        - binary_sensor.troys_room_pir
        - binary_sensor.savannas_room_pir
        - binary_sensor.kitchen_pir
        - binary_sensor.bedroom_passage_pir
        - binary_sensor.master_bedroom_pir
        - binary_sensor.master_bathroom_pir
        - binary_sensor.aquarium_area_pir
        - binary_sensor.tv_room_pir
        - binary_sensor.pir_games_room_landing
        - binary_sensor.pir_games_room_door
        - binary_sensor.pir_games_room_bathroom
        - binary_sensor.pir_cottage_living_area
        - binary_sensor.pir_cottage_bedroom
        - binary_sensor.pir_cottage_bathroom
        - binary_sensor.pir_garage
      value_template: >
        {%- set pirs = [states.binary_sensor.lounge_pir, states.binary_sensor.toves_office_pir, states.binary_sensor.dining_room_pir, states.binary_sensor.entrance_hall_pir, states.binary_sensor.skylight_pir, states.binary_sensor.guest_room_pir, states.binary_sensor.troys_room_pir, states.binary_sensor.savannas_room_pir, states.binary_sensor.kitchen_pir, states.binary_sensor.bedroom_passage_pir, states.binary_sensor.master_bedroom_pir, states.binary_sensor.master_bathroom_pir, states.binary_sensor.aquarium_area_pir, states.binary_sensor.tv_room_pir, states.binary_sensor.pir_games_room_landing, states.binary_sensor.pir_games_room_door, states.binary_sensor.pir_games_room_bathroom, states.binary_sensor.pir_cottage_living_area, states.binary_sensor.pir_cottage_bedroom, states.binary_sensor.pir_cottage_bathroom, states.binary_sensor.pir_garage] %}
        {% for pir in pirs %}
          {% if as_timestamp(pir.last_changed) == as_timestamp(pirs | map(attribute='last_changed') | max) %}
            {{ pir.name }}
          {% endif %}
        {% endfor %}

IP module:

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

Alarm panel:

Paradox Evo192

2 Likes

It’s been a long time my friend, this addon hasn’t missed a beat!

Still wanting to find a way to control the delay of the PGMs (siren) or to trigger them when I want would be amazing!

I managed to connect babyware to the IP150 module via web interface (AFAIK)? and it seems that it can write delay settings etc to the IP150

I understand from your previous comments that you don’t think these settings can be controlled via the web but have you looked at how babyware does it at all?

I read somewhere in the comments that the module can now work with IP150 running firmware V3?
I had to downgrade previously to 1.32.01 to get it working

Claude,
Any idea how to troubleshoot the last motion sensor? It doesn’t update in my installation while all other pir binary_sensors change states appropriately…
And another question, probably off-topic, how did you get your entities to show the “last triggered” text in Lovelace :slight_smile:

Not sure about the problem with your last motion sensor, but I can assist on the second point.

Just add

secondary_info: last_changed

under your binary sensor eg.

      - entities:
          - entity: binary_sensor.door_studio
            secondary_info: last-changed
1 Like

I wanted to see if I could get you the answer you’re after but I don’t think I can, at least not completely :blush:

ip150_mqtt.py contains this mapping for the ‘ALARM_PUBLISH_TOPIC’ topic:

'Disarmed'   : 'disarmed',
'Armed'      : 'armed_away',
'Triggered'  : 'triggered',
'Armed_sleep': 'armed_home',
'Armed_stay' : 'armed_home',
'Entry_delay': 'pending',
'Exit_delay' : 'pending',
'Ready'      : 'disarmed'

But then for the actions available there’s only these at the moment:

_alarm_action_map = {
'DISARM': 'Disarm',
'ARM_AWAY': 'Arm',
'ARM_HOME': 'Arm_sleep'

Meaning you can only arm it into Away or Sleep mode at the moment. I wonder why Stay wasn’t added in? @alfredo
The rest of the Python code looks to be there to pass on to the IP150 interface which is:

    _areas_action_map = {
        # Mapping from human readable commands to machine readable
        'Disarm'   : 'd',
        'Arm'      : 'r',
        'Arm_sleep': 'p',
        'Arm_stay' : 's'

So I wonder why Stay wasn’t implemented as well :blush:

So you’ll only be able to do Away and Sleep at the moment, which is done like so, see Lovelace Alarm Panel card yaml code below:

entity: alarm_control_panel.control_state_home
name: Home Alarm
states:
  - arm_away
  - arm_home
type: alarm-panel

Since you’ve got both arm payloads defined in your configuration, when you go into your states you should see your alarm_control_panel.alarm_house etc as I have mine.
When you bring up the ‘More info’ section, you should be able to see both arm states there:


@alfredo Also, in looking into the IP150 a little more I also saw that you can control ALL zones at the same time by referencing zone 99 when submitting - I’m not sure if you’d like to, or willing to implement this but it may prove useful for anyone that wants to use it - see screenshot below:

Hope this helps a little bit @Claude_Renaud

Thank you @alfredo once again for this addon. It’s great!

1 Like

What motion sensor are you talking about? If all others are working and you have them configured the same way, then there’s either an issue with your configuration, or it’s possible that your sensor isn’t the correct number you think it is. See if you can match the numbers up with the IP150 web interface or through Babyware.
If you can provide more info I’ll try to help you more, but I’m not sure what you’re talking about at this stage :smiley: