Paradox Alarm MQTT Hassio addon

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:

ARM_HOME equals ‘Stay’ in my setup. There’s a proposed fork that fixes this, try to apply the suggested changes

In his post Claude shows how to implement a ‘last sensor triggered’ meta-sensor, that is a template that takes the value of the last PIR/contact/sensor that was activated. I tried to replicate this but for me this template sensor is stuck at undefined. But I probably have a typo or something, need to spend more time on this

Could you please tell me in what context are you defining your

  • platform: template

sensor in configuration.yaml? I mean it looks like it is not in configuration.yaml but in a package (similar to me) but in which section are you defining it? I don’t think it should be with the binary senosrs…

template sensors need to be defined under sensor: not binary_sensor:

scstraus is correct. I have my template sensor defined under sensor, not binary_sensor. Just happens to be in a separate file called from configuration.yaml

Thanks xessiv. I can indeed see the correct states of my alarm_control_panels on the states page and when I set the alarms in ‘home’ or ‘stay’ mode from the Paradox app or keypad the state is correctly shown.

However, when I try to ‘Arm home’ from HA, nothing happens. ‘Arm away’ and ‘Disarm’ work fine.

58

When I use MQTT Lens, I can see the correct commands are being sent to the Paradox alarm panel, but only ARM_AWAY and DISARM work from HA.

I would love to get this working if anyone has any further ideas. My ip150_mqtt.py has the following:

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

I have tried changing ‘Arm_sleep’ to ‘Arm_home’, ‘Arm_stay’, ‘Stay’ but to no avail. Any other ideas?

DId you try to manually follow the suggested changes in this pull request?
I mean for starters, I have the following:

class IP150_MQTT():

    _status_map = {
            'areas_status' : {
                    'topic' : 'ALARM_PUBLISH_TOPIC',
                    'map'   : {
                            'Disarmed'   : 'disarmed',
                            'Armed'      : 'armed_away',
                            'Triggered'  : 'triggered',
                            'Armed_sleep': 'armed_night',
                            'Armed_stay' : 'armed_home',
                            'Entry_delay': 'pending',
                            'Exit_delay' : 'pending',
                            'Ready'      : 'disarmed'
                    }

so armed_sleep equals arm_night and armed_stay - armed_home.
Also here:

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

Thanks @Claude_Renaud and @scstraus, I found my typo :wink:

1 Like