Ajax alarm system

Ahaa, it’s working! Thanks! :slight_smile:
Now I can see “Disarmed”:
image

Maybe this can be added to the documentation and also add that the “Account” is the same as “Object number” in the app?

Hi there!

Can’t install SIA integration.

Having this error — https://img.netpeak.ua/fireblast/21-eu437-ljt4n.png

And, there is what I see in the logs:

Logger: custom_components.sia.config_flow
Source: custom_components/sia/config_flow.py:108
Integration: sia (documentation)
First occurred: 15:08:53 (4 occurrences)
Last logged: 15:13:18

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/sia/config_flow.py", line 108, in async_step_user
    await self.async_set_unique_id(f"{DOMAIN}_{self.data[CONF_PORT]}")
TypeError: 'NoneType' object is not subscriptable

Hi! Thanks for giving it a try, what did you fill in for the port (0 is not allowed, it needs to be a open port)? Also what version of the integration are you using?

I tried to use last beta. But, when I tried 3.11 version it worked good. Then I updated SIA to last beta, and now everything is working good.

I have a small annoying issue that is very specific so I doubt this is a common problem.

The back plate of my alarm panel (code panel?) is a bit loose so when I activate/deactivate the alarm Ajax often sends me a push notification saying that the back panel is open. This causes my Home Assistant to send an alarm triggered event. I have changed my code to only send this type of notification/event when state goes from armed_away to triggered so I don’t really think this should happen. Any idea?

Hi everyone, I have a problem.
I have installed SIA from HACS and when I go to add the integration by configuring the port and account I get an error “Unexpecter error”.
How can I solve it?
Thanks

Hi, guys. Do you now is there any chance to add a Ajax motion sensor support to this supercool plug-in ?

With the SIA protocol, that is not possible by default, I think there were some people who replicated that by splitting each sensor into a zone and then having that zone armed, which causes it to trigger a “alarm” when a door is opened, the same might work with motion sensors.

Alarm status updates in HA fails when Hub(zone) is disarmed/armed by automatic scenario (from Ajax).

1 Like

Which version are you using?

I’m using v0.3.11

Try installing the beta (v0.5.0-beta.5) I think I solved this in a earlier beta, but since the official integration is close I will likely not fix the 0.3 versions for that.

1 Like

I updated to v0.5.0-beta.5, but the situation didn’t change. Manual Arming/Disarming works, automatic (Ajax scenario) - doesn’t.
To summarize - this integration works ONLY if the user arms/disarms the Hub, not with Scenarios, unfortunately. Can you fix this?

Could you then turn on logging to see which event code the alarm sends for those events (check earlier in this thread for the log setup)?

Should this be enough?

logger:
  default: error
  logs:
    custom_components.sia: debug 
    pysiaalarm: debug

I have the following in my logs constantly (even though I arm/disarm manually & status is changing in lovelace)

2021-05-07 09:45:54 DEBUG (MainThread) [pysiaalarm.event] Content matches: {'account': '12345', 'ti': None, 'id': None, 'ri': '0', 'code': 'RP', 'message': '0000', 'xdata': None, 'timestamp': '06:45:59,05-07-2021'}

Where can I get event codes from?

the RP messages are basically the heartbeat, so you can ignore those, they are triggered by the Monitoring station ping interval you set on in your alarm and in the integration, based off that your entities might become unavailable if there is not update within that time. The other codes are the ones you need to look for, you can see the codes that Ajax uses here: SIA Codes, OS Malevich 2.8/2.9/2.10. In the integration a number of those are mapped to the right HA variant, here: Code consequences. So let me know if you miss something there!

OK, I got the following.

armed manually
2021-05-07 10:11:05 DEBUG (MainThread) [pysiaalarm.base_server] Incoming line: DA440042"SIA-DCS"2171L0#12345[#12345|Nri4/CG501]_07:11:10,05-07-2021

disarmed manually
2021-05-07 10:11:50 DEBUG (MainThread) [pysiaalarm.base_server] Incoming line: 925B0042"SIA-DCS"2174L0#12345[#12345|Nri4/OG501]_07:11:55,05-07-2021

Armed by Scenario
2021-05-07 10:33:03 DEBUG (MainThread) [pysiaalarm.base_server] Incoming line: C08E0040"SIA-DCS"2213L0#12345[#12345|Nri4/CB0]_07:33:09,05-07-2021

Disarmed by Scenario
2021-05-07 10:34:03 DEBUG (MainThread) [pysiaalarm.base_server] Incoming line: 1B6A0040"SIA-DCS"2217L0#12345[#12345|Nri4/OB0]_07:34:09,05-07-2021

Would you please advise what can be wrong?
I can’t match my codes to the ones in documents you linked to.

Thanks, those are new!
For now the easiest is for you to add these four lines in the code_consequences in your custom_components folder:

"OG": STATE_ALARM_DISARMED,
"OB": STATE_ALARM_DISARMED,
"CG": STATE_ALARM_ARMED_AWAY,
"CB": STATE_ALARM_ARMED_AWAY,

I’ll add them eventually, but don’t have time now!

It works, thanks!
By the way, is it possible to retrieve the Ajax status after HA reboot? (it normally does not report correct status, I know that SIA is a passive protocol, but maybe there’s some way to query hub status manually)