Hi @phier,
the “last_message” number is the Ajax device number that you can find with Ajax apps, at the bottom of the detailed informations of each sensor.
At the same time, the “last_code” two-character attribute is the “SIA event code” and you can find the long textual description at the following link : SIA Codes, OS Malevich 2.8/2.9/2.10/2.11/2.12 - Google Sheets
You just have to use once each control and check last_message value. Then you will know who has used a specific control (Space control, Ajax app, keyboard, etc.)
thats incorrect statement;
as @kolia stated the “last_message” number represents the ajax user ID.
@kolia thanks
John,
if you need just check the arm/disarm of the Ajax alarm, yes, really the “last_message” value is a value related to SpaceControl device name as defined into the Ajax app (you can find it at the bottom of detailed information page of the SpaceControl configuration page on the app).
The SIA code (reported in the “last_code” value) for the “night mode” alarm activation will be NL ("the long description is “Night mode activated using [sensor]”) or NP (defined as “not a standard code”).
The SIA “last_code” value for disarm will be OP (“Disarmed using [sensor]”) and again also for that the “last_message” value will be related to the SpaceControl device defined into Ajax app.
But if you need (I did it) check also other event (like door opening/closing or motion detection …) coming from the sensors, you’ll find in the “last_code” the specific event type and in the “last_message” the number identifying the triggering sensor and in this case, again, you can discover the sensor related to the event reading the device number reported at the bottom of the of detailed information page for each sensor in the Ajax app.
This is my experience and I worked on that to “interpret” the meaning of SIA event coming to HA from Ajax hub, leveraging on the material published at the link I mentioned in my previous post.
@alpat59 its confusing .
the last_message value just represent user who armed/disarmed ajax. that was requested. and that value is not space control related…
the value i am getting is 501/502. … from nfc tags…
I apologise if I’m creating confusion…
Anyway what I wrote is what I see in my Ajax installation and what I did to obtain inside HA the best visibility of the states of the Ajax alarm system.
I attach a picture of the SpaceControl configuration to explain it better
Hello,
Since an update of ios application (v2.22.2, build #2098), I don’t have state of alarm in HA (unavailable).
Have you noticed it too?
Thanks
Ok, it’s very strange. I have this error:
- Code not found, replying with DUH to account: AAAAAXXXXXXXX
- Last line could not be parsed succesfully. Error message: No matches found, event was not a SIA or ADM Spec event, line was: %s. Line: /*Cookie: mstshash=Administr
- Last line could not be parsed succesfully. Error message: No matches found, event was not a SIA or ADM Spec event, line was: %s. Line: GET / HTTP/1.1 Host: 77.151.160.54:8888
Hi! Thanks for this explanation, it makes it pretty clear. One quick question, though: the other sensor events (door open/close…) only get communicated via SIA when the alarm is in home or away mode, but not on disarm mode, right?
thanks!
/Nacho
No need to look at this. Just had to look at what value is displayed by last_message. There is a directlink between user and the device that has been used to control the alarm and that returns a unique id:
user 1 using Space Control → 3, using Ajax App → 505, using PC Ajax Pro App 501
user 2 using Space Control → 502, etc.
I noticed that Space Control last_message for user 1 is the same as the one that is advertised in the App, whereas Space Control last_message for user 1 is not the same as the one that is advertised in the App which is in that case 502. Why? May because user 1 is admin, and user 2 is a regular user?
So by looking at last_message value we may infer who controlled the alarm with a specific device, which is to me the best approach since one can use quite a number of devices to control the alarm
right. What do you call Home? To my knowledge, there are 3 states: armed_away, armed_night and disarmed, isn’t it?
Yeah, sorry, old visonic mind. Yes, I mean in armed_ away and armed_night but not in disarmed. I wish there was a way to get events even in disarmed mode. But that is what we are trying to accomplish if we get a native integration…
States available on Automations for my Ajax System are:
"Arming, “Alarm Disarmed” and “Alarm triggered”.
No “Armed” trigger available.
On “States” I can see OG while disarmed, and CG while armed.
Should I add something manually? I bypassed the problem by using a “NOT” condition but this does not seem a proper solution!
yes and 502 is like a User-code ; similarly for nfc tags etc.
assuming there is no fix for it so far?
no, SIA is a quite limited protocol so there are no updates outside the ones currently there, the only workaround for something like this is to put individual sensors in a seperate zone and always have that armed, but that defeats the purpose of the whole alarm since a device can only be in one zone afaik.
That is a HA issue with the way a alarm_control_panel device is shown, please raise an issue there, not specific to SIA.
This is interesting, but since the last_message field is completely open, it is up to a manufacturer to decide what to put in that field, you could send feedback to Ajax that they put something else in there instead of just that code, or more clearly document what they send.
@eavanvalkenburg : Hello, for many days, the state of alarm is “unavailable”.
I tried to delete and reinstall my configuration but the problem is still here.
How can I fix the problem?
I use:
Home Assistant 2022.12.7
Supervisor 2022.11.2
Operating System 9.4
Log:
Logger: pysiaalarm.base_server
Source: runner.py:120
First occurred: 13:42:23 (969 occurrences)
Last logged: 16:38:21
- Code not found, replying with DUH to account: XXXXXXXXX
- Last line could not be parsed succesfully. Error message: No matches found, event was not a SIA or ADM Spec event, line was: %s. Line: {w|!=d(4DY\r/+a /5 4
- Last line could not be parsed succesfully. Error message: No matches found, event was not a SIA or ADM Spec event, line was: %s. Line:
Thanks in advance