@bitpoolos/edge-bacnet 1.5.0 → 1.5.1
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/CHANGELOG.md +88 -81
- package/bacnet_client.js +39 -14
- package/bacnet_gateway.html +24 -38
- package/bacnet_read.html +1032 -1021
- package/package.json +2 -2
- package/resources/style.css +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.5.1] - 13-11-2024
|
|
4
|
+
|
|
5
|
+
### Summary
|
|
6
|
+
|
|
7
|
+
Npm package update - iconv-lite. Fix for incorrect character string decoding bug
|
|
8
|
+
|
|
9
|
+
Added dialog confirmation to rebuild data model. Fixed modal duplication bug in confirmation service implementation.
|
|
10
|
+
|
|
3
11
|
## [1.5.0] - 31-10-2024
|
|
12
|
+
|
|
4
13
|
### Summary
|
|
5
14
|
|
|
6
|
-
Major feature release - Port range binding
|
|
15
|
+
Major feature release - Port range binding
|
|
7
16
|
|
|
8
17
|
Large amount of bug fixes
|
|
9
18
|
|
|
10
19
|
Added error string to Full Object payload. Contains a BACnet string where an error is found for point, otherwise contains "none".
|
|
11
20
|
|
|
12
|
-
Proceed with caution as a correct port range has to be established in data model in order to continue uptime on existing sites. Doing a device discovery will update device model with port number.
|
|
21
|
+
Proceed with caution as a correct port range has to be established in data model in order to continue uptime on existing sites. Doing a device discovery will update device model with port number.
|
|
13
22
|
|
|
14
|
-
Best method to update this version on existing installs:
|
|
23
|
+
Best method to update this version on existing installs:
|
|
15
24
|
|
|
16
25
|
- Install v1.5.0
|
|
17
26
|
- Restart node-red / docker container
|
|
@@ -20,141 +29,140 @@ Best method to update this version on existing installs:
|
|
|
20
29
|
- Restart node-red / docker container again.
|
|
21
30
|
- Inject manual discovery to gateway node a couple times
|
|
22
31
|
|
|
23
|
-
It is recommended you back up: your node-red flows and gateway Discovery tab device list, incase something goes wrong.
|
|
32
|
+
It is recommended you back up: your node-red flows and gateway Discovery tab device list, incase something goes wrong.
|
|
24
33
|
|
|
25
34
|
## [1.4.6] - 17-09-2024
|
|
35
|
+
|
|
26
36
|
### Summary
|
|
27
37
|
|
|
28
38
|
Minor fixes.
|
|
29
39
|
|
|
30
|
-
Wrapped updateDeviceName function with promise to avoid network conflict for clients.
|
|
40
|
+
Wrapped updateDeviceName function with promise to avoid network conflict for clients.
|
|
31
41
|
|
|
32
42
|
Fixed UI styling bugs, primarily with long names and numbers wrapping.
|
|
33
43
|
|
|
34
|
-
Added ability to set device name of dummy MSTP routers.
|
|
44
|
+
Added ability to set device name of dummy MSTP routers.
|
|
35
45
|
|
|
36
46
|
Improved error handling for querying devices and building point json structures.
|
|
37
47
|
|
|
38
48
|
Fixed read node point export bug.
|
|
39
49
|
|
|
40
|
-
Excluded commas via point name conditioning
|
|
50
|
+
Excluded commas via point name conditioning
|
|
41
51
|
|
|
42
52
|
Fixed gateway port assignment bug - ability to communicate on different ports working now.
|
|
43
53
|
|
|
44
54
|
More async / await refactoring.
|
|
45
55
|
|
|
46
|
-
|
|
47
56
|
## [1.4.5] - 16-08-2024
|
|
57
|
+
|
|
48
58
|
### Summary
|
|
49
59
|
|
|
50
60
|
User interface redesign and restyle. Predominantly colors, buttons, fonts, and placement of UI components.
|
|
51
61
|
|
|
52
|
-
Added timestamp update, and online/offline status update for points when an error has occured during the network request for present value. Use in Simple with status and Full Object payload types.
|
|
53
|
-
|
|
62
|
+
Added timestamp update, and online/offline status update for points when an error has occured during the network request for present value. Use in Simple with status and Full Object payload types.
|
|
54
63
|
|
|
55
64
|
## [1.4.4] - 08-08-2024
|
|
56
|
-
|
|
65
|
+
|
|
66
|
+
### Summary
|
|
57
67
|
|
|
58
68
|
Minor updates.
|
|
59
69
|
|
|
60
|
-
Added device details to meta property when full object property type is selected.
|
|
70
|
+
Added device details to meta property when full object property type is selected.
|
|
61
71
|
|
|
62
72
|
Implemented applyDisplayName feature. Triggered via:
|
|
63
|
-
|
|
64
|
-
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
applyDisplayNames = true;
|
|
65
76
|
```
|
|
66
|
-
property in an inject node, directly linked to a read node. Function flow: inject applyDisplayNames = true to read node -> read node passes msg to gateway node -> gateway node updates bacnet model for device and point display names.
|
|
67
77
|
|
|
68
|
-
|
|
78
|
+
property in an inject node, directly linked to a read node. Function flow: inject applyDisplayNames = true to read node -> read node passes msg to gateway node -> gateway node updates bacnet model for device and point display names.
|
|
69
79
|
|
|
80
|
+
This feature is for use in scenarios where the flows.json or node json structure is programattically generated with a prefilled pointsToRead property. Some devices and points may need displayNames updating.
|
|
70
81
|
|
|
71
82
|
## [1.4.3] - 01-08-2024
|
|
72
|
-
|
|
83
|
+
|
|
84
|
+
### Summary
|
|
73
85
|
|
|
74
86
|
Minor updates.
|
|
75
87
|
|
|
76
|
-
Added refresh button to readList tab on read node, to handle scenarios where read node jsons may be programatically created.
|
|
88
|
+
Added refresh button to readList tab on read node, to handle scenarios where read node jsons may be programatically created.
|
|
77
89
|
|
|
78
|
-
Added "Use device name in topic" topic property in inject and read nodes. This option toggles whether or not the device name is included in the msg.topic.
|
|
90
|
+
Added "Use device name in topic" topic property in inject and read nodes. This option toggles whether or not the device name is included in the msg.topic.
|
|
79
91
|
|
|
80
92
|
Merge github PR 19. Added ability to configure the creation of a BacnetServer object:
|
|
93
|
+
|
|
81
94
|
```javascript
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
payload = {
|
|
96
|
+
value: 12,
|
|
97
|
+
resolution: 0,
|
|
98
|
+
priorityArray: 0,
|
|
99
|
+
units: 0,
|
|
100
|
+
};
|
|
88
101
|
```
|
|
89
102
|
|
|
90
103
|
Inject nodes may need to be deleted and replaced. Try deploying node-red 2 times to instantiate the new deviceName property.
|
|
91
104
|
|
|
92
|
-
|
|
93
105
|
## [1.4.2] - 23-07-2024
|
|
94
|
-
### Summary
|
|
95
106
|
|
|
96
|
-
|
|
107
|
+
### Summary
|
|
97
108
|
|
|
98
|
-
|
|
109
|
+
Improved UI tree generation, fixing some unique scenarios where devices were not being correctly added.
|
|
110
|
+
|
|
111
|
+
Added new payload type: Individual JSON. This publishes JSON payloads to a point level, rather than to a device or property level.
|
|
99
112
|
|
|
100
113
|
Added payload and output types to be configured via Inject node. Any checked options in the inject node will take priority over read node options. Note - to use read node output types only, please deselect all inject node output options.
|
|
101
114
|
|
|
102
|
-
Added dumb BACnet parent devices to UI tree, for unique situations where MSTP devices are on a network without a parent IP device.
|
|
115
|
+
Added dumb BACnet parent devices to UI tree, for unique situations where MSTP devices are on a network without a parent IP device.
|
|
103
116
|
|
|
104
117
|
Bug fixes:
|
|
105
|
-
- Importing read list was incorrectly generating UI
|
|
106
|
-
- Block per device JSON payloads were not using DisplayName and JSON key
|
|
107
|
-
- Added node-red context variable to monitor if writeProperty event has been subscribed to, avoiding a new subscription for every node-red deploy.
|
|
108
|
-
- Fixed issue requiring Bacnet server to be constantly enabled in order for the node to function.
|
|
109
118
|
|
|
119
|
+
- Importing read list was incorrectly generating UI
|
|
120
|
+
- Block per device JSON payloads were not using DisplayName and JSON key
|
|
121
|
+
- Added node-red context variable to monitor if writeProperty event has been subscribed to, avoiding a new subscription for every node-red deploy.
|
|
122
|
+
- Fixed issue requiring Bacnet server to be constantly enabled in order for the node to function.
|
|
110
123
|
|
|
111
|
-
No nodes need to be deleted and replaced for this update.
|
|
124
|
+
No nodes need to be deleted and replaced for this update.
|
|
112
125
|
|
|
113
126
|
## [1.4.1] - 09-07-2024
|
|
114
127
|
|
|
115
128
|
### Summary
|
|
116
129
|
|
|
117
130
|
Bug fixes
|
|
118
|
-
- incorrect variable used in doRead try catch
|
|
119
|
-
- setmaxlisteners on bacnet server event parent class
|
|
120
131
|
|
|
132
|
+
- incorrect variable used in doRead try catch
|
|
133
|
+
- setmaxlisteners on bacnet server event parent class
|
|
121
134
|
|
|
122
135
|
## [1.4.0] - 05-07-2024
|
|
123
136
|
|
|
124
137
|
### Summary
|
|
125
138
|
|
|
126
|
-
Fixed read list export for sites with large point counts.
|
|
139
|
+
Fixed read list export for sites with large point counts.
|
|
127
140
|
|
|
128
|
-
Removed auto tree reload on read node UI. UI tree must be manually reloaded now.
|
|
141
|
+
Removed auto tree reload on read node UI. UI tree must be manually reloaded now.
|
|
129
142
|
|
|
130
|
-
Fixed export to CSV bug.
|
|
143
|
+
Fixed export to CSV bug.
|
|
131
144
|
|
|
132
145
|
Fixed state array text not found bug
|
|
133
146
|
|
|
134
|
-
Removed unecessary debug.
|
|
147
|
+
Removed unecessary debug.
|
|
135
148
|
|
|
136
|
-
Updated required json saved to node JSON file.
|
|
149
|
+
Updated required json saved to node JSON file.
|
|
137
150
|
|
|
138
|
-
Added github pull requests
|
|
139
|
-
- Added create object and delete object to bacnet server
|
|
140
|
-
- Added write property to bacnet server
|
|
151
|
+
Added github pull requests - Added create object and delete object to bacnet server - Added write property to bacnet server
|
|
141
152
|
|
|
142
|
-
Added Simple With Status read property type.
|
|
143
|
-
- This type sends a msg.payload that consists of {presentValue, timestamp, status}
|
|
144
|
-
- Status is currently online and offline
|
|
153
|
+
Added Simple With Status read property type. - This type sends a msg.payload that consists of {presentValue, timestamp, status} - Status is currently online and offline
|
|
145
154
|
|
|
146
155
|
Changed inject node to only 1 selectable type of inject (Discover or Poll)
|
|
147
156
|
|
|
148
|
-
|
|
149
157
|
## [1.3.2] - 18-06-2024
|
|
150
158
|
|
|
151
|
-
### Summary
|
|
159
|
+
### Summary
|
|
152
160
|
|
|
153
161
|
Bug fix for API request URL paths. Updated for using node-red host setting.
|
|
154
162
|
|
|
155
163
|
## [1.3.1] - 06-06-2024
|
|
156
164
|
|
|
157
|
-
### Summary
|
|
165
|
+
### Summary
|
|
158
166
|
|
|
159
167
|
Primarily bug fixes and performance improvements
|
|
160
168
|
|
|
@@ -176,11 +184,10 @@ Primarily bug fixes and performance improvements
|
|
|
176
184
|
|
|
177
185
|
- Devices are immediately added to the UI tree with a device placeholder on a whoIs/iAm response. The devices are then back populated with Names and BACnet Objects. This gives the user a fast understanding of the size and relationships of the BACnet network.
|
|
178
186
|
|
|
179
|
-
- Added docstrings to bacnet_server.js and code clean up.
|
|
187
|
+
- Added docstrings to bacnet_server.js and code clean up.
|
|
180
188
|
|
|
181
189
|
- Set Server enable to default on True
|
|
182
190
|
|
|
183
|
-
|
|
184
191
|
## [1.3.0] - 16-05-2024
|
|
185
192
|
|
|
186
193
|
### Summary
|
|
@@ -198,34 +205,35 @@ This release includes several new features, bug fixes, and performance improveme
|
|
|
198
205
|
- Updated Add All button to add all sub MSTP devices if parent IP device button is selected
|
|
199
206
|
|
|
200
207
|
- Introduced Right click context menu for all device types present in Device List:
|
|
201
|
-
- Purge Device
|
|
202
|
-
- Purges device from active model, removing it from the device list
|
|
203
|
-
- Update Points
|
|
204
|
-
- Triggers point updating function for selected device, beneficial for large bacnet networks
|
|
205
|
-
- Add All Points
|
|
206
|
-
- Same as Add All button
|
|
207
|
-
- Remove All Points
|
|
208
|
-
- Same as Remove All button
|
|
209
|
-
- Set device name
|
|
210
|
-
- Sets device Display Name, which is used in the output of read operations
|
|
211
|
-
|
|
212
|
-
- Introduced Right click context menu for all points present in the Device List:
|
|
213
|
-
- Set point Name
|
|
214
|
-
- Sets point display name, used in the output of read operations
|
|
215
|
-
- Update point
|
|
216
|
-
- Triggers point update function, forces latest present value
|
|
217
|
-
|
|
218
|
-
- Introduced Export and Import of ReadList in the read node.
|
|
219
|
-
- This feature Exports a light weight JSON file with all devices and points added to the Read List. This allows the user to rename all of the devices and points in the Read List via a plain text editor, then Import the modified file. The process of importing will update the Display Names of desired points and device. This feature was introduced with the intention of streamlinibg the naming convetions and processes used for site deployment.
|
|
220
|
-
|
|
221
|
-
- Added support for debian systems, displays All Interfaces (0.0.0.0) in network adapter property
|
|
222
208
|
|
|
223
|
-
-
|
|
209
|
+
- Purge Device
|
|
210
|
+
- Purges device from active model, removing it from the device list
|
|
211
|
+
- Update Points
|
|
212
|
+
- Triggers point updating function for selected device, beneficial for large bacnet networks
|
|
213
|
+
- Add All Points
|
|
214
|
+
- Same as Add All button
|
|
215
|
+
- Remove All Points
|
|
216
|
+
- Same as Remove All button
|
|
217
|
+
- Set device name
|
|
218
|
+
- Sets device Display Name, which is used in the output of read operations
|
|
224
219
|
|
|
225
|
-
-
|
|
226
|
-
|
|
220
|
+
- Introduced Right click context menu for all points present in the Device List:
|
|
221
|
+
|
|
222
|
+
- Set point Name
|
|
223
|
+
- Sets point display name, used in the output of read operations
|
|
224
|
+
- Update point
|
|
225
|
+
- Triggers point update function, forces latest present value
|
|
226
|
+
|
|
227
|
+
- Introduced Export and Import of ReadList in the read node.
|
|
228
|
+
|
|
229
|
+
- This feature Exports a light weight JSON file with all devices and points added to the Read List. This allows the user to rename all of the devices and points in the Read List via a plain text editor, then Import the modified file. The process of importing will update the Display Names of desired points and device. This feature was introduced with the intention of streamlinibg the naming convetions and processes used for site deployment.
|
|
227
230
|
|
|
231
|
+
- Added support for debian systems, displays All Interfaces (0.0.0.0) in network adapter property
|
|
228
232
|
|
|
233
|
+
- Added publish status under gateway node
|
|
234
|
+
|
|
235
|
+
- Implemented usage of gateway and read node names in MQTT topics
|
|
236
|
+
- {gateway node name}/{read node name}/pointName
|
|
229
237
|
|
|
230
238
|
### Bug Fixes
|
|
231
239
|
|
|
@@ -233,16 +241,15 @@ This release includes several new features, bug fixes, and performance improveme
|
|
|
233
241
|
|
|
234
242
|
- Write to MSTP devices bug fix
|
|
235
243
|
|
|
236
|
-
|
|
237
244
|
### Performance Improvements
|
|
238
245
|
|
|
239
|
-
- Added support for a wider range of devices.
|
|
246
|
+
- Added support for a wider range of devices.
|
|
240
247
|
|
|
241
248
|
- Added getProtocolsSupported request to identify bacnet service support for each device
|
|
242
249
|
|
|
243
250
|
- Added apduSize based readPropertyMultiple packaging for reduced network requests
|
|
244
251
|
|
|
245
|
-
- Refactored device tree function and implemented treeBuilder.
|
|
252
|
+
- Refactored device tree function and implemented treeBuilder.
|
|
246
253
|
|
|
247
254
|
- Refactored device object building / querying process
|
|
248
255
|
|
|
@@ -250,7 +257,7 @@ This release includes several new features, bug fixes, and performance improveme
|
|
|
250
257
|
|
|
251
258
|
### Other Changes
|
|
252
259
|
|
|
253
|
-
- Added Changelog
|
|
260
|
+
- Added Changelog
|
|
254
261
|
|
|
255
262
|
- Updated Readme for better node updating.
|
|
256
263
|
|
package/bacnet_client.js
CHANGED
|
@@ -6,7 +6,15 @@ const bacnet = require("./resources/node-bacstack-ts/dist/index.js");
|
|
|
6
6
|
const baEnum = bacnet.enum;
|
|
7
7
|
const bacnetIdMax = baEnum.ASN1_MAX_PROPERTY_ID;
|
|
8
8
|
const { EventEmitter } = require("events");
|
|
9
|
-
const {
|
|
9
|
+
const {
|
|
10
|
+
getUnit,
|
|
11
|
+
roundDecimalPlaces,
|
|
12
|
+
parseBacnetError,
|
|
13
|
+
getBacnetErrorString,
|
|
14
|
+
Read_Config_Sync,
|
|
15
|
+
isNumber,
|
|
16
|
+
decodeBitArray,
|
|
17
|
+
} = require("./common");
|
|
10
18
|
const { ToadScheduler, SimpleIntervalJob, Task } = require("toad-scheduler");
|
|
11
19
|
const { BacnetDevice } = require("./bacnet_device");
|
|
12
20
|
const { Mutex } = require("async-mutex");
|
|
@@ -65,13 +73,12 @@ class BacnetClient extends EventEmitter {
|
|
|
65
73
|
};
|
|
66
74
|
|
|
67
75
|
try {
|
|
68
|
-
|
|
69
76
|
that.client = new bacnet.Client({
|
|
70
77
|
apduTimeout: config.apduTimeout,
|
|
71
78
|
interface: config.localIpAdrress,
|
|
72
79
|
port: config.port,
|
|
73
80
|
broadcastAddress: config.broadCastAddr,
|
|
74
|
-
portRangeMatrix: config.portRangeMatrix
|
|
81
|
+
portRangeMatrix: config.portRangeMatrix,
|
|
75
82
|
});
|
|
76
83
|
that.setMaxListeners(1);
|
|
77
84
|
|
|
@@ -193,15 +200,34 @@ class BacnetClient extends EventEmitter {
|
|
|
193
200
|
|
|
194
201
|
let addressObject = {
|
|
195
202
|
address: address,
|
|
196
|
-
port: port
|
|
203
|
+
port: port,
|
|
197
204
|
};
|
|
198
205
|
|
|
206
|
+
const propertiesArray = [{ objectId: { type: type, instance: instance }, properties: [{ id: property }] }];
|
|
207
|
+
|
|
208
|
+
that.client.readPropertyMultiple(addressObject, propertiesArray, that.readPropertyMultipleOptions, (err, value) => {
|
|
209
|
+
console.log("1 - readPropertyMultiple: ");
|
|
210
|
+
|
|
211
|
+
console.log(value);
|
|
212
|
+
if (value) {
|
|
213
|
+
// If the result has value, resolve the promise
|
|
214
|
+
console.log(value.values[0]);
|
|
215
|
+
value.values[0].values.forEach(function (value) {
|
|
216
|
+
console.log("value: ", value.value);
|
|
217
|
+
});
|
|
218
|
+
} else {
|
|
219
|
+
console.log(err);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
199
223
|
that.client.readProperty(
|
|
200
224
|
addressObject,
|
|
201
225
|
{ type: type, instance: instance },
|
|
202
226
|
property,
|
|
203
227
|
that.readPropertyMultipleOptions,
|
|
204
228
|
(err, value) => {
|
|
229
|
+
console.log("2 - readProperty: ");
|
|
230
|
+
|
|
205
231
|
console.log(value);
|
|
206
232
|
if (value) {
|
|
207
233
|
// If the result has value, resolve the promise
|
|
@@ -264,7 +290,7 @@ class BacnetClient extends EventEmitter {
|
|
|
264
290
|
let that = this;
|
|
265
291
|
let addressObject = {
|
|
266
292
|
address: device.getAddress(),
|
|
267
|
-
port: device.getPort()
|
|
293
|
+
port: device.getPort(),
|
|
268
294
|
};
|
|
269
295
|
return new Promise((resolve, reject) => {
|
|
270
296
|
that.client.readProperty(
|
|
@@ -871,7 +897,7 @@ class BacnetClient extends EventEmitter {
|
|
|
871
897
|
let that = this;
|
|
872
898
|
let addressObject = {
|
|
873
899
|
address: device.getAddress(),
|
|
874
|
-
port: device.getPort()
|
|
900
|
+
port: device.getPort(),
|
|
875
901
|
};
|
|
876
902
|
return new Promise((resolve, reject) => {
|
|
877
903
|
that.client.readProperty(
|
|
@@ -1029,7 +1055,7 @@ class BacnetClient extends EventEmitter {
|
|
|
1029
1055
|
|
|
1030
1056
|
let addressObject = {
|
|
1031
1057
|
address: device.getAddress(),
|
|
1032
|
-
port: device.getPort()
|
|
1058
|
+
port: device.getPort(),
|
|
1033
1059
|
};
|
|
1034
1060
|
|
|
1035
1061
|
let index = 1;
|
|
@@ -1068,7 +1094,7 @@ class BacnetClient extends EventEmitter {
|
|
|
1068
1094
|
let that = this;
|
|
1069
1095
|
let addressObject = {
|
|
1070
1096
|
address: device.getAddress(),
|
|
1071
|
-
port: device.getPort()
|
|
1097
|
+
port: device.getPort(),
|
|
1072
1098
|
};
|
|
1073
1099
|
return new Promise((resolve, reject) => {
|
|
1074
1100
|
that.client.readPropertyMultiple(addressObject, requestArray, readOptions, (error, value) => {
|
|
@@ -1085,7 +1111,7 @@ class BacnetClient extends EventEmitter {
|
|
|
1085
1111
|
|
|
1086
1112
|
let addressObject = {
|
|
1087
1113
|
address: device.getAddress(),
|
|
1088
|
-
port: device.getPort()
|
|
1114
|
+
port: device.getPort(),
|
|
1089
1115
|
};
|
|
1090
1116
|
let deviceId = device.getDeviceId();
|
|
1091
1117
|
|
|
@@ -1102,7 +1128,7 @@ class BacnetClient extends EventEmitter {
|
|
|
1102
1128
|
let that = this;
|
|
1103
1129
|
let addressObject = {
|
|
1104
1130
|
address: device.getAddress(),
|
|
1105
|
-
port: device.getPort()
|
|
1131
|
+
port: device.getPort(),
|
|
1106
1132
|
};
|
|
1107
1133
|
let deviceId = device.getDeviceId();
|
|
1108
1134
|
try {
|
|
@@ -1150,7 +1176,7 @@ class BacnetClient extends EventEmitter {
|
|
|
1150
1176
|
|
|
1151
1177
|
let addressObject = {
|
|
1152
1178
|
address: device.getAddress(),
|
|
1153
|
-
port: device.getPort()
|
|
1179
|
+
port: device.getPort(),
|
|
1154
1180
|
};
|
|
1155
1181
|
|
|
1156
1182
|
// Define all properties to be read
|
|
@@ -1251,7 +1277,7 @@ class BacnetClient extends EventEmitter {
|
|
|
1251
1277
|
|
|
1252
1278
|
let addressObject = {
|
|
1253
1279
|
address: device.getAddress(),
|
|
1254
|
-
port: device.getPort()
|
|
1280
|
+
port: device.getPort(),
|
|
1255
1281
|
};
|
|
1256
1282
|
|
|
1257
1283
|
// Define all properties to be read
|
|
@@ -1333,7 +1359,7 @@ class BacnetClient extends EventEmitter {
|
|
|
1333
1359
|
let device = that.deviceList.find((ele) => ele.getDeviceId() === point.deviceId);
|
|
1334
1360
|
let addressObject = {
|
|
1335
1361
|
address: device.getAddress(),
|
|
1336
|
-
port: device.getPort()
|
|
1362
|
+
port: device.getPort(),
|
|
1337
1363
|
};
|
|
1338
1364
|
|
|
1339
1365
|
let writeObject = {
|
|
@@ -1671,7 +1697,6 @@ class BacnetClient extends EventEmitter {
|
|
|
1671
1697
|
that.buildJsonInProgress = false;
|
|
1672
1698
|
}
|
|
1673
1699
|
|
|
1674
|
-
|
|
1675
1700
|
async buildJsonObject(device) {
|
|
1676
1701
|
try {
|
|
1677
1702
|
const pointList = device.getPointsList();
|
package/bacnet_gateway.html
CHANGED
|
@@ -238,14 +238,15 @@
|
|
|
238
238
|
|
|
239
239
|
queryAdapters();
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
window.confirmDialogExists = window.confirmDialogExists || false;
|
|
242
|
+
|
|
243
|
+
if (node.vm1 == undefined && !window.confirmDialogExists) {
|
|
242
244
|
const confirmDialog = document.createElement("p-confirm-dialog");
|
|
243
245
|
document.getElementById("serverParent").appendChild(confirmDialog);
|
|
246
|
+
window.confirmDialogExists = true;
|
|
244
247
|
}
|
|
245
248
|
|
|
246
249
|
const { createApp, ref, onMounted } = Vue;
|
|
247
|
-
const ConfirmDialog = primevue.confirmdialog;
|
|
248
|
-
const ConfirmationService = primevue.confirmationservice;
|
|
249
250
|
const ListBox = primevue.listbox;
|
|
250
251
|
|
|
251
252
|
//prime vue app
|
|
@@ -517,7 +518,6 @@
|
|
|
517
518
|
document.getElementById("node-input-reg-block-count-portRangeMatrix").innerHTML = $(
|
|
518
519
|
"#node-input-portRangeMatrix-container"
|
|
519
520
|
).editableList("length");
|
|
520
|
-
|
|
521
521
|
},
|
|
522
522
|
removeItem: function (data) {
|
|
523
523
|
document.getElementById("node-input-reg-block-count-portRangeMatrix").innerHTML = $(
|
|
@@ -587,7 +587,6 @@
|
|
|
587
587
|
|
|
588
588
|
document.getElementById("node-input-reg-block-count-portRangeMatrix").innerHTML = node.portRangeRegisters.length;
|
|
589
589
|
//end port range matrix
|
|
590
|
-
|
|
591
590
|
},
|
|
592
591
|
oneditsave: function () {
|
|
593
592
|
let node = this;
|
|
@@ -619,7 +618,6 @@
|
|
|
619
618
|
node.deviceRangeRegisters.push(mapItem);
|
|
620
619
|
});
|
|
621
620
|
|
|
622
|
-
|
|
623
621
|
node.portRangeRegisters = [];
|
|
624
622
|
let portRanges = $("#node-input-portRangeMatrix-container").editableList("items");
|
|
625
623
|
portRanges.each(function (i) {
|
|
@@ -631,7 +629,6 @@
|
|
|
631
629
|
};
|
|
632
630
|
node.portRangeRegisters.push(mapItem);
|
|
633
631
|
});
|
|
634
|
-
|
|
635
632
|
},
|
|
636
633
|
});
|
|
637
634
|
|
|
@@ -680,10 +677,6 @@
|
|
|
680
677
|
margin-top: 20px;
|
|
681
678
|
margin-left: 50px;
|
|
682
679
|
}
|
|
683
|
-
.p-confirm-dialog-accept > .p-button-label,
|
|
684
|
-
.bacnetServerRebuildSchedule_clearButton > .p-button-label {
|
|
685
|
-
color: white;
|
|
686
|
-
}
|
|
687
680
|
.red-ui-editor label {
|
|
688
681
|
font-size: 12px;
|
|
689
682
|
}
|
|
@@ -761,8 +754,7 @@
|
|
|
761
754
|
|
|
762
755
|
<div class="form-row bp-row" id="networkInterfaceDiv">
|
|
763
756
|
<label for="node-input-local_device_address"
|
|
764
|
-
><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.local_device_address"></span> Network
|
|
765
|
-
Interface</label
|
|
757
|
+
><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.local_device_address"></span> Network Interface</label
|
|
766
758
|
>
|
|
767
759
|
<select id="node-input-local_device_address"></select>
|
|
768
760
|
</div>
|
|
@@ -795,7 +787,6 @@
|
|
|
795
787
|
<div class="form-row node-input-deviceIdRangeMatrix-container-row bp-row">
|
|
796
788
|
<ol id="node-input-deviceIdRangeMatrix-container"></ol>
|
|
797
789
|
</div>
|
|
798
|
-
|
|
799
790
|
</div>
|
|
800
791
|
|
|
801
792
|
<div id="read-discover-tab" style="display:none">
|
|
@@ -898,8 +889,8 @@
|
|
|
898
889
|
|
|
899
890
|
<div class="form-row bp-row" style="align-items: center; display: none;">
|
|
900
891
|
<label for="node-input-sanitise_device_schedule_value"
|
|
901
|
-
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.sanitise_device_schedule"></span>Device
|
|
902
|
-
|
|
892
|
+
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.sanitise_device_schedule"></span>Device Sanitisation
|
|
893
|
+
Frequency</label
|
|
903
894
|
>
|
|
904
895
|
<p style="margin-right: 5px; margin-bottom: 0px; padding-left: 7px;">Every</p>
|
|
905
896
|
<input type="text" id="node-input-sanitise_device_schedule" style="display: none;" />
|
|
@@ -917,17 +908,17 @@
|
|
|
917
908
|
</div>
|
|
918
909
|
|
|
919
910
|
<div class="form-row bp-checkbox-row">
|
|
920
|
-
<input type="checkbox" id="node-input-cacheFileEnabled" class="bp-checkbox"/>
|
|
911
|
+
<input type="checkbox" id="node-input-cacheFileEnabled" class="bp-checkbox" />
|
|
921
912
|
<label for="node-input-cacheFileEnabled"> Enable cache file </label>
|
|
922
913
|
</div>
|
|
923
914
|
|
|
924
915
|
<div class="form-row bp-checkbox-row">
|
|
925
|
-
<input type="checkbox" id="node-input-toLogIam" class="bp-checkbox"/>
|
|
916
|
+
<input type="checkbox" id="node-input-toLogIam" class="bp-checkbox" />
|
|
926
917
|
<label for="node-input-toLogIam"> Log found device </label>
|
|
927
918
|
</div>
|
|
928
919
|
|
|
929
920
|
<div class="form-row bp-checkbox-row" style="border-bottom: 1px solid #cbcbcb; padding-bottom: 20px;">
|
|
930
|
-
<input type="checkbox" id="node-input-logErrorToConsole" class="bp-checkbox"/>
|
|
921
|
+
<input type="checkbox" id="node-input-logErrorToConsole" class="bp-checkbox" />
|
|
931
922
|
<label for="node-input-logErrorToConsole"> Log BACnet errors to console </label>
|
|
932
923
|
</div>
|
|
933
924
|
|
|
@@ -949,15 +940,12 @@
|
|
|
949
940
|
|
|
950
941
|
<div id="read-server-tab" style="display:none">
|
|
951
942
|
<div class="form-row bp-checkbox-row">
|
|
952
|
-
<input type="checkbox" id="node-input-serverEnabled" class="bp-checkbox"/>
|
|
943
|
+
<input type="checkbox" id="node-input-serverEnabled" class="bp-checkbox" />
|
|
953
944
|
<label for="node-input-serverEnabled"> Enable Server </label>
|
|
954
945
|
</div>
|
|
955
946
|
|
|
956
947
|
<div class="read_server_parent_div" id="serverParent">
|
|
957
|
-
<div
|
|
958
|
-
class="form-row bp-row clearServerContainer"
|
|
959
|
-
id="clearServerContainer"
|
|
960
|
-
style="align-items: center; display: flex;">
|
|
948
|
+
<div class="form-row bp-row clearServerContainer" id="clearServerContainer" style="align-items: center; display: flex;">
|
|
961
949
|
<p-button class="bacnetServerRebuildSchedule_clearButton" @click="confirmAll($event)" label="Reinitialize Server">
|
|
962
950
|
</p-button>
|
|
963
951
|
</div>
|
|
@@ -990,8 +978,8 @@
|
|
|
990
978
|
<h3><strong>Gateway Tab</strong></h3>
|
|
991
979
|
<ul class="node-ports">
|
|
992
980
|
<li>
|
|
993
|
-
Network Interface - the desired interface for the bacstack client to bind to. This interface must not have any other
|
|
994
|
-
|
|
981
|
+
Network Interface - the desired interface for the bacstack client to bind to. This interface must not have any other BACnet
|
|
982
|
+
clients bound to it.
|
|
995
983
|
</li>
|
|
996
984
|
<li>
|
|
997
985
|
Broadcast Address - the desired subnet for global msgs to be broadcast and recieved on. This should be as strict as
|
|
@@ -1006,13 +994,13 @@
|
|
|
1006
994
|
<li>Max APDU Size - BACnet max apdu size</li>
|
|
1007
995
|
<li>Max Segments - BACnet max segments</li>
|
|
1008
996
|
<li>
|
|
1009
|
-
Global Discover Frequency - the frequency at which the gateway issues global WhoIs BACnet commands. This should be
|
|
1010
|
-
|
|
997
|
+
Global Discover Frequency - the frequency at which the gateway issues global WhoIs BACnet commands. This should be limited
|
|
998
|
+
to the least amount possible, as over-loading a network can be a serious issue with BACnet commmunications.
|
|
1011
999
|
</li>
|
|
1012
1000
|
<li>
|
|
1013
|
-
Manual Point Discovery Instance Range - if a BACnet device doesnt have a Object list (BACnet objectType:propertyId -
|
|
1014
|
-
|
|
1015
|
-
|
|
1001
|
+
Manual Point Discovery Instance Range - if a BACnet device doesnt have a Object list (BACnet objectType:propertyId - 8:76),
|
|
1002
|
+
the this bacnet client will enter into manual discovery mode, where it iterates through types and instnace ranges. This
|
|
1003
|
+
range can be used to limit this manual scanning
|
|
1016
1004
|
</li>
|
|
1017
1005
|
<li>Log Device Found - toggles logging of found devices to the node-red debug tab.</li>
|
|
1018
1006
|
<li>Log BACnet Errors to Console - toggles logging of BACnet related errors to the node-red console</li>
|
|
@@ -1025,20 +1013,18 @@
|
|
|
1025
1013
|
devices via BACnet/IP
|
|
1026
1014
|
</p>
|
|
1027
1015
|
<p>
|
|
1028
|
-
This node only supports 2 BACnet object types, Analog Value - to show numeric data, and a Character String - to show
|
|
1029
|
-
|
|
1016
|
+
This node only supports 2 BACnet object types, Analog Value - to show numeric data, and a Character String - to show string
|
|
1017
|
+
data.
|
|
1030
1018
|
</p>
|
|
1031
1019
|
<ul class="node-ports">
|
|
1032
1020
|
<li>Enabled - toggles whether or not the local BACnet server is started or not.</li>
|
|
1033
|
-
<li>
|
|
1034
|
-
Clear Server Points - a schedule for the locally generated BACnet points to get cleared from the node object store
|
|
1035
|
-
</li>
|
|
1021
|
+
<li>Clear Server Points - a schedule for the locally generated BACnet points to get cleared from the node object store</li>
|
|
1036
1022
|
</ul>
|
|
1037
1023
|
|
|
1038
1024
|
<h3><strong>Examples</strong></h3>
|
|
1039
1025
|
<p>
|
|
1040
|
-
For example flows, please use the examples section for this node. These examples can be found at: Node-red hamburger menu
|
|
1041
|
-
|
|
1026
|
+
For example flows, please use the examples section for this node. These examples can be found at: Node-red hamburger menu on
|
|
1027
|
+
top right -> Import -> Examples -> @bitpoolos/edge-bacnet
|
|
1042
1028
|
</p>
|
|
1043
1029
|
<p>
|
|
1044
1030
|
To find captured examples of settings and flows, please go to our wiki
|