Thanks for your support!
In your opinion what is the easy way to achieve arm or disarm the ajax alarm… Thanks again
Hi everyone,
My SIA integration in HomeAssistant doesn’t work anymore since few weeks (it worked well the first time I installed SIA).
All entities are now unavailable
In the logs, I have the same thing 5 to 6 times per minute :
2022-09-24 18:46:40.530 WARNING (MainThread) [pysiaalarm.base_server] Code not found, replying with DUH to account: 000
I tried to remove and reinstall SIA, but it still doesn’t work.
Can anyone help me ?
Thanks !
P.S. : Sorry for my bad english
Please have a look to this thread: Arm/disarm ajax. Anything with relays can do the trick. On a personal side I did not use ESP32 because I had 3 available relays from a different gear (IPX800v3)
It is working without a glitch
Hello
I have the same difficulties between the plugin Ajax in Jeedom and HASSIO.
I am able to share the status of the sensors in Ajax through jmqtt but I am not able to modify the alarm status through mqtt commands in Hassion
Any ideas ?
In order to give you an example which is NOT jeedom based but based on Domoticz please find here the code to make the alarm panel acting on the alarm:
In configuration.yaml
mqtt: !include mqtts.yaml
In mqtts.yaml, among other lines:
alarm_control_panel: !include alarms_mqtt.yaml
and in alarms_mqtt.yaml
- name: "Alarme"
unique_id: 610
object_id: 610
code_arm_required: false
code_disarm_required: false
code_trigger_required: false
state_topic: "domoticz/out/610"
value_template: >
{% set value_map = {
"0": "disarmed",
"10": "armed_away",
"20": "armed_night",
}
%}
{{ value_map[value_json.svalue1] }}
payload_arm_night: "20"
payload_disarm: "0"
payload_arm_away: "10"
command_topic: "domoticz/in"
command_template: >
{"command": "switchlight", "idx": 610, "switchcmd": "Set Level", "level": "{{action}}"}
retain: true
qos: 0
I hope it will help to understand how the alarm panel works and conversely change its status if it has been changed on the remote system.
I really would like to have the following possible: My home alarm system sends the SIA messages to two different IP addresses: my Alarm Recieving Centre as well as my Home Assistant instance. As far as I know this is not possible right now. I checked witch my alarm system, it can only send to one IP address.
A perfect solution would be that the Ajax Alarm Sytem integration can duplicate the messages and relay them to another IP. Is this possible already?
That is quite an interesting suggestion, indeed the SIA protocol sends to 1 IP and can have a secondary if the first doesn’t respond. I could definately do something with that, but it might even be easier to build a small container that just duplicates the signal, the big question is what do you respond to the actual alarm (because a response is expected) would it be one of the two or the first to respond… something to think about!
Hello at all! I have the official Ajax documentation API, someone is interested to help me to develop a working integration?
Don’t you need a token or something similar to get access to the API?
Yes, i have it…
You need a token for make the requests
Hi,
I have SIA integration, and if I have activated in armed mode and HA restarts, after this restart SIa alarms become unknown if I deactivate the alarm
I have to activate armed mode to go back SIA status to the right situation.
It’s only , when I have activate SIa and I restart the HA and after taht deactivate the alar
m. any idea how to fix this behaviour ?
Thanks.
That’s expected behaviour, SIA doesn’t update ever check in, just when the state changes. If your worried you may have to use MQTT alarm as that can retain the state.
It would be amazing if the newer API allows access to things like door sensors, it’s such a pity to have all of that data and not be able to use it!
I know, spam Ajax about it, would love to build it especially if they provide a python sdk!
UPDATE: i have obtained the X API token from ajax, now i can use the api documentation for compile a node red automation for manage the ajax hub! I’ve tried to get the status, arm and disarm and it works
Could you please tell us what is the process to get a token and how to access to the api documentation ?
For get the token the process is this:
REST API USAGE
A simple document with the most-wanted Ajax APIs
To integrate Ajax Systems API is strongly recommended to use the following subset of method in order to:
Arm the system
Disarm the system
Zone bypass / unbypass
Enable / Disable system integrity checks
Login
Before doing your job you need to login on the API server. You need :
X-Api-Key ( form Ajax Systems)
Login (the email used during registration )
passwordHash (the corresponding password )
curl -X POST “https://api.ajax.systems/api/login” -H “accept: application/json” -H "X-Api-Key: " -H “Content-Type: application/json” -d “{ “login”: “”, “passwordHash”: “”, “userRole”: “USER”}”
The system responds with:
Sessiontoken
usedId (fixed for the specific user)
refreshToken
Like in the following…
{
“sessionToken” : “k3XRd0fP3Muka8Sliy89ZIfIs3c”,
“userId” : “3344FF96”,
“refreshToken” : “FOKPH0JeJL1DSXSbvYuVicH5YIc”
}
REFRESH
Every 15 minutes you have to refresh the session
curl -X POST “https://api.ajax.systems/api/refresh” -H “accept: application/json” -H "X-Api-Key: -H “Content-Type: application/json” -d “{ “userId”: “3344FF96”, “refreshToken”: “FOKPH0JeJL1DSXSbvYuVicH5YIc”}”
{
“sessionToken” : “B_vbg5SCEzPc1GCma2Xhvk8vS98”,
“userId” : “3344FF96”,
“refreshToken” : “hUjTAoaEhOPcUor4fVtNZm2VXiQ”
}
GET USER INFO
Just to get back the user infos
curl -X GET “https://api.ajax.systems/api/user/3344FF96” -H “accept: application/json” -H "X-Api-Key: " -H “X-Session-Token: B_vbg5SCEzPc1GCma2Xhvk8vS98”
{
“phone” : “+…”,
“firstName” : “…”,
“language” : “it”,
“agreementVersion” : 101,
“login” : “”,
“imageUrls” : null,
“attachedCompanyId” : “”
}
GET LIST OF HUBS ACCOUNTED BY SPECIFIC USER
This request returns the list of hubs accounted on a specific user
curl -X GET “https://api.ajax.systems/api/user/3344FF96/hubs” -H “accept: application/json” -H "X-Api-Key: " -H “X-Session-Token: B_vbg5SCEzPc1GCma2Xhvk8vS98”
[ {
“hubId” : “…”,
“hubBindingRole” : “MASTER”
}, {
“hubId” : “…”,
“hubBindingRole” : “MASTER”
} ]
MASTER stands for an Admin user type.
GET HUB STATUS
This request returns the status of a specific hub.
It contains also the arming status…
curl -X GET “https://api.ajax.systems/api/user/3344FF96/hubs/” -H “accept: application/json” -H "X-Api-Key: " -H “X-Session-Token: bJNybWMquPQsWn32p8yYnn_KtTA”
{
“state” : “DISARMED”, <------ ARMED, DISARMED, NIGHT_MODE
“color” : “WHITE”,
“timeZone” : “EUROPE_ROME”,
“name” : “Valigetta Demo”,
“id” : “…”,
“warnings” : {
“hub” : 3,
“allDevices” : 3
},
…
}
ARM / DISARM COMMAND
To arm or disarm the system
curl -X PUT “https://api.ajax.systems/api/user/3344FF96/hubs/000BF55D/commands/arming” -H “accept: application/json” -H "X-Api-Key: " -H “X-Session-Token: bJNybWMquPQsWn32p8yYnn_KtTA” -H “Content-Type: application/json” -d “{ “command”: “DISARM”, “ignoreProblems”: true}”
The response is 200 in case of success, 40x otherwise
RESTORE ALARMS
curl -X PUT “https://api.ajax.systems/api/user/3344FF96/hubs/000BF55D/commands/requestRestoreAfterAlarmCondition” -H “accept: application/json” -H “X-Session-Token: jBAQTkbOlQEFxmXc_XSfEiR61k4” -H "X-Api-Key: "
The response is 200 in case of success, 40x otherwise
GET DEVICES LIST
Requests the list of the devices currently linked on the hub
curl -X GET “https://api.ajax.systems/api/user/3344FF96/hubs/000BF55D/devices” -H “accept: application/json” -H “X-Session-Token: jBAQTkbOlQEFxmXc_XSfEiR61k4” -H "X-Api-Key: "
Returns some thing like:
[ {
“id” : “004CA307”,
“deviceType” : “HomeSiren”,
“deviceName” : “Sirena da Interno”,
“roomId” : “00000001”,
“groupId” : “00000002”,
“color” : “WHITE”,
“online” : true
},
…
]
BYPASS / UNBYPASS of one zone
curl -X POST “https://api.ajax.systems/api/user/3344FF96/hubs//devices//command” -H “accept: application/json” -H "X-Session-Token: " -H "X-Api-Key: " -H “Content-Type: application/json” -d “{ “command”: “”, “deviceType”: “LeaksProtect”}”
in case of Bypass of the zone → ENABLE_ENGINEER_BYPASS
in case of Unbypass of the zone → DISABLE_BYPASS
This is the complete list of the commands:
CONNECTION_TEST_START, CONNECTION_TEST_STOP, DETECTION_TEST_START, DETECTION_TEST_STOP, MUTE, SWITCH_ON, SWITCH_OFF, SOUND_TEST_START, UNLOCK_DEVICE, FIRE_SENSOR_TEST, MOTION_OUTDOOR_DETECTION_TEST_START, MOTION_OUTDOOR_UPPER_MOTION_SENSOR_DETECTION_TEST_START, MOTION_OUTDOOR_LOWER_MOTION_SENSOR_DETECTION_TEST_START, MOTION_OUTDOOR_ANTIMASKING_MOTION_SENSOR_DETECTION_TEST_START, MULTI_TRANSMITTER_POWER_RESET, DISABLE_BYPASS, ENABLE_ENGINEER_BYPASS, ENABLE_TAMPER_BYPASS, RESET_PASSWORD, RESET_FORCE_DISARM_PASSWORD
GET DEVICE INFO
curl -X GET “https://api.ajax.systems/api/user//hubs//devices/{deviceId}” -H “accept: application/json” -H “X-Api-Key: <>” -H “Content-Type: application/json” -H “X-Session-Token: <>”
Returns something like
{
“id” : “00472DA9”,
“deviceName” : “Contatto Magnetico”,
“roomId” : “00000001”,
“groupId” : “00000001”,
“deviceType” : “DoorProtectPlus”,
“color” : “WHITE”,
“temperature” : 20,
“signalLevel” : “STRONG”,
“tampered” : false,
“batteryChargeLevelPercentage” : 100,
“firmwareVersion” : “5.55.2.0”,
“online” : true,
“issuesCount” : 0,
“assignedExtender” : 0,
“cmsDeviceIndex” : 5,
“deviceTransmissionPowerMode” : 0,
“deviceTransmissionPowerModeValue” : “DEFAULT”,
“nightModeArm” : true,
“imageId” : 0,
“armDelaySeconds” : 0,
“alarmDelaySeconds” : 0,
“applyDelaysToNightMode” : false,
“verifiesAlarm” : true,
“confirmsAlarm” : “ENABLED”,
“state” : “PASSIVE”,
“malfunctions” : [ ],
“bypassState” : [ “ENGINEER_BYPASS_ACTIVE” ],
“alwaysActive” : false,
“extraContactAware” : false,
“reedContactAware” : true,
“shockSensorAware” : false,
“shockSensorSensitivity” : 7,
“ignoreSimpleImpact” : false,
“accelerometerAware” : false,
“accelerometerTiltDegrees” : 15,
“accelerometerTiltAlarmDelaySeconds” : 2,
“sirenTriggers” : [ “REED”, “EXTRA_CONTACT”, “TILT”, “SHOCK”, “SHUTTER_ALARM”, “SHUTTER_ONLINE” ],
“reedClosed” : true,
“extraContactClosed” : false,
“extraContactType” : null,
“rollerShutterSettings” : null,
“indicatorLightMode” : “STANDARD”,
“twoStageArmingRole” : null,
“rollerShutterSupported” : true,
“indicatorLightModeSupported” : true
}
API TOKEN MUST TO BE REQUIRED TO AJAX
do you need to pay for an enterprise subscription to get the X-API token? Or can you do it as a private user?
thanks!
is it from this page you got your token and access to the documentation? Ajax API request? It seems to me it is dedicated to large companies?