Olarm integration

This looks great! I would love to be on the list of people that you share this with when its ready. Thanks!

Hello! I have been attempting to create an integration similar to this but unfortunately have not had the time so I was very excited when I saw this!!

Looks like I am getting the following error in my logs when attempting to setup. Any thoughts?

Traceback (most recent call last):
  File "/config/custom_components/olarm_sensors/olarm_api.py", line 256, in get_panel_states
    if zone2:
UnboundLocalError: local variable 'zone2' referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/olarm_sensors/binary_sensor.py", line 30, in async_setup_entry
    await coordinator.async_get_data()
  File "/config/custom_components/olarm_sensors/coordinator.py", line 71, in async_get_data
    self.panel_data = await self.api.get_panel_states()
  File "/config/custom_components/olarm_sensors/olarm_api.py", line 317, in get_panel_states
    except aiohttp.web_exceptions.Any as ex:
TypeError: catching classes that do not inherit from BaseException is not allowed

Hi @maxc123,

I have updated the code to fix and accommodate alarm panels that do not have a secondary zone. As well as fixing that bug. It is also now installable via HACS, and thereafter it will be able to be updated via the ui.

Great work Raine :+1:

1 Like

Hey Tim, would be lovely if you could share the full integration with me too. Switched from Pradox to Olarm last year and it’s like day and night. Would be great to integrate to HA now. I am struggeling with the first task already - getting the api. Can’t seem to find it in Olarm’s website.
Thanks in advance
Ben

UPDATE: Was able to integrate Olarm in my HA - great work Raine! Sent you an email as my 3 Zones are shown ‘unavailable’ in HA. Also can I also scan all my sensors? Or does your integration only map Olarms alam panel only for now?
Thanks so much for all your hard work

It maps the sensors for your alarm panel, the state of each sensor and the state for each area. I also added the ability to use ukeys and pgm’s.

Here is the link to the GitHub discussions page for the integration.

Hi Jakesie

Is there any update on this?

Hi there

I have notice that every time i restart HA, the alarm panel entity does not work. The only way to fix this is to remove the integration, re-setup and then the alarm panel works again.

Please see below error log.

Logger: homeassistant.config_entries
Source: helpers/entity_component.py:169
First occurred: 09:01:35 (3 occurrences)
Last logged: 09:01:35

Error setting up entry Olarm Sensors for alarm_control_panel
Error setting up entry Olarm Sensors for binary_sensor
Error setting up entry Olarm Sensors for button
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/alarm_control_panel/__init__.py", line 115, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 169, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
```

HI there

Almost done. Just ironing some issue out. Need to change again as i am making use of the fantastic alarm interrogation from Rainepretorius

Will share once done

2 Likes

I will look into it.

Well done.

I guess I should have enabled notifications on this thread. I come back to find a whole integration has been built since I posted in January :sweat_smile: Sorry to those that I didn’t respond to in this thread.

Good day all,

So thanks a lot to the contributors for the integration, mine is working on a DSC PowerSeries alarm. I was just wondering - how would one actually trigger the alarm using this integration? I tried the service - but it didn’t work? I want to try and see how far I can stretch the application of my alarm in the house using my other PIR’s that aren’t directly linked to the alarm panel and/or Olarm.

Also, can’t whether there is a specific PGM linked to the trigger. Your help would be appreciated.

I have the error below with too many API attempts in the Olarm integration. I have changed this from 5 to 10, however the app/integration is not as responsive then as what it used to be.
This is due to Olarm limiting X amount of API calls in a certain timeframe.

If you have this issue, please log a call with Olarm for this error.
The reason is so that they can see how many users use this integration and put more resources to creating the MQTT/HomeKit/Google Home/API connectivity that they have been promising since last year.
See post below on the GitHub site.

Sensor update delays and unavailable. · rainepretorius/olarm-ha-integration · Discussion #85 (github.com)

Error:
Logger: custom_components.olarm_sensors
Source: custom_components/olarm_sensors/olarm_api.py:87
Integration: Olarm Sensors (documentation, issues)
First occurred: October 30, 2023 at 11:04:09 AM (7676 occurrences)
Last logged: 6:46:29 AM

Your refresh interval is set too frequent for the Olarm API to handle

Good day all, I have done an update on the Olarm Integration today and all of a sudden I am getting errors. What am I doing wrong?

Logger: homeassistant.setup
Source: setup.py:377
First occurred: 12:03:13 PM (5 occurrences)
Last logged: 12:03:13 PM

Unable to prepare setup for platform olarm_sensors.alarm_control_panel: Platform not found (cannot import name 'DeviceInfo' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)).

Unable to prepare setup for platform olarm_sensors.binary_sensor: Platform not found (cannot import name 'DeviceInfo' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)).

Unable to prepare setup for platform olarm_sensors.button: Platform not found (cannot import name 'DeviceInfo' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)).

Unable to prepare setup for platform olarm_sensors.sensor: Platform not found (cannot import name 'DeviceInfo' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)).

Unable to prepare setup for platform olarm_sensors.switch: Platform not found (cannot import name 'DeviceInfo' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)).

Hey @jakesie :wave: :slight_smile:

Sorry to ping you on this old thread, I’m just curious if you managed to release your custom card for the alarm stuff?

It looked really neat! :slight_smile:

1 Like

Hey @eitel13

Apologies for the late reply. Never got time to create the card but happy to share the yaml code with you and assist where I can.

1 Like

That would be amazing! :slight_smile:

Might sound a bit like an odd question, but, how can I use the yaml?

I’ve only ever used built-in Lovelace or Mushroom cards and I’m not sure how to “use the yaml code” without a card type (if that makes sense? :sweat_smile:)

Assuming maybe it’s the “Manual” card? :point_down:

Thank you, the yaml code would be a great start.

For those interested, I went down the route of creating a YAML package for an Olarm.

One benefit of this approach is that you can customise this to your own needs.

The package uses the Olarm REST API and webhooks to create an HA manual alarm panel.

Home-Automation/home_assistant/packages/olarm.yaml at master · parautenbach/Home-Automation (github.com)

Features:

  • Real-time alarm state updates and triggers
  • Basic alarm management: arming/disarming (advanced management such as bypassing must be done via the Olarm app)
  • Presence aware: ask to arm/disarm when leaving/arriving
  • Extensible with more custom automations and integration of one’s own sensors
  • Area/partition aware (although not set up for multiple areas/partitions; make a copy if you want to manage multiple partitions)

Unsupported:

  • Zone monitoring (no real-time updates via webhooks or mqtt)
  • Bypassing zones (not implemented; not supported by the alarm integration)
  • Alarm action history (not implemented; not supported by the alarm integration)
  • Managing more than one area/partition (clone the package in order to do so)
  • How or who armed/disarmed the alarm (complex)

Future:

  • Distinct alerts (notifications) for breach, panic, fire and emergency (currently no distinction)
  • Hoping for an MQTT integration with additional features (multiple requests made to Olarm; apparently it is WIP)

Known issues & bugs:

  • Arming when a zone is active (open) will not fail when calling the API (issue reported to Olarm)

If you’re like me and don’t like green for an armed alarm on your UI (and you want it to match your Olarm app), check these two links for customisation:

Olarm YAML Package - Share your Projects! - Home Assistant Community (home-assistant.io)