Initial commit.
This commit is contained in:
parent
4e427e794c
commit
a74cc3e1c0
3
.env
Normal file
3
.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
KNX_GATEWAY_IP=10.0.0.36
|
||||||
|
KNX_GATEWAY_PORT=3671
|
||||||
|
KNX_GATEWAY_KNX_ADDRESS=1.1.242
|
30
.eslintrc.json
Normal file
30
.eslintrc.json
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"plugins": ["@typescript-eslint"],
|
||||||
|
"env": {
|
||||||
|
"es6": true,
|
||||||
|
"node": true,
|
||||||
|
"mocha": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 2018,
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-console": "off",
|
||||||
|
"linebreak-style": "off",
|
||||||
|
"quotes": [
|
||||||
|
"error",
|
||||||
|
"double",
|
||||||
|
{ "allowTemplateLiterals": true }
|
||||||
|
],
|
||||||
|
"keyword-spacing": ["error", { "before": true }],
|
||||||
|
"space-before-blocks": ["error"]
|
||||||
|
}
|
||||||
|
}
|
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Visual Studio 2015 cache/options directory
|
||||||
|
.vs/
|
||||||
|
.nyc_output/
|
||||||
|
lib/
|
||||||
|
coverage/
|
||||||
|
mochawesome-report/
|
||||||
|
dist/
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
|
||||||
|
#Exclude tsc generated files
|
||||||
|
js/*.map
|
||||||
|
js/ts.js
|
3
.mocharc.json
Normal file
3
.mocharc.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"spec": "./tests"
|
||||||
|
}
|
9
.npmignore
Normal file
9
.npmignore
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
coverage
|
||||||
|
mochawesome-report
|
||||||
|
tests
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
.mocharc.json
|
||||||
|
.nycrc.json
|
||||||
|
.nyc_output
|
||||||
|
.vscode
|
16
.nycrc.json
Normal file
16
.nycrc.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"extends": "@istanbuljs/nyc-config-typescript",
|
||||||
|
"check-coverage": true,
|
||||||
|
"include": [
|
||||||
|
"**/src/*.ts"
|
||||||
|
],
|
||||||
|
"reporter": [
|
||||||
|
"lcov",
|
||||||
|
"cobertura",
|
||||||
|
"text-summary"
|
||||||
|
],
|
||||||
|
"statements": 90,
|
||||||
|
"branches": 90,
|
||||||
|
"functions": 90,
|
||||||
|
"lines": 90
|
||||||
|
}
|
5
.prettierrc
Normal file
5
.prettierrc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"printWidth": 80
|
||||||
|
}
|
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"cSpell.words": [
|
||||||
|
"appwrite",
|
||||||
|
"loglevel"
|
||||||
|
]
|
||||||
|
}
|
249
data/sample.xml
Normal file
249
data/sample.xml
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<GroupAddress-Export xmlns="http://knx.org/xml/ga-export/01">
|
||||||
|
<!--GroupRange:-->
|
||||||
|
<!-- @Name: The name of the group range (1 to 255 characters)-->
|
||||||
|
<!-- @RangeStart: The inclusive start address of the range as specified in free group address style-->
|
||||||
|
<!-- @RangeEnd: The inclusive end address of the range as specified in free group address style-->
|
||||||
|
<!-- @Description: The group ranges' description if available-->
|
||||||
|
<!--GroupAddress:-->
|
||||||
|
<!-- @Name: The name of the group range (1 to 255 characters)-->
|
||||||
|
<!-- @Address: The address as specified either in three-level (1/2/3 or two-level (1/3) or numeric (12345) or hexadecimal ($1Fa3 or 0x1fa3) group address value-->
|
||||||
|
<!-- @Central: True if the group address has the Central flag set-->
|
||||||
|
<!-- @Unfiltered: True if the group address has the Unfiltered flag set-->
|
||||||
|
<!-- @Description: The group addresses' description if available-->
|
||||||
|
<!-- @DTPs: The Data Point Types associated with the group address if available, comma separated, e.g. '1.001, 1.002'-->
|
||||||
|
<GroupRange Name="Cellar" RangeStart="1" RangeEnd="2047">
|
||||||
|
<GroupRange Name="All" RangeStart="1" RangeEnd="255">
|
||||||
|
<GroupAddress Name="All" Address="0/0/1" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Hallway" RangeStart="256" RangeEnd="511">
|
||||||
|
<GroupAddress Name="Switching" Address="0/1/0" Description="Hallway Light" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="0/1/1" Description="Hallway Light" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Tech room" RangeStart="512" RangeEnd="767" Description="UG">
|
||||||
|
<GroupAddress Name="Switching" Address="0/2/0" Description="Utility room Storage" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="0/2/1" Description="Utility room Storage" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Media" RangeStart="768" RangeEnd="1023">
|
||||||
|
<GroupAddress Name="Switching" Address="0/3/0" Description="Media Lights" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="0/3/1" Description="Media Front lights" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="0/3/2" Description="Media Mid lights" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="0/3/3" Description="Media Mid lights" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="0/3/4" Description="Media Back lights" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="0/3/5" Description="Media Back lights" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="0/3/6" Description="Wellness Lounge H" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="0/3/7" Description="Wellness Lounge H" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="0/3/8" Description="Wellness Lounge H" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="0/3/9" Description="Wellness Lounge H" DPTs="DPST-20-102" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Store" RangeStart="1024" RangeEnd="1279" Description="UG">
|
||||||
|
<GroupAddress Name="Switching" Address="0/4/0" Description="Store room Storage" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="0/4/1" Description="Store room Storage" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="0/4/2" Description="Store room Server" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="0/4/3" Description="Store room Server" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Wellness" RangeStart="1280" RangeEnd="1535">
|
||||||
|
<GroupAddress Name="Switching" Address="0/5/0" Description="Wellness Light" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="0/5/1" Description="Wellness Light" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="0/5/2" Description="Wellness HVAC - Lounge" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="0/5/3" Description="Wellness HVAC - Lounge" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="0/5/4" Description="Wellness HVAC - Lounge" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="0/5/5" Description="Wellness HVAC - Lounge" DPTs="DPST-20-102" />
|
||||||
|
</GroupRange>
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Outside" RangeStart="2048" RangeEnd="4095">
|
||||||
|
<GroupRange Name="House" RangeStart="3328" RangeEnd="3583">
|
||||||
|
<GroupAddress Name="Switching" Address="1/5/0" Description="House Left" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="1/5/1" Description="House Left" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="1/5/2" Description="House Right" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="1/5/3" Description="House Right" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="1/5/4" Description="House Both" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="1/5/5" Description="House Both" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Ground floor" RangeStart="4096" RangeEnd="6143">
|
||||||
|
<GroupRange Name="Hallway" RangeStart="4096" RangeEnd="4351">
|
||||||
|
<GroupAddress Name="Switching" Address="2/0/6" Description="Entrance Hallway" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/0/7" Description="Entrance Hallway" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Shower" RangeStart="4352" RangeEnd="4607">
|
||||||
|
<GroupAddress Name="Switching" Address="2/1/0" Description="Shower Ceiling" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/1/1" Description="Shower Ceiling" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/1/2" Description="Shower Mirror" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/1/3" Description="Shower Mirror" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/1/4" Description="Shower All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/1/5" Description="Shower All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="2/1/13" Description="Shower HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="2/1/14" Description="Shower HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="2/1/15" Description="Shower HVAC" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="2/1/16" Description="Shower HVAC" DPTs="DPST-20-102" />
|
||||||
|
<GroupAddress Name="Window contact" Address="2/1/17" Description="Shower HVAC" DPTs="DPST-1-19" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Store" RangeStart="4608" RangeEnd="4863">
|
||||||
|
<GroupAddress Name="Switching" Address="2/2/0" Description="Store room Store" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/2/1" Description="Store room Store" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Dining" RangeStart="4864" RangeEnd="5119">
|
||||||
|
<GroupAddress Name="Switching" Address="2/3/0" Description="Dining room Top" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/3/1" Description="Dining room Top
" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/3/2" Description="Dining room Beam" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/3/3" Description="Dining room Beam" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/3/4" Description="Dining room All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/3/5" Description="Dining room All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="2/3/6" Description="Dining room HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="2/3/10" Description="Dining room HVAC" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="2/3/13" Description="Dining room HVAC" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="2/3/14" Description="Dining room HVAC" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Kitchen" RangeStart="5120" RangeEnd="5375">
|
||||||
|
<GroupAddress Name="Switching" Address="2/4/0" Description="Kitchen Top" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/4/1" Description="Kitchen Top" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/4/2" Description="Kitchen Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/4/3" Description="Kitchen Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/4/4" Description="Kitchen All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/4/5" Description="Kitchen All" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Staircase" RangeStart="5376" RangeEnd="5631">
|
||||||
|
<GroupAddress Name="Switching" Address="2/5/0" Description="Staircase Staircase GF" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/5/1" Description="Staircase Staircase GF" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Living" RangeStart="5632" RangeEnd="5887">
|
||||||
|
<GroupAddress Name="Switching" Address="2/6/0" Description="Living room Living hall" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/6/1" Description="Living room Living hall" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/6/2" Description="Living room Living main" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/6/3" Description="Living room Living main" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/6/4" Description="Living room Living rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/6/5" Description="Living room Living rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/6/6" Description="Living room Living accent" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/6/7" Description="Living room Living accent" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="2/6/8" Description="Living room All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/6/9" Description="Living room All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="2/6/10" Description="Living room HVAC" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="2/6/11" Description="Living room HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="2/6/12" Description="Living room HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="2/6/13" Description="Living room HVAC" DPTs="DPST-20-102" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Guest" RangeStart="5888" RangeEnd="6143">
|
||||||
|
<GroupAddress Name="Switching" Address="2/7/0" Description="Guest room Light" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="2/7/1" Description="Guest room Light" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="2/7/2" Description="Guest room HVAC - Guest" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="2/7/3" Description="Guest room HVAC - Guest" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="2/7/4" Description="Guest room HVAC - Guest" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="2/7/5" Description="Guest room HVAC - Guest" DPTs="DPST-20-102" />
|
||||||
|
</GroupRange>
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="First floor" RangeStart="6144" RangeEnd="8191">
|
||||||
|
<GroupRange Name="Store" RangeStart="6144" RangeEnd="6399">
|
||||||
|
<GroupAddress Name="Switching" Address="3/0/0" Description="Store room Store" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/0/1" Description="Store room Store" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Master bed" RangeStart="6400" RangeEnd="6655">
|
||||||
|
<GroupAddress Name="Switching" Address="3/1/0" Description="Master Rail 1" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/1/1" Description="Master Rail 1" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/1/2" Description="Master Rail 2" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/1/3" Description="Master Rail 2" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/1/4" Description="Master Beam" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/1/5" Description="Master Beam" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/1/6" Description="Master All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/1/7" Description="Master All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/1/8" Description="First floor Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/1/9" Description="First floor Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/1/10" Description="First floor Mirror backlight" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/1/11" Description="First floor Mirror backlight" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/1/12" Description="First floor Miror" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/1/13" Description="First floor Miror" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="3/1/14" Description="Master HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="3/1/15" Description="Master HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="3/1/16" Description="Master HVAC" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="3/1/17" Description="Master HVAC" DPTs="DPST-20-102" />
|
||||||
|
<GroupAddress Name="Window contact" Address="3/1/18" Description="Master HVAC" DPTs="DPST-1-19" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Bathroom" RangeStart="6656" RangeEnd="6911">
|
||||||
|
<GroupAddress Name="Switching" Address="3/2/0" Description="Bathroom Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/2/1" Description="Bathroom Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/2/2" Description="Bathroom Mirror backlit" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/2/3" Description="Bathroom Mirror backlit" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/2/4" Description="Bathroom Miror" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/2/5" Description="Bathroom Miror" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="3/2/6" Description="Bathroom HVAC Bath" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="3/2/7" Description="Bathroom HVAC Bath" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="3/2/8" Description="Bathroom HVAC Bath" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="3/2/9" Description="Bathroom HVAC Bath" DPTs="DPST-20-102" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Child" RangeStart="6912" RangeEnd="7167">
|
||||||
|
<GroupAddress Name="Switching" Address="3/3/0" Description="Child Wall" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/3/1" Description="Child Wall" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/3/2" Description="Child Ceiling" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/3/3" Description="Child Ceiling" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/3/4" Description="Child Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/3/5" Description="Child Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="3/3/6" Description="Child HVAC Child" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="3/3/7" Description="Child HVAC Child" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command Value" Address="3/3/8" Description="Child HVAC Child" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="3/3/9" Description="Child HVAC Child" DPTs="DPST-20-102" />
|
||||||
|
<GroupAddress Name="Window contact" Address="3/3/10" Description="Child HVAC Child" DPTs="DPST-1-19" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Hallway" RangeStart="7168" RangeEnd="7423">
|
||||||
|
<GroupAddress Name="Switching" Address="3/4/0" Description="Hall Hall light" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/4/1" Description="Hall Hall light" DPTs="DPST-1-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Study" RangeStart="7424" RangeEnd="7679">
|
||||||
|
<GroupAddress Name="Switching" Address="3/5/0" Description="Study Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/5/1" Description="Study Rail" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/5/2" Description="Study Stairs" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/5/3" Description="Study Stairs" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Switching" Address="3/5/4" Description="Study All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Status" Address="3/5/5" Description="Study All" DPTs="DPST-1-1" />
|
||||||
|
<GroupAddress Name="Current temperature" Address="3/5/6" Description="Study HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Setpoint temperature" Address="3/5/7" Description="Study HVAC" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="Command value" Address="3/5/8" Description="Study HVAC" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="Operation mode" Address="3/5/9" Description="Study HVAC" DPTs="DPST-20-102" />
|
||||||
|
<GroupAddress Name="Window contact" Address="3/5/10" Description="Study HVAC" DPTs="DPST-1-19" />
|
||||||
|
</GroupRange>
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="HVAC" RangeStart="8192" RangeEnd="10239">
|
||||||
|
<GroupRange Name="Media Room" RangeStart="8192" RangeEnd="8447">
|
||||||
|
<GroupAddress Name="In house" Address="4/0/0" />
|
||||||
|
<GroupAddress Name="21 degrees rooms" Address="4/0/1" />
|
||||||
|
<GroupAddress Name="23 degrees bathrooms" Address="4/0/2" />
|
||||||
|
<GroupAddress Name="Presence led" Address="4/0/3" />
|
||||||
|
<GroupAddress Name="UG Media" Address="4/0/4" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="UG Lounge" Address="4/0/5" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Shower" Address="4/0/6" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Dining" Address="4/0/7" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Living" Address="4/0/8" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Guest" Address="4/0/9" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="All valves" Address="4/0/101" DPTs="DPST-5-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Current temp" RangeStart="8448" RangeEnd="8703">
|
||||||
|
<GroupAddress Name="UG Media" Address="4/1/0" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="UG Lounge" Address="4/1/1" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Shower" Address="4/1/2" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Dining" Address="4/1/3" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Living" Address="4/1/4" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Guest" Address="4/1/5" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="FF - Master bed" Address="4/1/6" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="FF - Child" Address="4/1/7" DPTs="DPST-5-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Setpoint temperature" RangeStart="8704" RangeEnd="8959">
|
||||||
|
<GroupAddress Name="UG Media" Address="4/2/0" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="UG Lounge" Address="4/2/1" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="GF - Shower" Address="4/2/2" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="GF - Dining" Address="4/2/3" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="GF - Living" Address="4/2/4" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="GF - Guest" Address="4/2/5" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="FF - Master bed" Address="4/2/6" DPTs="DPST-9-1" />
|
||||||
|
<GroupAddress Name="FF - Child" Address="4/2/7" DPTs="DPST-9-1" />
|
||||||
|
</GroupRange>
|
||||||
|
<GroupRange Name="Valve position" RangeStart="8960" RangeEnd="9215">
|
||||||
|
<GroupAddress Name="UG Media" Address="4/3/0" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="UG Lounge" Address="4/3/1" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Shower" Address="4/3/2" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Dining" Address="4/3/3" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Living" Address="4/3/4" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="GF - Guest" Address="4/3/5" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="FF - Master bed" Address="4/3/6" DPTs="DPST-5-1" />
|
||||||
|
<GroupAddress Name="FF - Child" Address="4/3/7" DPTs="DPST-5-1" />
|
||||||
|
</GroupRange>
|
||||||
|
</GroupRange>
|
||||||
|
</GroupAddress-Export>
|
3436
package-lock.json
generated
Normal file
3436
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
40
package.json
Normal file
40
package.json
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"name": "knx-monitor",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "KNX event monitor an logger",
|
||||||
|
"main": "lib/index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "http://git.home.lipc.tech/laur/knx-monitor.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"knx",
|
||||||
|
"monitor",
|
||||||
|
"log",
|
||||||
|
"event"
|
||||||
|
],
|
||||||
|
"author": "Laur Ivan",
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"dependencies": {
|
||||||
|
"dotenv": "^16.0.0",
|
||||||
|
"fs": "0.0.1-security",
|
||||||
|
"knx-lib": "0.0.3",
|
||||||
|
"node-appwrite": "^5.0.0",
|
||||||
|
"xml2js": "^0.4.23"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^17.0.14",
|
||||||
|
"@types/xml2js": "^0.4.9",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||||
|
"@typescript-eslint/parser": "^5.10.2",
|
||||||
|
"chai": "^4.3.6",
|
||||||
|
"eslint": "^8.11.0",
|
||||||
|
"mocha": "^9.2.2",
|
||||||
|
"nyc": "^15.1.0",
|
||||||
|
"ts-mocha": "^9.0.2",
|
||||||
|
"typescript": "^4.6.2"
|
||||||
|
}
|
||||||
|
}
|
33
src/index.ts
Normal file
33
src/index.ts
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/**
|
||||||
|
* Main file to be executed.
|
||||||
|
*
|
||||||
|
* Monitor and upload different KNX events
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { readAddresses, readMessage, KNXMessage } from 'knx-lib'
|
||||||
|
import knx from 'knx';
|
||||||
|
import dotenv from 'dotenv'
|
||||||
|
|
||||||
|
// read the addresses and DPTs.
|
||||||
|
// let addresses = readAddresses("")
|
||||||
|
|
||||||
|
dotenv.config({ override: false })
|
||||||
|
|
||||||
|
|
||||||
|
// Create the connection
|
||||||
|
const connection = new knx.Connection({
|
||||||
|
ipAddr: process.env.KNX_GATEWAY_IP,
|
||||||
|
ipPort: Number.parseInt(process.env.KNX_GATEWAY_PORT),
|
||||||
|
physAddr: process.env.KNX_GATEWAY_KNX_ADDRESS,
|
||||||
|
//loglevel: 'trace',
|
||||||
|
handlers: {
|
||||||
|
connected: function () {
|
||||||
|
console.log('Connected!');
|
||||||
|
},
|
||||||
|
event: function (evt: any, src: any, dest: any, value: any) {
|
||||||
|
console.log("%s **** KNX EVENT: %j, src: %j, dest: %j, value: %j",
|
||||||
|
new Date().toISOString().replace(/T/, ' ').replace(/\..+/, ''),
|
||||||
|
evt, src, dest, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
0
src/types.d.ts
vendored
Normal file
0
src/types.d.ts
vendored
Normal file
42
tsconfig.json
Normal file
42
tsconfig.json
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es6",
|
||||||
|
"module": "commonjs",
|
||||||
|
"lib": [
|
||||||
|
"es6",
|
||||||
|
"esnext"
|
||||||
|
],
|
||||||
|
"allowJs": true,
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"outDir": "dist",
|
||||||
|
"rootDir": "src",
|
||||||
|
"removeComments": true,
|
||||||
|
"strict": false,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"strictNullChecks": false,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"typeRoots": [
|
||||||
|
"node_modules/@types"
|
||||||
|
],
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"downlevelIteration": true,
|
||||||
|
"emitDecoratorMetadata": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"dist",
|
||||||
|
"**/*.test.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
],
|
||||||
|
"ts-node": {
|
||||||
|
"files": true
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/types.d.ts",
|
||||||
|
],
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user