iobroker.openknx 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -115
- package/admin/words.js +4 -4
- package/docs/pictures/ets1.png +0 -0
- package/docs/pictures/ets2.png +0 -0
- package/docs/pictures/loglevel.png +0 -0
- package/docs/pictures/setting.png +0 -0
- package/io-package.json +71 -72
- package/iob_npm.done +1 -0
- package/lib/projectImport.js +6 -6
- package/main.js +4 -4
- package/package.json +1 -1
- package/.vscode/launch.json +0 -26
- package/.vscode/settings.json +0 -2
- package/admin/zip/inflate.js +0 -2155
- package/admin/zip/z-worker.js +0 -153
- package/admin/zip/zip-ext.js +0 -242
- package/admin/zip/zip.js +0 -959
package/README.md
CHANGED
|
@@ -1,74 +1,111 @@
|
|
|
1
1
|

|
|
2
2
|
# ioBroker.openknx
|
|
3
|
-
=================
|
|
4
3
|
|
|
5
4
|
[](https://www.npmjs.com/package/iobroker.openknx)
|
|
6
5
|
[](https://www.npmjs.com/package/iobroker.openknx)
|
|
7
6
|
|
|
8
7
|
[](https://nodei.co/npm/iobroker.openknx/)
|
|
9
8
|
|
|
10
|
-
This adapter serves as a communication interface between Iobroker Object tree and a IP Gateway on the KNX bus.
|
|
11
|
-
This adapter allows to generate the communication objects by importing of knxproj Files from ETS.
|
|
12
|
-
All generated Communication Objects are initially configured readable and writeable.
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
This adapter serves as communication interface between Iobroker and your KNX IP Gateway.
|
|
11
|
+
The adapter allows to generate the iobroker communication objects automatically by importing an ETS group address xml export.
|
|
12
|
+
All generated communication objects are initially configured readable and writeable, values are fetched from the knx bus on adapter restart.
|
|
13
|
+
|
|
14
|
+
# Installation
|
|
15
|
+
This is an early untested version. Please make a good backup of all your data before installation! Please do not test in critical environments.
|
|
18
16
|
|
|
19
17
|
install in shell
|
|
18
|
+
|
|
20
19
|
cd /opt/iobroker/node_modules
|
|
21
20
|
npm i iobroker.openknx
|
|
22
21
|
iobroker add openknx
|
|
23
22
|
npm i knx
|
|
24
23
|
|
|
25
|
-
updates
|
|
24
|
+
updates
|
|
25
|
+
|
|
26
26
|
npm i iobroker.openknx
|
|
27
27
|
iobroker upload openknx
|
|
28
28
|
|
|
29
|
-
#
|
|
29
|
+
# Adapter configuration
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Press "save & close" or "save" to restart the adapter and take over the changes.
|
|
33
|
+
When starting, the adapter tries to read all GroupAdresses with have the autoread flag (default setting).
|
|
34
|
+
This could take a while and can produce a higher load on your KNX-bus. This ensures that the adapter operates with up-to-date values from the start.
|
|
35
|
+
Autoread is done on the first connection with the knx bus after an adapter start or restart, not on every knx reconnection.
|
|
36
|
+
After adapter installation, open the adapter configuration. Fill in:
|
|
37
|
+
#### KNX Gateway IP
|
|
38
|
+
IP of your KNX/Lan GW
|
|
39
|
+
|
|
40
|
+
##### Port
|
|
41
|
+
this is normally port 3671 of the KNX IP gateway.
|
|
42
|
+
|
|
43
|
+
##### phys. EIB Adress
|
|
44
|
+
Fill in physical address of the gateway in the format 1/1/1.
|
|
45
|
+
|
|
46
|
+
##### Add only new Objects
|
|
47
|
+
If checked, the import will skip overwriting existing communication objects.
|
|
48
|
+
|
|
49
|
+
##### Override object path
|
|
50
|
+
The adapter uses openknx.0 for first instance as default path for Iobroker objects.
|
|
51
|
+
If your curent setup has a lot of references to existing knx objects to an existing folder, then you can specify its location, for example knx.0.
|
|
52
|
+
This feature will be removed in future.
|
|
53
|
+
|
|
54
|
+
#### GA XML import
|
|
55
|
+
1. In ETS go to Group Addresses, select export group addresse and select XML export in latest format version
|
|
56
|
+
2. upload your ETS Export XML in the adapter via the GA XML-Import dialog
|
|
57
|
+
3. Import will immediatelly start after file selection and give a status report after completion.
|
|
58
|
+
After the successful import a message shows how much objects where recognized. More detailed information could be found in the log.
|
|
59
|
+
|
|
60
|
+
#### Frames per sec
|
|
61
|
+
This settings protects the KNX bus from data flooding by limiting data frames to a certain rate. Not sent frames are put into a fifo buffer.
|
|
30
62
|
|
|
63
|
+
# howto use the adapter & basic concept
|
|
64
|
+
todo
|
|
31
65
|
|
|
32
66
|
# Compatibility
|
|
33
67
|
This adapter has its own namespace 'openknx'.
|
|
34
|
-
for existing applications, that are connected to knx signals of other knx adapters you can use the setting:
|
|
35
|
-
Override object path
|
|
68
|
+
for existing applications, that are connected to knx signals of other knx adapters you can use the setting:
|
|
69
|
+
Override object path
|
|
36
70
|
to e.g. knx.0. A new project import will then store the data in this object tree space.
|
|
37
71
|
Objects are not compatible, remove them manually before the import and disable all other knx adapters.
|
|
38
72
|
Leave setting empty to use the adapters own namespace.
|
|
39
73
|
|
|
40
74
|
# log level
|
|
75
|
+
Enable expert mode to enable switching between different log levels. Default loglevel is info.
|
|
76
|
+

|
|
41
77
|
|
|
78
|
+
# IOBroker Communication Object description
|
|
42
79
|
|
|
43
|
-
|
|
80
|
+
GA import generates a communication object folder structure following the ga main-group/middle-group scheme. Each groupaddress is an oject with following automatically generated data.
|
|
44
81
|
|
|
45
82
|
{
|
|
46
|
-
"_id": "path.and.name.to.object",
|
|
83
|
+
"_id": "path.and.name.to.object", //derieved from the KNX structure
|
|
47
84
|
"type": "state",
|
|
48
|
-
"common": {
|
|
49
|
-
"desc": "Basetype: 1-bit value, Subtype: switch",
|
|
50
|
-
"min": 0,
|
|
51
|
-
"max": 1,
|
|
52
|
-
"name": "Aussen Melder Licht schalten",
|
|
53
|
-
"read": true,
|
|
54
|
-
"role": "",
|
|
55
|
-
"type": "boolean",
|
|
56
|
-
"unit": "",
|
|
57
|
-
"write": true
|
|
85
|
+
"common": { //values here can be interpreted by iobroker
|
|
86
|
+
"desc": "Basetype: 1-bit value, Subtype: switch", //informative, from dpt
|
|
87
|
+
"min": 0, //derieved from dpt
|
|
88
|
+
"max": 1, //derieved from dpt
|
|
89
|
+
"name": "Aussen Melder Licht schalten", //informative description from ets export
|
|
90
|
+
"read": true, //default set, if false incoming bus values are not updating the object
|
|
91
|
+
"role": "", //tbd
|
|
92
|
+
"type": "boolean", //boolean, number, string, object, derieved from dpt
|
|
93
|
+
"unit": "", //derived from dpt
|
|
94
|
+
"write": true //default true, if set change on object is triggering knx write, succ. write sets then ack flag to true
|
|
58
95
|
},
|
|
59
|
-
"native": {
|
|
60
|
-
"address": "0/0/7",
|
|
61
|
-
"answer_groupValueResponse": false,
|
|
62
|
-
"autoread": true,
|
|
63
|
-
"bitlength": 1,
|
|
64
|
-
"dpt": "DPT1.001",
|
|
65
|
-
"encoding": {
|
|
96
|
+
"native": { //values here can be interpreted by openknx adapter
|
|
97
|
+
"address": "0/0/7", //knx address
|
|
98
|
+
"answer_groupValueResponse": false, //default false, if set to true adapter responds with value on GroupValue_Read
|
|
99
|
+
"autoread": true, //default true, adapter sends a GroupValue_read on start to sync its states
|
|
100
|
+
"bitlength": 1, //size ob knx data, derived from dpt
|
|
101
|
+
"dpt": "DPT1.001", //DPT
|
|
102
|
+
"encoding": { //informative
|
|
66
103
|
"0": "Off",
|
|
67
104
|
"1": "On"
|
|
68
105
|
},
|
|
69
|
-
"force_encoding": "",
|
|
70
|
-
"signedness": "",
|
|
71
|
-
"valuetype": "basic"
|
|
106
|
+
"force_encoding": "", //informative
|
|
107
|
+
"signedness": "", //informative
|
|
108
|
+
"valuetype": "basic" //composite means set via a specific javascript object
|
|
72
109
|
},
|
|
73
110
|
"from": "system.adapter.openknx.0",
|
|
74
111
|
"user": "system.user.admin",
|
|
@@ -77,46 +114,57 @@ Leave setting empty to use the adapters own namespace.
|
|
|
77
114
|
|
|
78
115
|
|
|
79
116
|
# Adapter communication Interface Description
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
DPT
|
|
98
|
-
|
|
99
|
-
DPT-
|
|
100
|
-
DPT-
|
|
101
|
-
DPT-
|
|
102
|
-
DPT-
|
|
103
|
-
DPT-
|
|
104
|
-
DPT-
|
|
105
|
-
DPT-
|
|
106
|
-
DPT-
|
|
107
|
-
DPT-
|
|
108
|
-
DPT-
|
|
109
|
-
DPT-
|
|
110
|
-
DPT-
|
|
111
|
-
DPT-
|
|
112
|
-
DPT-
|
|
113
|
-
DPT-
|
|
114
|
-
|
|
117
|
+
Handeled DPTs are: 1-21,232,237,238
|
|
118
|
+
Unhandeled DPTs are written as raw buffers, the interface is a sequencial string of hexadecimal numbers. For example write '0102feff' to send values 0x01 0x02 0xfe 0xff on the bus.
|
|
119
|
+
Where number datatype is used please note that interface values can be scaled.
|
|
120
|
+
|
|
121
|
+
#### API call
|
|
122
|
+
|
|
123
|
+
setState(
|
|
124
|
+
id: string, // object path
|
|
125
|
+
state: State | StateValue | SettableState,
|
|
126
|
+
ack: false, //set to false and will be set to true by KNX stack on send confirmation
|
|
127
|
+
c: 'GroupValue_Read' //optional comment, set this value to trigger a bus read to this object, given StateValue is ignored
|
|
128
|
+
): void;
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
#### Description of all DPTs
|
|
133
|
+
|
|
134
|
+
|KNX DPT |javascript datatype |special values |value range |
|
|
135
|
+
|--- |--- |--- |---|
|
|
136
|
+
|DPT-1 |boolean | |false, true|
|
|
137
|
+
|DPT-2 |object |{"priority":1 bit,"data":1 bit} |-|
|
|
138
|
+
|DPT-3 |object |{"decr_incr":1 bit,"data":2 bit} |-|
|
|
139
|
+
|DPT-18 |object |{"save_recall":0,"scenenumber":0} |
|
|
140
|
+
|DPT-21 |object |{"outofservice":0,"fault":0,"overridden":0,"inalarm":0,"alarmunack":0} |-|
|
|
141
|
+
|DPT-232 |object |{red:0..255, green:0.255, blue:0.255} -|
|
|
142
|
+
|DPT-237 |object |{"address":0,"addresstype":0,"readresponse":0,"lampfailure":0,"ballastfailure":0,"convertorerror":0} |-|
|
|
143
|
+
|DPT-4 |string ||one character sent as 8-bit character|
|
|
144
|
+
|DPT-16 |string ||one character sent as 16-character string|
|
|
145
|
+
|DPT-5 |number ||8-bit unsigned value|
|
|
146
|
+
|DPT-5.001 |number ||0..100 [%] scaled to 1-byte|
|
|
147
|
+
|DPT-5.003 |number ||0..360 [°] scaled to 1-byte|
|
|
148
|
+
|DPT-6 |number ||8-bit signed -128..127|
|
|
149
|
+
|DPT-7 |number ||16-bit unsigned value|
|
|
150
|
+
|DPT-8 |number ||2-byte signed value |-32768..32767|
|
|
151
|
+
|DPT-9 |number ||2-byte floating point value|
|
|
152
|
+
|DPT-14 |number ||4-byte floating point value|
|
|
153
|
+
|DPT-12 |number ||4-byte unsigned value|
|
|
154
|
+
|DPT-13 |number ||4-byte signed value|
|
|
155
|
+
|DPT-15 |number ||4-byte|
|
|
156
|
+
|DPT-17 |number ||1-byte|
|
|
157
|
+
|DPT-20 |number ||1-byte|
|
|
158
|
+
|DPT-238 |number | |1-byte|
|
|
159
|
+
|DPT-10 |number for Date Object ||-|
|
|
160
|
+
|DPT-11 |number for Date Object ||-|
|
|
161
|
+
|DPT-19 |number for Date Object ||-|
|
|
162
|
+
|rest |string |00010203.. |-|
|
|
115
163
|
|
|
116
164
|
|
|
117
165
|
Only time and date information is exchanged with KNX time based datatypes, e.g. DPT-19 has unsupported fields for signal quality
|
|
118
166
|
|
|
119
|
-
Object send and receive values are of type boolean
|
|
167
|
+
Object send and receive values are of type boolean DPT1), number (scaled, or unscaled), string.
|
|
120
168
|
DPT 2 'expects a object {"priority":0,"data":1}' receive provides a strinified object of same type.
|
|
121
169
|
Other joint DPTs have similar object notation.
|
|
122
170
|
DPT19 expects a Number from a Date Object, Iobroker can not handle objects, fields of KNX ko that cannot be derived from timestamp are not implemented eg. quality flags
|
|
@@ -126,61 +174,41 @@ Please have in mind that Javascript and KNX have very different base type for ti
|
|
|
126
174
|
DPT10 is time (hh:mm:ss) plus "day of week". This concept is unavailable in JS, so you'll be getting/setting a regular Date Js object, but please remember you'll need to ignore the date, month and year. The exact same datagram that converts to "Mon, Jul 1st 12:34:56", will evaluate to a wildly different JS Date of "Mon, Jul 8th 12:34:56" one week later. Be warned!
|
|
127
175
|
DPT11 is date (dd/mm/yyyy): the same applies for DPT11, you'll need to ignore the time part.
|
|
128
176
|
|
|
177
|
+
#### group value write
|
|
178
|
+
send is triggered by writing a communication object.
|
|
179
|
+
Communication object is triggered when a write frame is received on the bus.
|
|
129
180
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
# Adapterconfiguration
|
|
135
|
-
After installing this adapter, open the adapter configuration. Fill in:
|
|
136
|
-
|
|
137
|
-
##### KNX Gateway IP
|
|
138
|
-
<IP of your KNX/Lan GW> with ipv4 format
|
|
139
|
-
|
|
140
|
-
##### Port
|
|
141
|
-
this is normally port 3671 of the gateway.
|
|
142
|
-
|
|
143
|
-
##### phys. EIB Adress
|
|
144
|
-
Fill in physical address of the gateway in the format 1/1/1.
|
|
145
|
-
|
|
146
|
-
##### Add only new Objects
|
|
147
|
-
|
|
148
|
-
##### Override object path
|
|
149
|
-
The adapter uses openknx.0 for first instance as default path for Iobroker objects.
|
|
150
|
-
If your existing installation has a lot of references to existing knx objects to an existing folder, then you can specify its location, for example knx.0.
|
|
151
|
-
This feature will be removed in future.
|
|
181
|
+
#### group value read
|
|
182
|
+
Sending can be triggered by writing a communicaton object with comment.
|
|
183
|
+
Receiving, if configured will trigger a group value response (limitation: write) of the actual c.o. value, see below
|
|
152
184
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
2nd upload your ETS Export XML in the adapter via the GA XML-Import dialog
|
|
185
|
+
#### group value response
|
|
186
|
+
Sending Not yet supported. Emulated if response setting is set and adapter writes a group value write.
|
|
187
|
+
Receiving will update the value of the iobroker object in read is set to true.
|
|
157
188
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
189
|
+
# Features
|
|
190
|
+
* fast import of groupaddresses in XML format
|
|
191
|
+
* stable knx stack
|
|
192
|
+
* interpretation of many DPTs
|
|
193
|
+
* raw read and write of unsupported DPTs
|
|
194
|
+
* support of group value read and group value write, group value write as response to group value request
|
|
195
|
+
* Autoread
|
|
196
|
+
* free open source
|
|
165
197
|
|
|
166
|
-
# Usage
|
|
167
|
-
If the adapter startet successfully your datapoints will be available for communication interaction.
|
|
168
198
|
|
|
169
|
-
## Datapoint Types
|
|
170
|
-
Wide DPT (datapoint type) support (DPT1 - DPT21, DPT232, DPT237, DPT238 supported)
|
|
171
|
-
Values of unhandeled DPTs can be written and read out in raw format.
|
|
172
199
|
|
|
173
|
-
# Special settings
|
|
174
200
|
|
|
175
201
|
# Known Problems
|
|
176
|
-
- sends write instead of
|
|
177
|
-
- knxprj file only tested from ETS 5.7.4
|
|
202
|
+
- sends write instead of GroupValue_Response on GroupValue_Read
|
|
178
203
|
- IOBroker object role definition missing
|
|
179
204
|
|
|
180
|
-
#
|
|
181
|
-
- three level group
|
|
205
|
+
# Limitations
|
|
206
|
+
- only three level group addresses are supported
|
|
182
207
|
|
|
183
208
|
## Changelog
|
|
209
|
+
### 0.0.19
|
|
210
|
+
* display warning on ga import file errors
|
|
211
|
+
|
|
184
212
|
### 0.0.17
|
|
185
213
|
* raw value handling, can now write and receive ga of unsupported dpt
|
|
186
214
|
* setting onlyAddNewObjects fixed
|
|
@@ -189,8 +217,6 @@ Values of unhandeled DPTs can be written and read out in raw format.
|
|
|
189
217
|
### 0.0.14
|
|
190
218
|
* import ga xml
|
|
191
219
|
|
|
192
|
-
### 0.0.12
|
|
193
|
-
* initial version
|
|
194
220
|
|
|
195
221
|
|
|
196
222
|
## License
|
package/admin/words.js
CHANGED
|
@@ -168,9 +168,9 @@ systemDictionary = {
|
|
|
168
168
|
"es": "Escuchar en todas las direcciones IP",
|
|
169
169
|
"pl": "Posłuchaj na wszystkich IP"
|
|
170
170
|
},
|
|
171
|
-
"Please wait while generating Objects
|
|
172
|
-
"en": "Please wait while generating Objects
|
|
173
|
-
"de": "Bitte warten Sie, während Sie Objekte erzeugen
|
|
171
|
+
"Please wait while generating Objects...": {
|
|
172
|
+
"en": "Please wait while generating Objects...",
|
|
173
|
+
"de": "Bitte warten Sie, während Sie Objekte erzeugen...",
|
|
174
174
|
"ru": "Подождите, пока вы создадите объекты ..... это может занять некоторое время.",
|
|
175
175
|
"pt": "Aguarde enquanto gera objetos ..... pode demorar um pouco.",
|
|
176
176
|
"nl": "Even geduld met het genereren van objecten ... het kan even duren.",
|
|
@@ -181,7 +181,7 @@ systemDictionary = {
|
|
|
181
181
|
},
|
|
182
182
|
"Extracted %s states": {
|
|
183
183
|
"en": "Extracted %s states",
|
|
184
|
-
"de": "Es
|
|
184
|
+
"de": "Es wurden %s Objekte extrahiert",
|
|
185
185
|
"ru": "Извлечено %s объектов",
|
|
186
186
|
"pt": "Estados extraídos %s",
|
|
187
187
|
"nl": "Geëxtrade %s toestanden",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/io-package.json
CHANGED
|
@@ -1,80 +1,79 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
3
|
+
"name": "openknx",
|
|
4
|
+
"version": "0.0.18",
|
|
5
|
+
"news": {
|
|
6
|
+
"0.0.1": {
|
|
7
|
+
"en": "initial release",
|
|
8
|
+
"de": "Erstveröffentlichung",
|
|
9
|
+
"ru": "Начальная версия",
|
|
10
|
+
"pt": "lançamento inicial",
|
|
11
|
+
"nl": "Eerste uitgave",
|
|
12
|
+
"fr": "Première version",
|
|
13
|
+
"it": "Versione iniziale",
|
|
14
|
+
"es": "Versión inicial",
|
|
15
|
+
"pl": "Pierwsze wydanie",
|
|
16
|
+
"zh-cn": "首次出版"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"title": "Open KNX",
|
|
20
|
+
"titleLang": {
|
|
21
|
+
"en": "Open KNX",
|
|
22
|
+
"de": "Open KNX",
|
|
23
|
+
"ru": "Open KNX",
|
|
24
|
+
"pt": "Open KNX",
|
|
25
|
+
"nl": "Open KNX",
|
|
26
|
+
"fr": "Open KNX",
|
|
27
|
+
"it": "Open KNX",
|
|
28
|
+
"es": "Open KNX",
|
|
29
|
+
"pl": "Open KNX",
|
|
30
|
+
"zh-cn": "Open KNX"
|
|
31
|
+
},
|
|
32
|
+
"desc": {
|
|
33
|
+
"en": "open source KNX adapter",
|
|
34
|
+
"de": "Open-Source-KNX-Adapter",
|
|
35
|
+
"ru": "адаптер KNX с открытым исходным кодом",
|
|
36
|
+
"pt": "adaptador KNX de código aberto",
|
|
37
|
+
"nl": "open source KNX-adapter",
|
|
38
|
+
"fr": "adaptateur KNX open source",
|
|
39
|
+
"it": "adattatore KNX open source",
|
|
40
|
+
"es": "adaptador KNX de código abierto",
|
|
41
|
+
"pl": "otwarty adapter KNX",
|
|
42
|
+
"zh-cn": "开源 KNX 适配器"
|
|
43
|
+
},
|
|
44
|
+
"authors": [
|
|
45
|
+
"Boellner <boellnerboellner@gmail.com>"
|
|
46
|
+
],
|
|
47
|
+
"keywords": [
|
|
48
|
+
"knx free open source eib"
|
|
49
|
+
],
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"platform": "Javascript/Node.js",
|
|
52
|
+
"main": "main.js",
|
|
53
|
+
"icon": "openknx.png",
|
|
54
|
+
"enabled": true,
|
|
55
|
+
"messagebox": true,
|
|
56
|
+
"subscribe": "messagebox",
|
|
57
|
+
"extIcon": "https://raw.githubusercontent.com/Boellner/ioBroker.openknx/main/admin/openknx.png",
|
|
58
|
+
"readme": "https://github.com/Boellner/ioBroker.openknx/blob/main/README.md",
|
|
59
|
+
"loglevel": "info",
|
|
60
|
+
"mode": "daemon",
|
|
61
|
+
"type": "protocols",
|
|
62
|
+
"compact": true,
|
|
63
|
+
"connectionType": "local",
|
|
64
|
+
"dataSource": "poll",
|
|
65
|
+
"materialize": true,
|
|
66
|
+
"dependencies": [
|
|
67
|
+
{
|
|
68
|
+
"js-controller": ">=2.0.0"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
71
|
"restartAdapters": [
|
|
72
72
|
"openknx"
|
|
73
|
-
]
|
|
74
|
-
|
|
75
|
-
"native": {
|
|
76
|
-
|
|
73
|
+
],
|
|
74
|
+
"installedFrom": "iobroker.openknx"
|
|
77
75
|
},
|
|
76
|
+
"native": {},
|
|
78
77
|
"objects": [],
|
|
79
78
|
"instanceObjects": [
|
|
80
79
|
{
|
package/iob_npm.done
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/lib/projectImport.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// generate JSON-object with complete GAS
|
|
2
|
-
|
|
3
1
|
'use strict';
|
|
4
2
|
|
|
5
3
|
var DPTLib = require(__dirname + '/knx/src/dptlib'); //todo copy for the moment
|
|
@@ -94,7 +92,10 @@ module.exports = {
|
|
|
94
92
|
}
|
|
95
93
|
|
|
96
94
|
if (dpt == '') {
|
|
97
|
-
|
|
95
|
+
var text = 'no import of ' + fullPath + ' address ' + groupAddress.getAttribute('Address') + ' with no DPT set';
|
|
96
|
+
if (!err) err = text;
|
|
97
|
+
else err += ' ,' + text;
|
|
98
|
+
console.log(text);
|
|
98
99
|
return;
|
|
99
100
|
}
|
|
100
101
|
|
|
@@ -191,9 +192,8 @@ module.exports = {
|
|
|
191
192
|
// check if fileObjectList is typeof Object
|
|
192
193
|
if (!fileObjectList.hasOwnProperty('push')) {
|
|
193
194
|
processFile(null, fileObjectList);
|
|
194
|
-
} else {
|
|
195
|
-
|
|
196
|
-
loadProjFile(null, knxProjFile);
|
|
195
|
+
} else if (knxProjFile !== undefined) {
|
|
196
|
+
loadProjFile(null, knxProjFile);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
};
|
package/main.js
CHANGED
|
@@ -128,13 +128,13 @@ class openknx extends utils.Adapter {
|
|
|
128
128
|
//if user setting Add only new Objects write only new objects
|
|
129
129
|
//https://www.iobroker.net/docu/index-81.htm?page_id=5809&lang=en#extendObject
|
|
130
130
|
this.setForeignObjectNotExists(this.mynamespace + '.' + objects[index]._id, objects[index], (err, obj) => {
|
|
131
|
-
this.log.
|
|
131
|
+
if (err) this.log.warn('error store Object ' + objects[index]._id + ' ' + (err ? ' ' + err : ''));
|
|
132
132
|
setTimeout(this.updateObjects.bind(this), 0, objects, index + 1, onlyAddNewObjects, callback)
|
|
133
133
|
});
|
|
134
134
|
} else {
|
|
135
135
|
//setObjet to overwrite all existing settings, defalut
|
|
136
136
|
this.setForeignObject(this.mynamespace + '.' + objects[index]._id, objects[index], (err, obj) => {
|
|
137
|
-
this.log.
|
|
137
|
+
if (err) this.log.warn('error store Object ' + objects[index]._id + (err ? ' ' + err : ''));
|
|
138
138
|
setTimeout(this.updateObjects.bind(this), 0, objects, index + 1, onlyAddNewObjects, callback)
|
|
139
139
|
});
|
|
140
140
|
}
|
|
@@ -275,7 +275,7 @@ class openknx extends utils.Adapter {
|
|
|
275
275
|
var dp = new knx.Datapoint({
|
|
276
276
|
ga: this.gaList.getDataById(key).native.address,
|
|
277
277
|
dpt: this.gaList.getDataById(key).native.dpt,
|
|
278
|
-
autoread: this.gaList.getDataById(key).native.autoread // issue a GroupValue_Read request to try to get the initial state from the bus (if any)
|
|
278
|
+
autoread: false //todo enable debug this.gaList.getDataById(key).native.autoread // issue a GroupValue_Read request to try to get the initial state from the bus (if any)
|
|
279
279
|
}, this.knxConnection);
|
|
280
280
|
this.gaList.setDpById(key, dp);
|
|
281
281
|
cnt_withDPT++;
|
|
@@ -290,7 +290,7 @@ class openknx extends utils.Adapter {
|
|
|
290
290
|
cnt_complete++;
|
|
291
291
|
}
|
|
292
292
|
this.autoreaddone = true;
|
|
293
|
-
this.log.info('
|
|
293
|
+
this.log.info('Found ' + cnt_withDPT + ' valid KNX datapoints of ' + cnt_complete + ' datapoints in adapter.');
|
|
294
294
|
}
|
|
295
295
|
this.setState('info.connection', true, true);
|
|
296
296
|
this.log.info('Connected!');
|
package/package.json
CHANGED
package/.vscode/launch.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
|
|
3
|
-
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
|
|
4
|
-
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"type": "pwa-node",
|
|
9
|
-
"request": "launch",
|
|
10
|
-
"name": "Launch Program",
|
|
11
|
-
"skipFiles": [
|
|
12
|
-
"<node_internals>/**"
|
|
13
|
-
],
|
|
14
|
-
"program": "${workspaceFolder}\\openknx.js"
|
|
15
|
-
},
|
|
16
|
-
// Mic, 21 Mar 2020: Ergänzt für ioBroker:
|
|
17
|
-
{
|
|
18
|
-
"type": "node",
|
|
19
|
-
"request": "attach",
|
|
20
|
-
"name": "ioBroker attach", // Name, der oben im VS Code Debug-Auswahlmenü rechts neben dem grünen Play-Button angezeigt wird
|
|
21
|
-
"address": "127.0.0.1", // Adresse, an dem der node.js Prozess läuft (bei Remote Debug, der Remote-Rechner)
|
|
22
|
-
"port": 9229 // Port, auf dem der node.js Debugger lauscht, der mit "node --inspect-brk ....\main.js --force --logs" gestartet wird
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
]
|
|
26
|
-
}
|
package/.vscode/settings.json
DELETED