schmupu / ioBroker.sia

SIA server for burglar alarm system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Required SIA fields Missing

werywin opened this issue · comments

Hi Thorsten, Thanks for this interesting adapter. I have a Alarm host compliant with SIA DC09 (as claimed) from a Chinese manufacturer and I am testing it with SIA adapter. When I triggered an alarm from the host, I didn't receive any data in Objects and the following are the logs:

sia.0	2019-06-07 17:22:07.584	info	connection from 192.168.137.77:41184 closed
sia.0	2019-06-07 17:22:07.578	info	sending to 192.168.137.77:41184 following message: AC4E0025"NAK"0000R0L0A0[]_11:52:07,05-07-2019
sia.0	2019-06-07 17:22:07.578	info	Created NAK : <0x0A>AC4E0025"NAK"0000R0L0A0[]_11:52:07,05-07-2019<0x0D>
sia.0	2019-06-07 17:22:07.578	info	Required SIA fields missing
**sia.0	2019-06-07 17:22:07.578	info	received from 192.168.137.77:41184 following message: CEF0003F"SIA-DCS"0001L#7303658550[#7303658550|NBA4]_11:52:09,05-07-2019**

Alarm host IP is 192.168.137.77
Account: 7303658550

Could you possibly guess, what may be going wrong here?

Hello,
could you please activate the debug modus for the sia adapter. For that, you have to go on the tab instance. Click on expert modus and now you can choose the debug modus for the sia instance.
Now send another SIA message. Please send me the debug log.

Thanks for a quick response. I cannot find the 'Expert Modus' on the 'Instance' tab, maybe I'm not looking at wrong place, please suggest

That shall help:

Bildschirmfoto 2019-06-07 um 16 18 31

I got it, sorry for the trouble. Will do it and send the logs shortly

no problem!

The debug log is attached below:

2019-06-07 19:59:30.504  - debug:  sia.0 received from 192.168.137.106:23255 following data:  {"type":"Buffer","data":[10,53,57,70,55,48,48,51,70,34,83,73,65,45,68,67,83,34,48,48,48,49,76,35,55,51,48,51,54,53,56,53,53,48,91,35,55,51,48,51,54,53,56,53,53,48,124,78,80,65,49,93,95,49,52,58,50,57,58,52,50,44,48,54,45,48,55,45,50,48,49,57,13,0]}
2019-06-07 19:59:30.504  - info:  sia.0 received from 192.168.137.106:23255 following message:  59F7003F"SIA-DCS"0001L#7303658550[#7303658550\|NPA1]_14:29:42,06-07-2019
2019-06-07 19:59:30.505  - debug: sia.0 parseSIA : {}
2019-06-07 19:59:30.505  - info: sia.0 Required SIA fields missing
2019-06-07 19:59:30.530  - info: sia.0 Created NAK : <0x0A>5CA70025"NAK"0000R0L0A0[]_14:29:30,05-07-2019<0x0D>
2019-06-07 19:59:30.530  - debug:  sia.0 nackSIA :  {"type":"Buffer","data":[10,53,67,65,55,48,48,50,53,34,78,65,75,34,48,48,48,48,82,48,76,48,65,48,91,93,95,49,52,58,50,57,58,51,48,44,48,53,45,48,55,45,50,48,49,57,13]}
2019-06-07 19:59:30.530  - info: sia.0 sending to 192.168.137.106:23255 following message: 5CA70025"NAK"0000R0L0A0[]_14:29:30,05-07-2019
2019-06-07 19:59:30.535  - info: sia.0 connection from 192.168.137.106:23255 closed

Okay, there is an error in the SIA message of your alarm system. The last sign must be 0x0D (13). In your message it is 0x00 (0). Do you think that there is a chance you alarm system vendor will change the protocol like it is describe in the SIA specification?
If not I would offer you a work around and delete all appending 0x00

Message:

[10,53,57,70,55,48,48,51,70,34,83,73,65,45,68,67,83,34,48,48,48,49,76,35,55,51,48,51,54,53,56,53,53,48,91,35,55,51,48,51,54,53,56,53,53,48,124,78,80,65,49,93,95,49,52,58,50,57,58,52,50,44,48,54,45,48,55,45,50,48,49,57,13,0]

There is an other error too. In the message, after L has to be a number an not a #

""SIA-DCS"0001L#7303658550[#7303658550|NPA1]_14:29:42,06-07-2019"

Example:

""SIA-DCS"0001L1234#7303658550[#7303658550|NPA1]_14:29:42,06-07-2019"

It is poor implementation of SIA DC 09 by the manufacturer, Could something be possibly be done about it?

Yes it is poor 👎 but I will build you a work around tonight.

Thanks Thorsten, although it's rather a lame question but could you commercially develop us something which act as an IP receiver from these poorly SIA implemented alarm panels and outputs to industrial grade ARC (Alarm receiving Center) software

Okay you can test the version. You go in ioBroker to adapter tab. Click to 'load from external url'. Choose 'sia' from the list and install. Afterwards you have to restart the instance. the version will bei 1.0.3.
I hope it works?

Thanks though, it still gives the error, debug log attached:

2019-06-07 21:06:36.302  - debug: sia.0 system.adapter.admin.0: logging false
2019-06-07 21:09:35.320  - debug:  sia.0 received from 192.168.137.106:39208 following data:  {"type":"Buffer","data":[10,66,66,56,54,48,48,50,67,34,78,85,76,76,34,48,48,48,49,76,35,55,51,48,51,54,53,56,53,53,48,91,93,95,49,53,58,51,57,58,51,56,44,48,54,45,48,55,45,50,48,49,57,13,0]}
2019-06-07 21:09:35.320  - info: sia.0 received from 192.168.137.106:39208 following message: BB86002C"NULL"0001L#7303658550[]_15:39:38,06-07-2019
2019-06-07 21:09:35.321  - debug: sia.0 parseSIA : {}
2019-06-07 21:09:35.321  - info: sia.0 Required SIA fields missing
2019-06-07 21:09:35.321  - info: sia.0 Created NAK : <0x0A>3C3B0025"NAK"0000R0L0A0[]_15:39:35,05-07-2019<0x0D>
2019-06-07 21:09:35.322  - debug:  sia.0 nackSIA :  {"type":"Buffer","data":[10,51,67,51,66,48,48,50,53,34,78,65,75,34,48,48,48,48,82,48,76,48,65,48,91,93,95,49,53,58,51,57,58,51,53,44,48,53,45,48,55,45,50,48,49,57,13]}
2019-06-07 21:09:35.322  - info: sia.0 sending to 192.168.137.106:39208 following message: 3C3B0025"NAK"0000R0L0A0[]_15:39:35,05-07-2019
2019-06-07 21:09:35.325  - info: sia.0 connection from 192.168.137.106:39208 closed
2019-06-07 21:09:55.184  - debug: sia.0 system.adapter.admin.0: logging true
2019-06-07 21:10:10.145  - debug:  sia.0 received from 192.168.137.106:11174 following data:  {"type":"Buffer","data":[10,51,51,48,68,48,48,51,70,34,83,73,65,45,68,67,83,34,48,48,48,49,76,35,55,51,48,51,54,53,56,53,53,48,91,35,55,51,48,51,54,53,56,53,53,48,124,78,80,65,49,93,95,49,53,58,52,48,58,49,48,44,48,53,45,48,55,45,50,48,49,57,13,0]}
2019-06-07 21:10:10.146  - info:  sia.0 received from 192.168.137.106:11174 following message:  330D003F"SIA-DCS"0001L#7303658550[#7303658550\|NPA1]_15:40:10,05-07-2019
2019-06-07 21:10:10.146  - debug: sia.0 parseSIA : {}
2019-06-07 21:10:10.146  - info: sia.0 Required SIA fields missing
2019-06-07 21:10:10.146  - info: sia.0 Created NAK : <0x0A>46BB0025"NAK"0000R0L0A0[]_15:40:10,05-07-2019<0x0D>
2019-06-07 21:10:10.146  - debug:  sia.0 nackSIA :  {"type":"Buffer","data":[10,52,54,66,66,48,48,50,53,34,78,65,75,34,48,48,48,48,82,48,76,48,65,48,91,93,95,49,53,58,52,48,58,49,48,44,48,53,45,48,55,45,50,48,49,57,13]}
2019-06-07 21:10:10.147  - info: sia.0 sending to 192.168.137.106:11174 following message: 46BB0025"NAK"0000R0L0A0[]_15:40:10,05-07-2019
2019-06-07 21:10:10.150  - info: sia.0 connection from 192.168.137.106:11174 closed

you can see the version in the logfile, if you start the dishwasher adapts. You shall see version 1.0.3

Yes, it is on V1.0.3

I' ll have a look later because I'm on the way to the balticsea.

I found the error. Could you please try it again. You have to load the Adapter in version 1.0.3 again and restart the instance

Thanks Thorsten, although it's rather a lame question but could you commercially develop us something which act as an IP receiver from these poorly SIA implemented alarm panels and outputs to industrial grade ARC (Alarm receiving Center) software

We can talk about it, please write me an email ( thorsten @ stueben.de )

One of our technical guy has found that this alarm system is working fine with a traditional SIA IP receiver which is using SIA DC09 2012 version. The older IP receiver using SIA DC09 2007 version was not receiving alarms. Are you sure your adapter is compatible with DC09 2012 version?

I am used the SIA DC09 2013 description.
Did you try the new version of 1.0.3? That should hopefully work now?

Please take a look in here: https://www.yumpu.com/en/document/read/47594214/dc-09-preparing-for-ansi-public-review-security-industry-
Chapter 5. The Message has to be end with 0x0D (, 13) and not 0x00. And the L is required and followed by number(s) and not hashtag.

Hi! I have same error, but i have popular chinees alarm G90B-PLUS 2G GSM system with sia support. Can i hope ?
Full log:
https://pastebin.com/NK3E4Xir

2020-03-09 15:34:00.061 - debug: sia.0 (430) received from 192.168.1.162:24592 following data: {"type":"Buffer","data":[10,55,56,70,67,48,48,51,66,34,83,73,65,45,68,67,83,34,48,48,48,49,76,35,50,50,51,51,52,52,53,53,91,35,50,50,51,51,52,52,53,53,124,78,67,81,49,93,95,49,52,58,51,51,58,53,51,44,48,50,45,48,57,45,50,48,50,48,13,0]}
2020-03-09 15:34:00.066 - info: sia.0 (430) received from 192.168.1.162:24592 following message: 78FC003B"SIA-DCS"0001L#22334455[#22334455|NCQ1]_14:33:53,02-09-2020
2020-03-09 15:34:00.068 - debug: sia.0 (430) data :
78FC003B"SIA-DCS"0001L#22334455[#22334455|NCQ1]_14:33:53,02-09-2020
2020-03-09 15:34:00.069 - info: sia.0 (430) SIA Message : <0x0A>78FC003B"SIA-DCS"0001L#22334455[#22334455|NCQ1]_14:33:53,02-09-2020<0x0D>
2020-03-09 15:34:00.069 - debug: sia.0 (430) parseSIA sia.str : "SIA-DCS"0001L#22334455[#22334455|NCQ1]_14:33:53,02-09-2020
2020-03-09 15:34:00.071 - debug: sia.0 (430) parseSIA regex : {"data":{"type":"Buffer","data":[10,55,56,70,67,48,48,51,66,34,83,73,65,45,68,67,83,34,48,48,48,49,76,35,50,50,51,51,52,52,53,53,91,35,50,50,51,51,52,52,53,53,124,78,67,81,49,93,95,49,52,58,51,51,58,53,51,44,48,50,45,48,57,45,50,48,50,48,13]},"lf":10,"len":59,"crc":30972,"crcformat":"hex","cr":13,"str":""SIA-DCS"0001L#22334455[#22334455|NCQ1]_14:33:53,02-09-2020","calc_len":59,"calc_crc":30972}
2020-03-09 15:34:00.072 - debug: sia.0 (430) parseSIA : {"data":{"type":"Buffer","data":[10,55,56,70,67,48,48,51,66,34,83,73,65,45,68,67,83,34,48,48,48,49,76,35,50,50,51,51,52,52,53,53,91,35,50,50,51,51,52,52,53,53,124,78,67,81,49,93,95,49,52,58,51,51,58,53,51,44,48,50,45,48,57,45,50,48,50,48,13]},"lf":10,"len":59,"crc":30972,"crcformat":"hex","cr":13,"str":""SIA-DCS"0001L#22334455[#22334455|NCQ1]_14:33:53,02-09-2020","calc_len":59,"calc_crc":30972,"id":"SIA-DCS","seq":"0001","rpref":"","lpref":0,"act":"22334455","pad":"","data_message":"#22334455|NCQ1","data_extended":"","ts":"14:33:53,02-09-2020"}
2020-03-09 15:34:00.072 - info: sia.0 (430) Required SIA fields missing
2020-03-09 15:34:00.074 - info: sia.0 (430) Created NAK : <0x0A>E2490025"NAK"0000R0L0A0[]_14:34:00,02-09-2020<0x0D>
2020-03-09 15:34:00.074 - debug: sia.0 (430) nackSIA : {"type":"Buffer","data":[10,69,50,52,57,48,48,50,53,34,78,65,75,34,48,48,48,48,82,48,76,48,65,48,91,93,95,49,52,58,51,52,58,48,48,44,48,50,45,48,57,45,50,48,50,48,13]}
2020-03-09 15:34:00.075 - info: sia.0 (430) sending to 192.168.1.162:24592 following message: E2490025"NAK"0000R0L0A0[]_14:34:00,02-09-2020
2020-03-09 15:34:00.094 - info: sia.0 (430) connection from 192.168.1.162:24592 closed