0.118: removal of iAlarm integration

I’ve seen that iAlarm integration has been removed starting the new HA release.
I understand the rationale, however, as I was relying on this platform to make some
automation (e.g. ARM HOME at 23:50), I would like to find a workaround.
Would it be possible to “recycle” the code at https://github.com/RyuzakiKK/pyialarm
as a custom component (although this would likely be beyond my coding capability)?

1 Like

That is exactly what you can do.

@Salvatore_Virtuoso, I’m also interested in recovering the iAlarm integration. If you have information on how to proceed, write here for sharing. Thank you

Great! I’ll give a try and let you (and any other interested) know. Thanks Tom!

I’m interested, so please post here any info.
Thanks

All you have to do is download the whole repository linked to above as a zip file. Extract the pyialarm folder and put it (and it’s contents) in config/custom_components. After a restart it should operate exactly as id did when it was a core component.

Just for a exercises in style I create REST calls to set alarm and get the status, if needed (quite challenging the sensor):
REST COMMANDS:

ialarm_disarm:
  url: http://192.168.x.xx/RemoteCtr.htm
  method: POST
  username: !secret username_ialarm
  password: !secret password_ialarm
  payload: 'Ctrl=3 BypassNum=00 BypassOpt=0'
ialarm_arm:
  url: http://192.168.x.xx/RemoteCtr.htm
  method: POST
  username: !secret username_ialarm
  password: !secret password_ialarm
  payload: 'Ctrl=1 BypassNum=00 BypassOpt=0'
ialarm_home:
  url: http://192.168.x.xx/RemoteCtr.htm
  method: POST
  username: !secret username_ialarm
  password: !secret password_ialarm
  payload: 'Ctrl=2 BypassNum=00 BypassOpt=0'

STATUS REST SENSOR:

- platform: rest
  resource: http://192.168.x.xx/RemoteCtr.htm
  name: ialarm_status
  authentication: basic
  username: !secret username_ialarm
  password: !secret password_ialarm
  scan_interval: 30
  value_template: '{{ value.split(''selected="selected">'')[1].split(''<'')[0]}}'

I did the following:

  1. copied the folder pyialarm under \HOMEASSISTANT\config\custom_components
  2. added in configuration.yaml (same as in 117.6):
alarm_control_panel:
  - platform: ialarm
    host: 192.168.xx.xx
    username: !secret user365
    password: !secret pw365

But upon restart I get the following error:
Platform error alarm_control_panel.ialarm - No module named 'custom_components.pyialarm.alarm_control_panel
Any hint?

@Salvatore_Virtuoso I’m new to home assistant and python but as far as I understand what you found in Github is a library for integrating ialarm and not a HA component. looking at the code you have a Ialarm class with method to get and set status, that could be at the basis of a alarm panel component. and in facts in 0.117 you can find a pyialarm library under 3rd party lib and also an ialarm alarm component that uses pyialarm. probably the best way is to merge pyialarm and ialarm component from 0.117 in a single custom component… I have no enough skill, maybe it is worth take a look to a similar custom component delivered through hacs

according to what I wrote before and some investigations, maybe you can put in the custom component folder only the files you can find in https://github.com/home-assistant/core/tree/0.117.6/homeassistant/components/ialarm.
Reference to pyialarm is in the manifest, to me is not clear if HA can manage this dependency by itself or you need to do something…

Hi, some time ago I developed a nodejs module (available also on docker) which is inspired by the python library used (and now removed) by home assistant.
The module expose both alarm and sensors via Mqtt and supports discovery:

Anyways this kind of alarms can be controlled directly via proprietary TCP protocol and that could be used for adjusting the now removed home Assistant component.

:roll_eyes: I didn’t look at the link. You are correct. The correct link is in the next post by @gforment

An enhanced STATUS REST SENSOR that exposes the same status of the former iAlarm, probably you need to change some lables according to iAlarm interface language (my is Italian):

- platform: rest
  resource: http://192.168.x.xx/RemoteCtr.htm
  name: ialarm_status
  authentication: basic
  username: !secret username_ialarm
  password: !secret password_ialarm
  scan_interval: 30
  value_template: >-
    {% set status = value.split('selected="selected">')[1].split('<')[0]%}
    {% if status == "Disarma" %}
      disarmed
    {% elif status == "Arma programma notte" %}
      armed_home
    {% elif status == "Arma totale" %}
      armed_away
    {% else %}
      {{ status}}
    {% endif %}

@Salvatore_Virtuoso, at the end of the day restore “iAlarm” component is very easy:

1 Like

Thanks a lot. I’ll give a try.
Meanwhile I was exploring the NodeRed solution as proposed by @maxill1 that seems to have a few more options (specifically, it returns also the reason for the alarm). As I already use NodeRed, it would be easy. If I can make something useful, I’ll post here.

I confirm that the procedure indicated by gforment and tom_l works like a charm.
Thank you both.

2 Likes

Thank you but I’m new to HA so NodeRed is something I have planned in the future. By now, plain vanilla HA is enough to play with alexa, alarm, cams and few other devices such as Shelly Duo…

Sorry, but in HA “HASSIO version” the system of copying the files into the “custom components” folder doesn’t work. The iAlarm entity is not available. thanks for your help

Yeah. It does.

sorry for my bad English.
I followed the procedure to save the 3 files in the config / custom_components folder (as you can see from the image).
I restarted HA.
And here I stop because I cannot find the entity, nor the device nor the state that refers to “ialarm”.
If you can tell me what next steps I need to take I would be grateful.
Thanks for your help!
p.s. I forgot, I also tried to put the files in the packages folder but the result is the same.


This is inside the configuration.yaml file
alarm_control_panel:

  • platform: ialarm
    host: 192.168.x.xx
    username:! secret user_ialarm
    password:! secret pw_ialarm
    name: Alarm