Elmo alarm

Given that your integration is great as it is, and it can perfectly control the alarm system as a whole as HA mandates, here’s my two cents:
I’d like to have fine-grained entities that go beyond binary sensors and the alarm service function (alarm_arm_home, alarm_arm_night and so on).
They should model sectors and inputs as switches.

This way I could toggle them both from Lovelace UI and automations with their very specific semantic: arming every single sector independently and enable/disable every single input.
To be honest this is what I failed to achieve with the android app - based on your e-connect client - I’ve never published cause I was not happy with Kivy implementation details getting in the way (surely my fault).

Anyway I see your integration acting both

  1. as a bridge between HA model and e-connect API
  2. as some UI to control the alarm system.

IMHO exposing the switches would give you greater flexisibility for the 1st point while keeping your UI-related codebase minimal (2nd one).
So many exotic use cases would be easily covered with existing stuff (your UI, the whole set of generic switch-related UI widgets or even Alarmo ones).

Thanks for your feedback! So to summarize steps you are proposing:

  1. Convert all binary sensors in switches (it means we have the Alarm Panel entity, and then only switches)
  2. For sectors: when the switch is ON, the alarm for that sector must be activated (viceversa for OFF)
  3. For inputs: when the switch is OFF, that input should be excluded (disabled) and viceversa

So the use case is:

  • You use the alarm panel widget as a generic panel, where you turn on/off the alarm based on a preset configuration
  • You use sectors as switches to enable/disable a specific alarm (one at a time)
  • You use inputs as switches to enable/exclude the input (e.g. you want to disable the alarm sensor for a specific window or door)

@davidecavestro did I get it correct? It seems a great improvement to me!

Edit: I forgot to mention that I should check the feasibility. Arming/disarming requires the secret code that is not stored anywhere. You can store the code directly in your automation (I do that to enable/disable the alarm from automations) but in the Lovelace UI you don’t have this opportunity. A possible solution is to store it as a secret in the configuration panel, but I don’t know how much secure is that configuration (I can investigate though).

I confirm you got it right, these are my use cases :+1:

I must admit I’m not sure if the switches should replace or complement sensors.
I mean: an input can be enabled or excluded by user (actionable switch) and has an open or closed state (as detected by hardware sensor).
It seems a tri-state or even two binary props… or a switch and a sensor.
OTOH sectors can be armed/disarmed but I don’t know if - from the e-connect api standpoint - they have a concept of being in a triggered state or not.

Maybe sensors should be responsible of triggering the alarm and switches just control arming.
Really not sure, just brainstorming…

Regarding the use of a secret I’ve seen it in the examples for the Template Alarm Control Panel

Cool, I think I can provide switches to support this legit use case, and then I ask for guidance to HA core maintainers to see if we should provide both (binary sensors and switches) or not.

Let me take a look at this, then in a few days I may ship a new version that you can try out! In the meantime, feel free to share any other feedback you have!

1 Like

great integration. just installed and everything works.

more simple in the meanwhile. Why not to map all standard states? referring to manual alarm documentation
armed_custom_bypass/armed_home/armed_away/armed_night/disarmed/triggered

anyhow what is missing is the armed_away status I think. You are assuming by default that is all sectors (1 to 4).

I suggest you should work on “less data connection”. I’ve sim with 200 mb/month (easycontroll by Vodafone) but this integration is using 10-15mb per day… I’ve disinstalled waiting for such a modification. Anyhow, thanks for the great job!!!

Hi guys,
first of all this is a very great job.

My question is related to the autoamtic integration into HACS.

Is there any timeline about its implementation ?

thx

any updates ?

After creating the folder in the custom_component folder and restarting HA, i have the expected warning in the log, but i cannot find “e-connect alarm” when I do “Add integration”.
Any idea on why and how to solve?
I have HA core 2021.12.4.

The warning i have (also for other custom components) is:

2022-01-10 14:08:54 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration econnect_alarm which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

Thank you

SOLVED: it was necessary to restart the lovelace UI, now i can see the integration among those available.

I am trying to logon to the integration, but i receive this “Invalid authentication” error:

I can regularly connect from the app and from the website at connect.elmospa.com (without any domain), as per the attached screenshot:

Any help here?

Thank you.

Any related log entry within config/logs?

No, no logs; i also raised to “debug” the log level of the custom component…

Hey @Giuliano_Altamura - apart from obviously checking for typos on your credentials - the only difference I can see is that I had to set the optional Domain name, since my credentials don’t work for connect.elmospa.com without domain
(i.e. mine is https://connect.elmospa.com/my_installer_domain/Status where my_installer_domain is specific to a technician)

OTOH the error message you got seems very specific to a CredentialError, that can be raised just from here for an incorrect username or password (possibly related to the empty domain path coming from the config UI?)

Anyway you could try to temporarily edit the validate_credentials function within file [HASS_BASE]/custom_components/econnect_alarm/helpers.py
maybe adding some simple log
or just forcing to have no domain, instead of picking a (presumably empty) CONF_DOMAIN from data


i.e. something like
client = ElmoClient(BASE_URL, domain=None)

Success! Instead of None or “” I had to put “default” as domain.
Thank you!

2 Likes

Question: when the alarm is on and an alarm event occurs, is there any attribute or event that i can intercept to be notified that the alarm is ringing?

Never tried, but I’d expect the state of the alarm panel entity (i.e. alarm_control_panel.alarm_panel) switches to triggered.
If not you could use an automation anche check for any binary sensor activated while the panel state is armed_away/armed_night.

is there any updates on this topic ? Has the integration been improved in roder to consume less datas ?

thx

any updates ?

thx

1 Like