schmupu / iobroker.sia Goto Github PK
View Code? Open in Web Editor NEWSIA server for burglar alarm system
License: MIT License
SIA server for burglar alarm system
License: MIT License
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?
Hi, and 10x for sharing your parser
my alarm system sends the following message that fails in parsing
9F0D001A"SIA-DCS"0001L[#9999|NBA2]
here is the exact log lines
[2019-02-11T15:34:33.599] [DEBUG] sia - received from ::1:53662 following data: {"type":"Buffer","data":[10,57,70,48,68,48,48,49,65,34,83,73,65,45,68,67,83,34,48,48,48,49,76,91,35,57,57,57,57,124,78,66,65,50,93,13,0]}
console.js:7
[2019-02-11T15:34:33.600] [INFO] sia - received from ::1:53662 following message: 9F0D001A"SIA-DCS"0001L[#9999|NBA2]
any idea?
real thanks in advance.
Dear Adapter developer,
with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.
If something is not correct this is logged as 'warning' or 'info' log.
Please also make sure to update to the lastest @iobroker/testing dependency 2.5.4 or to accept the PR from Apollon77 for legacy testing!
Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.
For questions please refer to ioBroker/ioBroker.js-controller#1749
Please close the issue after you checked it.
Thank you very much for your support to get the best experience for the growing numbers of ioBroker users!
There is a rather clear schema for roles of states.
As I can see from here https://github.com/schmupu/ioBroker.sia/blob/master/lib/datapoints.js#L5
Roles defined wrong.
"value" cannot have a type "string" (only "number").
Can this state have type "number"? https://github.com/schmupu/ioBroker.sia/blob/master/lib/datapoints.js#L12
"Timestamp" has a role "date" or "value.time", depends on type of variable: "string" or "number".
Check the roles here: https://github.com/ioBroker/ioBroker/blob/master/doc/STATE_ROLES.md
Dear Adapter developer,
Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.
Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16
Please add both versions to the adapter testing which is executed on commits.
If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!
On questions please talk to us at ioBroker/ioBroker.js-controller#1138
Please close the issue after you checked it.
Thank you very much for your support!
Describe the bug
Trying to install the adapter and getting "fetchPackageMetaData error for [email protected] Cannot read property 'resolve' of undefined"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Getting the adapter added and ready to be configured
Screenshots & Logfiles
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '[email protected]',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--prefix',
1 verbose cli '/opt/iobroker'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session c2fa4b8b4a4bcd5d
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for [email protected] Cannot read property 'resolve' of undefined
8 timing stage:rollbackFailedOptional Completed in 10ms
9 timing stage:runTopLevelLifecycles Completed in 11315ms
10 verbose stack TypeError: Cannot read property 'resolve' of undefined
10 verbose stack at regFetch (/usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/index.js:88:23)
10 verbose stack at fetchPackument (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/packument.js:42:10)
10 verbose stack at packument (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/packument.js:20:10)
10 verbose stack at getManifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:22:10)
10 verbose stack at manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:13:10)
10 verbose stack at Object.manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/index.js:17:12)
10 verbose stack at Object.Fetcher#manifest [as manifest] (/usr/local/lib/node_modules/npm/node_modules/genfun/lib/genfun.js:15:38)
10 verbose stack at manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetch.js:23:18)
10 verbose stack at /usr/local/lib/node_modules/npm/node_modules/pacote/manifest.js:24:12
10 verbose stack at /usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:29:24
10 verbose stack at Promise._execute (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/debuggability.js:313:9)
10 verbose stack at Promise._resolveFromExecutor (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:488:18)
10 verbose stack at new Promise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:79:10)
10 verbose stack at _inflight (/usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:28:25)
10 verbose stack at /usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:22:14
10 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
11 verbose cwd /opt/iobroker
12 verbose Linux 4.14.72v7-aufs
13 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "[email protected]" "--loglevel" "error" "--prefix" "/opt/iobroker"
14 verbose node v12.20.1
15 verbose npm v6.14.10
16 error Cannot read property 'resolve' of undefined
17 verbose exit [ 1, true ]
Versions:
Hi,
I am working on an R&D project where i want to receive SIA messages in ioBroker and run a Node-RED workflow based on the message in the SIA message.
Because I don't have the hardware yet that will send out SIA messages, i would like to get it started with examples generated on http://s545463982.onlinehome.us/DC09Gen/
But they don't work; I have a "Required SIA Fields missing" message each time. Am I doing something wrong? Please see the screenshots attached. Any help is welcome! Thanks.
Paul
Hello,
I'm very interest by your work, however I have no nodejs experience, so I have no idea how to run this app. Can you provide installation steps please?
Thanks!
is this plugin available on node red or can be implemented in node red. there is a plugin based on this one but its not the same as it doesn't allow multiple SIA accounts on one port like the iobroker version.
Version: stable=1.0.3 (264 days old) => latest=1.0.4 (95 days old)
Installs: stable=71 (71%), latest=17 (17%), total=100
Click to edit
Dear Adapter developer,
with js-controller 3.2 and js-controller 3.3 some additional checks were added to make sure that created objects match to the specifications and also written state values match to the object definition.
If something is not correct this is logged as 'warning' or 'info' log.
Please take the time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn log there from these checks please adjust the adapter and fix the relevant cases.
For questions please refer to ioBroker/ioBroker.js-controller#1301
Additionally we are preparing Admin 5 which will have a completely rewritten UI. Please install Admin 5, activate that new UI and verify that the configuration of you adapter works as expected also there.
More informations on Admin 5 can be found in Forum https://forum.iobroker.net/topic/44282/test-adapter-admin-5-0-x-alpha-der-neuen-ui
Please close the issue after you checked it.
Thank you very much for your support!
I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:
https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/schmupu/ioBroker.sia
Thanks,
your automatic adapter checker.
P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info
I am an automatic service from ioBroker that searches adapters and makes suggestions.
I noticed that your adapter is not integrated in the ioBroker.discovery. Using the Discovery adapter, ioBroker can automatically find devices or suggest services to the user for installation. If possible I would live to see your adapter added there.
Some adapters have already been added and you can use them as blueprints. See: https://github.com/ioBroker/ioBroker.discovery You need to fork this project and then create a PR for your adapter to be added.
Basically the plugins can do HTTP calls, UDP discovery, MDNS, UPNP and will iterate over all devices found by IP scan and check local serial ports. If you want you can also add new discovery methods but please try to do that with at least dependencies as possible.
Then create one file under lib/adapters for your adapter to implement the detection and proposal of an instance to the user.
On questions, the other developers will support in the forum or via GitHub issues too.
If no detection is possible, simply close this issue and I won't bother you again. ;-)
Thanks,
your automatic adapter checker.
P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info
I am having an issue with account numbers that start with zeros. We are have a few panels that use account numbers with other SIA servers but can not use them because SIA adapter doesn't carry over the zeros. Any idea how to fix this.
Using version v1.0.4.
Thanks!
Hi,
the new js-controller 2.0 will come into latest repository in the next days and we want to make sure that all adapters are working well. We already did a 2 weeks Beta test and so some adapter were aleady checked and some needed slight adjustments.
You can find more information in ioBroker/ioBroker.js-controller#482 and in the ioBroker Forum. If you have more technical questions please write in the referenced issue or in the Developer thread please. General questions are best in the genral thread.
Please update your systems to js-controller 2.0 and check your adapter.
Please close this issue once you have checked your adapter or received successfull reports from users.
Thank you very much for your support. Please contact us in the other Threads or Forum on any question.
What encoding should messages be sent in? I'm attempting to recreate the SIA sending method via php. I'm sending the data as a string, but all I ever get in the log is: Required SIA fields missing
I've updated so that all messages now go to the log, the bit I'm confused on is how I should be sending the messages. I'm sending a plan text message: "<0x0a>D345003D"SIA-DCS"0001L0#5504[5004|Nri1HA1][Nri1HA1]_17:53:48,00-31-2019<0x0D>"
That is getting converted to a buffer, so I'm confused as to how line: 509 is supposed to work, "if (data && data[0] == 0x0a && data[len] == 0x0d)' As data[0] is in buffer and reflects: 10 in my use case.
I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:
https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/schmupu/ioBroker.sia
Thanks,
your automatic adapter checker.
P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info
I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:
https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/schmupu/ioBroker.sia
Thanks,
your automatic adapter checker.
P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info
can you please add UDP support as my alarm can only communicate in this format
Thanks
(Note : I am new to ioBroker. I am trying it for SIA only at the moment.)
After the adapter sends out an ACK response, the connection is closed.
So, on my alarm system (Ajax System), it means that the CSR is not available. So it generate a new "NULL" request.
As a result my alarm consider there is no CSR.
Here is a log :
from | Time | debug | Message |
---|---|---|---|
sia.0 | 2020-03-25 10:14:48.112 | info | (9236) connection from 192.168.6.35:63133 closed |
sia.0 | 2020-03-25 10:14:48.105 | info | (9236) sending to 192.168.6.35:63133 following message: A4D5000F"ACK"0000L0#1[] |
sia.0 | 2020-03-25 10:14:48.104 | info | (9236) Created ACK : <0x0A>A4D5000F"ACK"0000L0#1[]<0x0D> |
sia.0 | 2020-03-25 10:14:48.103 | info | (9236) SIA Message : <0x0A>73000024"NULL"0000L0#1[]_09:15:05,02-25-2020<0x0D> |
sia.0 | 2020-03-25 10:14:48.103 | info | (9236) received from 192.168.6.35:63133 following message: 73000024"NULL"0000L0#1[]_09:15:05,02-25-2020 |
I tried with a nodered flow. I can confirm that the connection is closed by ioBroker.sia adapter.
Hello Thorsten,
I already read the post #11.
But I can't connect my security system with your adapter module.
Could you help me?
My security system:
IoBroker log:
2019-09-07 18:56:28.942 - debug: sia.1 parseSIA : {}
--
2019-09-07 18:56:28.943 - info: sia.1 Required SIA fields missing
2019-09-07 18:56:28.943 - info: sia.1 Created NAK : <0x0A>1CB00025"NAK"0000R0L0A0[]_16:56:28,08-07-2019<0x0D>
2019-09-07 18:56:28.944 - debug: sia.1 nackSIA : {"type":"Buffer","data":[10,49,67,66,48,48,48,50,53,34,78,65,75,34,48,48,48,48,82,48,76,48,65,48,91,93,95,49,54,58,53,54,58,50,56,44,48,56,45,48,55,45,50,48,49,57,13]}
We have detected that your adapter supports the compact mode. Please use the latest js-controller 2.0 and verify that everything works.
Some more information what is important to check can be found at ioBroker/ioBroker.js-controller#512
On questions please answer to the linked issue. Please close this issue after your test and add the version number that you have tested please as a comment.
Thank you for your support.
No matter what I set this communicator to, it is sending this:
F#123456�
The account number is set to 123456, so that makes sense, but what is the leading F and I am not seeing "SIA-DCS" or anything else from the SIA spec.
Does this look familiar to you at all, any thoughts? - this is all it sends no matter what the alarm type is.
This is how I set the Galaxy panel up:
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.