This project is a Home Assistant integration for your Elmo/IESS Alarm connected to e-Connect cloud or Metronet.
This integration supports Elmo/IESS alarm systems. The following systems are known to work:
Available functionalities
EconnectAlarm
entity is available and you can use the AlarmPanel
card to control it in lovelaceAlarm status
If you are curious about the project and want to know more, check out our Discord channel!
configuration.yaml
lives) called custom_components
custom_components
folder so that the full path from your config folder is custom_components/econnect_metronet/
https://connect.elmospa.com/vendor/
,
you must set the domain to vendor
. In case you don't have a vendor defined, leave it to default
.In the option page you can configure your alarm presets in case you want to fine-tune which sectors are armed. To proceed with the configuration, open the integration page and click on Elmo/IESS integration. Once the page is opened, you should see the following integration page:
To configure the integration, click on "Configure".
You can now define your presets:
In case you don't define any sector for a given preset, no actions are taken when you use the preset from your alarm panel.
If you use automations, remember that in the payload you must send the code
so that the system will be properly armed/disarmed.
YAML example:
service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.<YOUR ALARM ENTITY ID>
data:
code: !secret alarm_code # (check how to use secrets if you are not familiar)
You can find <YOUR ALARM ENTITY ID>
under Settings > Devices & Services > e-Connect/Metronet Alarm opening the list of entities and searching for Alarm Panel
UI example:
If you want to integrate your alarm with the Apple Home to use Siri or automations, follow these steps:
1) Add these entries inside configuration.yaml
to let Home Assistant create a new HomeKit bridge with just the Alarm Panel exposed.
homekit:
- name: HASS Bridge Alarm
port: 21065
filter:
include_domains:
- alarm_control_panel
entity_config:
alarm_control_panel.<YOUR ALARM ENTITY ID>:
code: <PIN CODE>
1) Please replace <PIN CODE>
with your specific alarm code and <YOUR ALARM ENTITY ID>
with your alarm entity id.
2) Reboot Home Assistant.
3) Scan the QR code available in your Home Assistant Notifications area (bottom-left badge) with your iPhone to add the alarm into the Apple Home app.
Multiple HomeKit bridges: If you have others HomeKit integrations created via the UI (i.e., Settings > Devices & Services), be careful to not use the same port
twice to prevent conflicts. Also note, if you don't specify a port
the default 21063
is used.
Please note that Apple Home requires you to confirm automations that involves security devices such as lockers and alarm systems.
As a result of the integration you should have a similar configuration in your Home app:
Alarm panel | Alarm panel opened |
---|---|
![]() |
![]() |
If you encounter an issue, providing DEBUG
logs can greatly assist us in identifying the bug. Please follow these steps to send us the debug logs:
We are very open to the community's contributions - be it a quick fix of a typo, or a completely new feature! You don't need to be a Python expert to provide meaningful improvements. To learn how to get started, check out our Contributor Guidelines first, and ask for help in our Discord channel if you have questions.
We welcome external contributions, even though the project was initially intended for personal use. If you think some parts could be exposed with a more generic interface, please open a GitHub issue to discuss your suggestion.
To create a virtual environment and install the project and its dependencies, execute the following commands in your terminal:
# Initialize the environment with the latest version of Home Assistant
E_HASS_VERSION=$(curl --silent "https://api.github.com/repos/home-assistant/core/releases/latest" | grep -Po "(?<=\"tag_name\": \").*(?=\")")
./scripts/init $E_HASS_VERSION
source venv/bin/activate
# Install pre-commit hooks
pre-commit install
Instead, if you want to develop and test this integration with a different Home Assistant version, just pass the version to the init script:
# Initialize the environment Home Assistant 2024.1.1
./scripts/init 2024.1.1
source venv/bin/activate
# Install pre-commit hooks
pre-commit install
To test your changes in an actual Home Assistant environment, you may use the Docker container available in our
compose.yaml
file. Launch the container with the following command:
docker compose up -d
Then, navigate to http://localhost:8123
in your web browser to set up your Home Assistant instance. Follow the standard
procedure to install the integration, as you would in a typical installation.
The container is configured to automatically mount the custom_components/
and config/
directories from your local
workspace. To see changes reflected in Home Assistant, make sure to restart the instance through the UI each time
you update the integration.
To maintain a consistent codebase, we utilize flake8 and black. Consistency is crucial as it helps readability, reduces errors, and facilitates collaboration among developers.
To ensure that every commit adheres to our coding standards, we've integrated pre-commit hooks.
These hooks automatically run flake8
and black
before each commit, ensuring that all code changes
are automatically checked and formatted.
For details on how to set up your development environment to make use of these hooks, please refer to the Development section of our documentation.
Ensuring the robustness and reliability of our code is paramount. Therefore, all contributions must include at least one test to verify the intended behavior.
To run tests locally, execute the test suite using pytest
with the following command:
pytest tests --cov --cov-branch -vv
For a comprehensive test that mirrors the Continuous Integration (CI) environment across all supported Python
versions, use tox
:
tox
Note: To use tox
effectively, ensure you have all the necessary Python versions installed. If any
versions are missing, tox
will provide relevant warnings.