Paradox Alarm MQTT Hassio addon

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

Does Magellan work with these settings? Or only EVO 192?

Ciao,
I have successfully configured IP150 in Homeassistant, so that I can activate/deactivate alarm. Now I’d like to be able to fire alarm if my xiaomi window sensors are triggered. Is there a possibility to ask ip150 to fire the alarm from homeassistant?
Thanks

No there’s not

Hello,

I’m receiving the following error when I start the plugin

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 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;’>Your Paradox System</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>

I saw previous post regarding such cases but issue was related with calling https address of the module or mqtt configuration issue. I’m not calling https address and my mqtt server is working fine as I use it for couple of different things (like sonoff switches).

My config:

{
  "IP150_ADDRESS": "http://192.168.0.110",
  "PANEL_CODE": "****",
  "PANEL_PASSWORD": "******",
  "MQTT_ADDRESS": "mqtt://192.168.0.106:1883",
  "MQTT_USERNAME": "mqtt",
  "MQTT_PASSWORD": "********",
  "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"
}

My IP150 module firmware version is 4.40.11.
Here is my config for it:

The IP address is static and reserved in my router. Using the same address as in the config I am able to login in the web interface. It seems like the HA is also connecting to it but somehow it is on a different page or it is being redirected for some reason.
I bought the IP150 only for this purpose and it’s pity that I’m unable to use it.
Does anyone have ideas what else could be causing this issue?