Ajax alarm system

Thanks for the great work! For some reason Im getting an error when adding the repo to the community addon page in HA.
From the log:

19-12-14 05:41:29 ERROR (MainThread) [hassio.utils.json] Can't read json from /data/addons/git/ba51a7a7/repository.json: [Errno 2] No such file or directory: '/data/addons/git/ba51a7a7/repository.json'
19-12-14 05:41:29 WARNING (MainThread) [hassio.store.data] Can't read repository information from /data/addons/git/ba51a7a7/repository.json

Any suggestion to what this could be?
Running Hassio version 0.103.0

Is it just me or is this component not working with 0.103?

I get this:

2019-12-13 21:11:57 ERROR (MainThread) [homeassistant.setup] Error during setup of component sia
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/sia/__init__.py", line 140, in setup
    hass.data[DOMAIN][hub_config[CONF_ACCOUNT]] = Hub(hass, hub_config)
  File "/config/custom_components/sia/__init__.py", line 225, in __init__
    self._upsert_sensor(zone.get(CONF_ZONE), sensor)
  File "/config/custom_components/sia/__init__.py", line 263, in _upsert_sensor
    self._hass,
TypeError: Can't instantiate abstract class SIAAlarmControlPanel with abstract methods supported_features

I got the same error.

I just started with Home Assistant. When I try to add this add-on using HACS, I get this error:
20-01-05 22:13:11 ERROR (MainThread) [hassio.utils.json] Can’t read json from /data/addons/git/ba51a7a7/repository.json: [Errno 2] No such file or directory: ‘/data/addons/git/ba51a7a7/repository.json’
20-01-05 22:13:11 WARNING (MainThread) [hassio.store.data] Can’t read repository information from /data/addons/git/ba51a7a7/repository.json

I’m using a Pi with hass.io: ## Home Assistant 0.103.5

UPDATE:
I did not know the difference between the HASS.io repositories and the HACS repositories.
I added HACS https://hacs.xyz/ and now got this working.

Duplicate entities? Anybody know why do I get this since last update.
Capture

Have tried to manually remove entities, uninstall and reinstall of sia but still duplicates.

1 Like

In theory we could define than zone for each sensor separately and with this achieve to have the status for each sensor if we wanted so. is this correct?

I was able to connect the panel to HA
I only see:
Panel state as unknown
Moisture as dry
And heartbeat in xx minutes ago.

How to get all my sensors visible?

Hi, what other sensors do you mean? The panel state will start showing up after it has changed only then a message is sent from your alarm to ha, the only other two sensors that can show up are moisture and smoke. Individual sensors of your alarm (motion, doors, etc) are not exposed through the SIA protocol unfortunately.

Hi, this is due to something in the way ha deals with entity id’s that you want to restore after reboots I have the same issue myself so switched things over to the_2 version. That one has been stable since then also after reboots.

Not sure what you mean, sensor can be the sensor you see in ha or physical sensors of your alarm. The latter are not exposed through this protocol

I was thinking to define separate zone (so called Group) for each sensors in AJAX Alarm.
With this we could than track if each individual sensor is triggered and thus enable to also automate other things, like switch on the light when you enter the room.

Hi Robert,

I was also hoping to do that, and you can give this a bash, but I don’t think it will work. You will only get the notification in Home Assistant from Ajax, if that particular Zone is armed and the sensor gets triggered, which naturally also implies that the Ajax Siren will also be triggered.

John

1 Like

Hi,

I hope that someone has a solution for the problems i’m facing.
Its a fresh install of homeassistant in a virtual environment on a Raspberry Pi.

I am getting the next error:

Setup failed for sia: Unable to import component

And i am receiving allot errors of:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 275, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method

I also get exactly the same error… all the time. However I don´t know what it indicates.
I am on 0.103.6

Not sure that error is related to SIA, as far as I know I’m not using any http calls (it uses sockets), can you also post your config?

I am having a strange issue. When i reboot my home assistant the SIA integration works just fine. But after 1 min or so. the monitoring station gets disconnected and the states become unavailable. The heartbeat is not updated.

Using this config:
sia:
port: **
hubs:
- name: AJAX
account: ****
ping_interval: 1

Have anyone had this kind of issue before?

So I got the original SIA code from CheaterDev to work but not the modified version by @eavanvalkenburg. Downloaded the code from the “master” branch and put the files in config/custom_components and added the code in configuration.yaml.

Does these errors make any sense to you?

Logginformation (ERROR)
Wed Feb 19 2020 19:42:01 GMT+0100 (centraleuropeisk normaltid)
Error executing service <ServiceCall homeassistant.restart (c:d321acf7774f45d6bce07dbfdcc0a51a)>
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/core.py”, line 1234, in _safe_execute
await self._execute_service(handler, service_call)
File “/usr/src/homeassistant/homeassistant/core.py”, line 1251, in _execute_service
await handler.func(service_call)
File “/usr/src/homeassistant/homeassistant/components/hassio/init.py”, line 265, in async_handle_core_service
errors = await conf_util.async_check_ha_config_file(hass)
File “/usr/src/homeassistant/homeassistant/config.py”, line 784, in async_check_ha_config_file
res = await check_config.async_check_ha_config_file(hass)
File “/usr/src/homeassistant/homeassistant/helpers/check_config.py”, line 115, in async_check_ha_config_file
integration = await async_get_integration_with_requirements(hass, domain)
File “/usr/src/homeassistant/homeassistant/requirements.py”, line 48, in async_get_integration_with_requirements
integration = await async_get_integration(hass, domain)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 329, in async_get_integration
integration = Integration.resolve_legacy(hass, domain)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 181, in resolve_legacy
comp = _load_file(hass, domain, LOOKUP_PATHS)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 389, in _load_file
module = importlib.import_module(path)
File “/usr/local/lib/python3.7/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1006, in _gcd_import
File “”, line 983, in _find_and_load
File “”, line 967, in _find_and_load_unlocked
File “”, line 677, in _load_unlocked
File “”, line 724, in exec_module
File “”, line 860, in get_code
File “”, line 791, in source_to_code
File “”, line 219, in _call_with_frames_removed
File “/config/custom_components/sia/init.py”, line 7

^
SyntaxError: invalid syntax

Hi, not sure what goes wrong there, but seems like something todo with loading the component, I would advice using HACS (https://hacs.xyz/) instead of manually copying files.

Hi Thomas, are you sure you have your actual alarm system using the same ping frequency?

After all kind of weird issues (probably because of me) I have it up and running now.

Big thanks to you and the rest of community for working hard in getting things like these to work!

One question, why do I have duplicates? How do I know which one to keep?

These are the entities:

binary_sensor.ajax_1_smoke
binary_sensor.ajax_1_smoke_2
sensor.ajax_last_heartbeat_2
alarm_control_panel.ajax_1_alarm_2
1 Like