Ajax alarm system

I managed to find the component. So far so good.
But my errorlog i filled with these;

2020-06-12 14:31:32 WARNING (MainThread) [pysiaalarm.base_sia_server] Last line:D02C0054"*NULL"0000L0#346EC[80A0860CF3623F2C505289ABE45A71118B3D7544D08FF1B32208564114D6AE98 could not be parsed as a SIAEvent.

That is a strange one, it doesn’t follow the exact SIA pattern, that should be 4 characters CRC, four characters length, and then either *SIA-DCS for a encrypted message or SIA-DCS for unencrypted, yours shows NULL instead of SIA-DCS which is why the parsing fails, what kind of system is it?

An Ajax Hub FW 2.8.2

Ok, tried with a different port and account and now it’s working

is there any news on compatibility with home assistant? thanks

That is great to hear @Mathias_Jensen, seems that was in a bug in or did you put your Ajax to Ajax Translator instead of SIA Protocol? Let me know, there might be more information through that channel, so I might want to investigate that one!

What do you mean with compatibility?

integrable in home assistant. With the possibility of arming / disarming, etc.

Well, the custom component integrates it, it is waiting for review before being merged into HA itself, the used protocol does not allow arming/disarming so that is not going to happen with the current method, maybe if ajax releases an API that might become possible.

Such an amazing component you have here - controlling things based on the alarm status is awesome. Thanks for your hard work on this!

I’m running v. 0.2.4 and everything is working perfectly. Should I remove this integration and re-configure it all once the integration can be found under Supervisor > Add-on store?

Hi Eduard.

This looks amazing, but I have a different brand Alarm system that im testing with your component. I use an ATS1000A-IP-SM Alarm. And it looks like it supports (?) SIA:

image

But i am not able to get any messages from the Alarm to Home Assistant. The only logging I get is:

2020-06-18 10:53:01 ERROR (Thread-3) [custom_components.sia] TCP: Handle: last line  gave error: [Errno 104] Connection reset by peer
2020-06-18 10:53:09 ERROR (Thread-3) [custom_components.sia] TCP: Handle: last line  gave error: [Errno 104] Connection reset by peer
2020-06-18 10:53:36 ERROR (Thread-3) [custom_components.sia] TCP: Handle: last line  gave error: [Errno 104] Connection reset by peer

There is another great piece of software developed here; https://github.com/tdeckers/utcar, (but this works via XSIA). I can get messages read from it:

Message:  01010052"SIA-DCS"0115R0001L0001[#006969|NUA011*'HA Hal'NM]2E1E7D6B0835AF0B|#000144
{{13813216801273768443 13032136593017 0xdd6220} 0115 0001 0001 006969 UA 011}

Can you tell me if these are messages your component should support?

Very cool that you’re testing it, it seems it works but the last step of the sia protocol is to send an acknowledgement back to the sending device (your alarm) and when that device does not wait for the response the connection reset message is usually given. Which version of the sia component are you using? and please turn on debug logging for the component (in your configuration.yaml add this

logger:
  default: warning
  logs:
    custom_components.sia: debug 

I enabled the debug logging already. I tried both OH+SIA and OH+XSIA but with the same results. I am not sure what the exact SIA version it is that the alarm uses and if it is compatible. Can we check if the messages are correct somehow? The only logs i get are those:

2020-06-18 15:53:01 ERROR (Thread-3) [custom_components.sia] TCP: Handle: last line  gave error: [Errno 104] Connection reset by peer
2020-06-18 15:53:09 ERROR (Thread-3) [custom_components.sia] TCP: Handle: last line  gave error: [Errno 104] Connection reset by peer
2020-06-18 15:53:36 ERROR (Thread-3) [custom_components.sia] TCP: Handle: last line  gave error: [Errno 104] Connection reset by peer

No other logs are displayed. Can it be that my alarm does not do anything with the acknowledgement or it is send to late?

If i look at the utcar software there is also something of an ack mechanism in there:

	ack := []byte("ACK\r")
	ack = append(ack, []byte{0, 0, 0, 0}...)
	encryptedAck := Encrypt3DESECB(ack, key)
	n, err = c.Write(encryptedAck)
	if err != nil {
		log.Panic(err)
	}

So it should work as you describe, but i cannot figure out why the component doesn’t log anything else.

hmm strange and is that with the newest beta version (see here: Ajax alarm system)?

Now i have installed the latest beta (v0.3.2b), but now even less logging :thinking:. I am wondering if my setup is done correctly:

image

After the config flow it gives the following:
image

The sensors are not updated and no further logging to be found, even after a reboot.

so the component actually waits for messages from the alarm system, so if there is nothing happening, then you wouldn’t see anything change, that is how the protocol works. However in the ajax system that I have there is a setting for the ping_interval, which is basically the alarm system letting a monitoring station now it is still online, is that set somewhere in your alarm as well?

These are all the available settings on the Alarm:

image

You can see that in the Utcar docker container i used, there is a ‘Heartbeat’ recieved every minute so the Alarm works. Should that not be visible in the component logging normally?

I also tried setting/ triggering the alarm but no go :thinking:.

Hello

An API exist but it is necessary to obtain specific access from ajax

I want to share my few lines for managing Ajax with esp32 board + this SIA integration.
Big thanks to @fireon and @eavanvalkenburg

Will be happy if it helps someone.
https://github.com/akarpenkoua/ajax-spacecontrol-esphome

4 Likes

Thanks for the kudos and happy that it helped!

PS. Your repo on Github seems to be private so the link reports a 404 :slight_smile: