@bitpoolos/edge-bacnet 1.4.3 → 1.4.5
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 +24 -0
- package/bacnet_client.js +200 -123
- package/bacnet_gateway.html +141 -135
- package/bacnet_gateway.js +15 -0
- package/bacnet_read.html +45 -42
- package/bacnet_read.js +69 -60
- package/bacnet_write.html +7 -5
- package/bitpool_inject.html +49 -136
- package/package.json +1 -1
- package/resources/style.css +602 -202
- package/treeBuilder.js +0 -1
package/bacnet_gateway.html
CHANGED
|
@@ -84,57 +84,57 @@
|
|
|
84
84
|
return fetch(RED.settings.httpNodeRoot + "bitpool-bacnet-data/clearBacnetServerPoints").then((res) => res.json());
|
|
85
85
|
}
|
|
86
86
|
getBacnetServerPoints() {
|
|
87
|
-
return fetch(RED.settings.httpNodeRoot +
|
|
87
|
+
return fetch(RED.settings.httpNodeRoot + "bitpool-bacnet-data/getBacnetServerPoints").then((res) => res.json());
|
|
88
88
|
}
|
|
89
89
|
purgeDevice(device) {
|
|
90
|
-
return fetch(RED.settings.httpNodeRoot +
|
|
91
|
-
method:
|
|
90
|
+
return fetch(RED.settings.httpNodeRoot + "bitpool-bacnet-data/purgeDevice", {
|
|
91
|
+
method: "POST",
|
|
92
92
|
headers: {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
Accept: "application/json",
|
|
94
|
+
"Content-Type": "application/json",
|
|
95
95
|
},
|
|
96
|
-
body: JSON.stringify({ d: device })
|
|
97
|
-
}).then(res => res.json());
|
|
96
|
+
body: JSON.stringify({ d: device }),
|
|
97
|
+
}).then((res) => res.json());
|
|
98
98
|
}
|
|
99
99
|
updatePointsForDevice(device) {
|
|
100
|
-
return fetch(RED.settings.httpNodeRoot +
|
|
101
|
-
method:
|
|
100
|
+
return fetch(RED.settings.httpNodeRoot + "bitpool-bacnet-data/updatePointsForDevice", {
|
|
101
|
+
method: "POST",
|
|
102
102
|
headers: {
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
"Content-Type": "application/json",
|
|
105
105
|
},
|
|
106
|
-
body: JSON.stringify({ d: device })
|
|
107
|
-
}).then(res => res.json());
|
|
106
|
+
body: JSON.stringify({ d: device }),
|
|
107
|
+
}).then((res) => res.json());
|
|
108
108
|
}
|
|
109
109
|
setDeviceDisplayName(device, displayName) {
|
|
110
|
-
return fetch(RED.settings.httpNodeRoot +
|
|
111
|
-
method:
|
|
110
|
+
return fetch(RED.settings.httpNodeRoot + "bitpool-bacnet-data/setDeviceDisplayName", {
|
|
111
|
+
method: "POST",
|
|
112
112
|
headers: {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
Accept: "application/json",
|
|
114
|
+
"Content-Type": "application/json",
|
|
115
115
|
},
|
|
116
|
-
body: JSON.stringify({ d: device, n: displayName })
|
|
117
|
-
}).then(res => res.json());
|
|
116
|
+
body: JSON.stringify({ d: device, n: displayName }),
|
|
117
|
+
}).then((res) => res.json());
|
|
118
118
|
}
|
|
119
119
|
setPointDisplayName(deviceKey, pointName, pointDisplayName) {
|
|
120
|
-
return fetch(RED.settings.httpNodeRoot +
|
|
121
|
-
method:
|
|
120
|
+
return fetch(RED.settings.httpNodeRoot + "bitpool-bacnet-data/setPointDisplayName", {
|
|
121
|
+
method: "POST",
|
|
122
122
|
headers: {
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
Accept: "application/json",
|
|
124
|
+
"Content-Type": "application/json",
|
|
125
125
|
},
|
|
126
|
-
body: JSON.stringify({ k: deviceKey, p: pointName, n: pointDisplayName })
|
|
127
|
-
}).then(res => res.json());
|
|
126
|
+
body: JSON.stringify({ k: deviceKey, p: pointName, n: pointDisplayName }),
|
|
127
|
+
}).then((res) => res.json());
|
|
128
128
|
}
|
|
129
129
|
importReadList(payload) {
|
|
130
|
-
return fetch(RED.settings.httpNodeRoot +
|
|
131
|
-
method:
|
|
130
|
+
return fetch(RED.settings.httpNodeRoot + "bitpool-bacnet-data/importReadList", {
|
|
131
|
+
method: "POST",
|
|
132
132
|
headers: {
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
Accept: "application/json",
|
|
134
|
+
"Content-Type": "application/json",
|
|
135
135
|
},
|
|
136
|
-
body: JSON.stringify({ p: payload })
|
|
137
|
-
}).then(res => res.json());
|
|
136
|
+
body: JSON.stringify({ p: payload }),
|
|
137
|
+
}).then((res) => res.json());
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
RED.nodes.registerType("Bacnet-Gateway", {
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
return {
|
|
254
254
|
nodeService: ref(new NodeService()),
|
|
255
255
|
serverObjects: ref([]),
|
|
256
|
-
selectedServerObject: ref()
|
|
256
|
+
selectedServerObject: ref(),
|
|
257
257
|
};
|
|
258
258
|
},
|
|
259
259
|
mounted() {
|
|
@@ -280,35 +280,35 @@
|
|
|
280
280
|
},
|
|
281
281
|
confirm(json) {
|
|
282
282
|
this.$confirm.require({
|
|
283
|
-
message:
|
|
284
|
-
header:
|
|
285
|
-
icon:
|
|
286
|
-
acceptClass:
|
|
283
|
+
message: "Do you want to clear this BACnet server point? This action is not reversible",
|
|
284
|
+
header: "Delete Confirmation",
|
|
285
|
+
icon: "pi pi-info-circle",
|
|
286
|
+
acceptClass: "p-button-danger",
|
|
287
287
|
accept: () => {
|
|
288
|
-
//handle accept
|
|
288
|
+
//handle accept
|
|
289
289
|
let app = this;
|
|
290
290
|
$.ajax({
|
|
291
291
|
type: "POST",
|
|
292
|
-
url: RED.settings.httpNodeRoot +
|
|
293
|
-
dataType:
|
|
294
|
-
contentType:
|
|
292
|
+
url: RED.settings.httpNodeRoot + "bitpool-bacnet-data/clearBacnetServerPoint",
|
|
293
|
+
dataType: "json",
|
|
294
|
+
contentType: "application/json",
|
|
295
295
|
data: JSON.stringify(json),
|
|
296
296
|
success: function (result) {
|
|
297
297
|
app.getServerObjects();
|
|
298
298
|
},
|
|
299
|
-
timeout: 10000
|
|
299
|
+
timeout: 10000,
|
|
300
300
|
});
|
|
301
301
|
},
|
|
302
302
|
reject: () => {
|
|
303
303
|
//handle reject
|
|
304
|
-
}
|
|
304
|
+
},
|
|
305
305
|
});
|
|
306
306
|
},
|
|
307
307
|
getServerObjects() {
|
|
308
308
|
let app = this;
|
|
309
309
|
this.nodeService.getBacnetServerPoints().then(function (result) {
|
|
310
310
|
app.serverObjects = result;
|
|
311
|
-
})
|
|
311
|
+
});
|
|
312
312
|
},
|
|
313
313
|
formatObjectName(name) {
|
|
314
314
|
//return shortened point name if longer than 50 characters
|
|
@@ -316,7 +316,7 @@
|
|
|
316
316
|
return name.slice(0, 45).concat("...");
|
|
317
317
|
}
|
|
318
318
|
return name;
|
|
319
|
-
}
|
|
319
|
+
},
|
|
320
320
|
},
|
|
321
321
|
components: {
|
|
322
322
|
"p-button": primevue.button,
|
|
@@ -389,13 +389,15 @@
|
|
|
389
389
|
rowData.end = "";
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
+
let itemNumber = index + 1;
|
|
392
393
|
let fragment = document.createDocumentFragment();
|
|
393
394
|
let htmlRow = `
|
|
394
395
|
<div class="form-row deviceIdRangeEntry" id="node-input-device_id_range">
|
|
395
|
-
<
|
|
396
|
-
<input type="checkbox" id="node-input-device_id_range_entry_enabled" style="width: auto;" ${rowData.enabled} />
|
|
396
|
+
<span class='bp-matrix-itemIndex'> ${itemNumber} </span>
|
|
397
397
|
<a style="padding-left: 60px;">Start: </a><input type="number" id="node-input-device_id_range_entry_start" style="width: 125px;" min="0" max="4194303" value="${rowData.start}" />
|
|
398
398
|
<a style="padding-left: 35px;">End: </a><input type="number" id="node-input-device_id_range_entry_end" style="width: 125px;" min="1" max="4194303" value="${rowData.end}" />
|
|
399
|
+
<label class='bp-matrix-enable' for="node-input-device_id_range_entry"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.device_id_range_entry"></span>
|
|
400
|
+
<input type="checkbox" id="node-input-device_id_range_entry_enabled" style="width: auto;" ${rowData.enabled} /> </label>
|
|
399
401
|
</div>`;
|
|
400
402
|
|
|
401
403
|
$(htmlRow).appendTo(fragment);
|
|
@@ -413,7 +415,7 @@
|
|
|
413
415
|
scrollOnAdd: false,
|
|
414
416
|
header: $("<div style='display:flex; padding:10px 10px 0px 5px; column-gap: 10px'>").append(
|
|
415
417
|
$.parseHTML(
|
|
416
|
-
"<div><
|
|
418
|
+
"<div><span class='bp-matrix-heading'>Device ID Range(s)</span> </div><div class='bp-matrix-count' style='color: gray'><label id='node-input-reg-block-count' >0</label> </div>"
|
|
417
419
|
)
|
|
418
420
|
),
|
|
419
421
|
buttons: [
|
|
@@ -557,10 +559,11 @@
|
|
|
557
559
|
font-size: 12px;
|
|
558
560
|
}
|
|
559
561
|
.bacnetServerRebuildSchedule_clearButton {
|
|
560
|
-
|
|
562
|
+
background: #00adef;
|
|
563
|
+
border-color: #00adef;
|
|
561
564
|
width: 200px;
|
|
562
565
|
border-radius: 3px;
|
|
563
|
-
margin-left:
|
|
566
|
+
margin-left: 110px !important;
|
|
564
567
|
}
|
|
565
568
|
.clearServerContainer {
|
|
566
569
|
position: absolute;
|
|
@@ -568,11 +571,13 @@
|
|
|
568
571
|
margin-left: 280px;
|
|
569
572
|
}
|
|
570
573
|
.bacnetServerPoint_clearButton {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
background: none !important;
|
|
575
|
+
box-shadow: none !important;
|
|
576
|
+
width: 30px;
|
|
577
|
+
border-radius: 3px;
|
|
578
|
+
margin-left: 550px !important;
|
|
579
|
+
margin-top: -75px !important;
|
|
580
|
+
border: none !important;
|
|
576
581
|
}
|
|
577
582
|
.bacnetServerPoint_clearButton > .p-button-label {
|
|
578
583
|
color: white;
|
|
@@ -620,58 +625,54 @@
|
|
|
620
625
|
|
|
621
626
|
<div id="node-input-tabs-content">
|
|
622
627
|
<div id="read-properties-tab" style="display:none">
|
|
623
|
-
<div class="form-row">
|
|
628
|
+
<div class="form-row bp-row">
|
|
624
629
|
<label for="node-input-name"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.name"></span> Name</label>
|
|
625
630
|
<input type="text" id="node-input-name" placeholder="Name" />
|
|
626
631
|
</div>
|
|
627
632
|
|
|
628
|
-
<div class="form-row
|
|
629
|
-
<ul style="min-width:600px;margin-bottom:20px" id="node-input-read-tabs"></ul>
|
|
630
|
-
</div>
|
|
631
|
-
|
|
632
|
-
<div class="form-row" id="networkInterfaceDiv">
|
|
633
|
+
<div class="form-row bp-row" id="networkInterfaceDiv">
|
|
633
634
|
<label for="node-input-local_device_address"
|
|
634
635
|
><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.local_device_address"></span> Network
|
|
635
636
|
Interface</label
|
|
636
637
|
>
|
|
637
|
-
<select id="node-input-local_device_address"
|
|
638
|
+
<select id="node-input-local_device_address"></select>
|
|
638
639
|
</div>
|
|
639
640
|
|
|
640
|
-
<div class="form-row">
|
|
641
|
+
<div class="form-row bp-row">
|
|
641
642
|
<label for="node-input-broadCastAddr"
|
|
642
643
|
><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.broadCastAddr"></span> Broadcast Address
|
|
643
644
|
</label>
|
|
644
645
|
<input type="text" id="node-input-broadCastAddr" placeholder="255.255.255.255" />
|
|
645
646
|
</div>
|
|
646
647
|
|
|
647
|
-
<div class="form-row">
|
|
648
|
+
<div class="form-row bp-row">
|
|
648
649
|
<label for="node-input-local_device_port"
|
|
649
650
|
><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.local_device_port"></span> Local Device Port</label
|
|
650
651
|
>
|
|
651
652
|
<input type="text" id="node-input-local_device_port" placeholder="47808" />
|
|
652
653
|
</div>
|
|
653
654
|
|
|
654
|
-
<div class="form-row">
|
|
655
|
+
<div class="form-row bp-row">
|
|
655
656
|
<label for="node-input-deviceId"
|
|
656
657
|
><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.deviceId"></span> Device ID
|
|
657
658
|
</label>
|
|
658
659
|
<input type="text" id="node-input-deviceId" placeholder="817001" />
|
|
659
660
|
</div>
|
|
660
661
|
|
|
661
|
-
<div class="form-row node-input-deviceIdRangeMatrix-container-row">
|
|
662
|
-
<ol id="node-input-deviceIdRangeMatrix-container"
|
|
662
|
+
<div class="form-row node-input-deviceIdRangeMatrix-container-row bp-row">
|
|
663
|
+
<ol id="node-input-deviceIdRangeMatrix-container"></ol>
|
|
663
664
|
</div>
|
|
664
665
|
</div>
|
|
665
666
|
|
|
666
667
|
<div id="read-discover-tab" style="display:none">
|
|
667
|
-
<div class="form-row">
|
|
668
|
+
<div class="form-row bp-row">
|
|
668
669
|
<label for="node-input-apduTimeout"
|
|
669
670
|
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.apduTimeout"></span>Apdu Timeout</label
|
|
670
671
|
>
|
|
671
672
|
<input type="text" id="node-input-apduTimeout" placeholder="10000" />
|
|
672
673
|
</div>
|
|
673
674
|
|
|
674
|
-
<div class="form-row" style="display: none;">
|
|
675
|
+
<div class="form-row bp-row" style="display: none;">
|
|
675
676
|
<label for="node-input-apduSize"
|
|
676
677
|
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.apduSize"></span>Max Apdu Size</label
|
|
677
678
|
>
|
|
@@ -685,7 +686,7 @@
|
|
|
685
686
|
</select>
|
|
686
687
|
</div>
|
|
687
688
|
|
|
688
|
-
<div class="form-row" style="display: none;">
|
|
689
|
+
<div class="form-row bp-row" style="display: none;">
|
|
689
690
|
<label for="node-input-maxSegments"
|
|
690
691
|
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.maxSegments"></span>Max Segments</label
|
|
691
692
|
>
|
|
@@ -701,7 +702,7 @@
|
|
|
701
702
|
</select>
|
|
702
703
|
</div>
|
|
703
704
|
|
|
704
|
-
<div class="form-row" style="display: none;">
|
|
705
|
+
<div class="form-row bp-row" style="display: none;">
|
|
705
706
|
<label for="node-input-retries"
|
|
706
707
|
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.retries"></span>Number of Retries</label
|
|
707
708
|
>
|
|
@@ -720,50 +721,51 @@
|
|
|
720
721
|
</select>
|
|
721
722
|
</div>
|
|
722
723
|
|
|
723
|
-
<div class="form-row
|
|
724
|
-
<label for="node-input-discover_polling_schedule_value"
|
|
725
|
-
|
|
726
|
-
Frequency
|
|
727
|
-
>
|
|
728
|
-
<
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
type="text"
|
|
732
|
-
id="node-input-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
<option value="Days">Days</option>
|
|
740
|
-
</select>
|
|
724
|
+
<div class="form-row bp-row">
|
|
725
|
+
<label for="node-input-discover_polling_schedule_value">
|
|
726
|
+
<i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.bacnet_polling_schedule"></span>
|
|
727
|
+
Device Discover Frequency
|
|
728
|
+
</label>
|
|
729
|
+
<div class="bp-frequency-container">
|
|
730
|
+
<p>Every</p>
|
|
731
|
+
<input type="text" id="node-input-discover_polling_schedule" style="display: none;" />
|
|
732
|
+
<input type="text" class="bp-frequency-input" id="node-input-discover_polling_schedule_value" placeholder="5" />
|
|
733
|
+
<select name="timePeriod" id="node-input-discover_polling_schedule_options" class="bp-frequency-select">
|
|
734
|
+
<option value="Seconds">Seconds</option>
|
|
735
|
+
<option value="Minutes">Minutes</option>
|
|
736
|
+
<option value="Hours">Hours</option>
|
|
737
|
+
<option value="Days">Days</option>
|
|
738
|
+
</select>
|
|
739
|
+
</div>
|
|
741
740
|
</div>
|
|
742
741
|
|
|
743
|
-
<div class="form-row
|
|
742
|
+
<div class="form-row bp-row">
|
|
744
743
|
<label for="node-input-device_read_schedule_value"
|
|
745
744
|
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.device_read_schedule"></span>Object Discover
|
|
746
745
|
Frequency</label
|
|
747
746
|
>
|
|
748
|
-
<
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
<
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
747
|
+
<div class="bp-frequency-container">
|
|
748
|
+
<p>Every</p>
|
|
749
|
+
<input type="text" id="node-input-device_read_schedule" style="display: none;" />
|
|
750
|
+
<input
|
|
751
|
+
type="text"
|
|
752
|
+
class="bp-frequency-input"
|
|
753
|
+
id="node-input-device_read_schedule_value"
|
|
754
|
+
placeholder="5"
|
|
755
|
+
style="width: 70px; margin-right: 5px;" />
|
|
756
|
+
<select name="timePeriod" id="node-input-device_read_schedule_options" class="bp-frequency-select">
|
|
757
|
+
<option value="Seconds">Seconds</option>
|
|
758
|
+
<option value="Minutes">Minutes</option>
|
|
759
|
+
<option value="Hours">Hours</option>
|
|
760
|
+
<option value="Days">Days</option>
|
|
761
|
+
</select>
|
|
762
|
+
</div>
|
|
761
763
|
</div>
|
|
762
764
|
|
|
763
|
-
<div class="form-row" style="align-items: center; display: none;">
|
|
765
|
+
<div class="form-row bp-row" style="align-items: center; display: none;">
|
|
764
766
|
<label for="node-input-sanitise_device_schedule_value"
|
|
765
|
-
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.sanitise_device_schedule"></span>Device
|
|
766
|
-
Frequency</label
|
|
767
|
+
><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.sanitise_device_schedule"></span>Device
|
|
768
|
+
Sanitisation Frequency</label
|
|
767
769
|
>
|
|
768
770
|
<p style="margin-right: 5px; margin-bottom: 0px; padding-left: 7px;">Every</p>
|
|
769
771
|
<input type="text" id="node-input-sanitise_device_schedule" style="display: none;" />
|
|
@@ -780,29 +782,31 @@
|
|
|
780
782
|
</select>
|
|
781
783
|
</div>
|
|
782
784
|
|
|
783
|
-
<div class="form-row">
|
|
784
|
-
<
|
|
785
|
-
<
|
|
785
|
+
<div class="form-row bp-checkbox-row">
|
|
786
|
+
<input type="checkbox" id="node-input-cacheFileEnabled" class="bp-checkbox"/>
|
|
787
|
+
<label for="node-input-cacheFileEnabled"> Enable cache file </label>
|
|
786
788
|
</div>
|
|
787
789
|
|
|
788
|
-
<div class="form-row">
|
|
789
|
-
<
|
|
790
|
-
<
|
|
790
|
+
<div class="form-row bp-checkbox-row">
|
|
791
|
+
<input type="checkbox" id="node-input-toLogIam" class="bp-checkbox"/>
|
|
792
|
+
<label for="node-input-toLogIam"> Log found device </label>
|
|
791
793
|
</div>
|
|
792
794
|
|
|
793
|
-
<div class="form-row">
|
|
794
|
-
<
|
|
795
|
-
<
|
|
795
|
+
<div class="form-row bp-checkbox-row" style="border-bottom: 1px solid #cbcbcb; padding-bottom: 20px;">
|
|
796
|
+
<input type="checkbox" id="node-input-logErrorToConsole" class="bp-checkbox"/>
|
|
797
|
+
<label for="node-input-logErrorToConsole"> Log BACnet errors to console </label>
|
|
796
798
|
</div>
|
|
797
799
|
|
|
798
|
-
<div class="form-row" id="importDeviceList">
|
|
799
|
-
<label> Device List: </label>
|
|
800
|
+
<div class="form-row bp-import-buttons" id="importDeviceList">
|
|
801
|
+
<!-- <label> Device List: </label> -->
|
|
800
802
|
<label for="file-upload" class="custom-file-upload">
|
|
801
|
-
<i class="fa fa-
|
|
803
|
+
<i class="fa fa-arrow-circle-up" id="fileLabel"></i>
|
|
804
|
+
<a id="fileLabelText" style="padding-left: 10px;">Import device list</a>
|
|
802
805
|
</label>
|
|
803
806
|
<input type="file" id="file-upload" accept="application/JSON" class="inputStyle" style="width: 258px;" />
|
|
804
|
-
<label for="file-export" class="custom-file-upload" style="margin-left:
|
|
805
|
-
<i class="fa fa-
|
|
807
|
+
<label for="file-export" class="custom-file-upload" style="margin-left: 5px;">
|
|
808
|
+
<i class="fa fa-arrow-circle-down" id="fileLabel"></i>
|
|
809
|
+
<a id="fileLabelText" style="padding-left: 10px;">Export device list</a>
|
|
806
810
|
</label>
|
|
807
811
|
<input id="file-export" class="inputStyle" style="width: 258px; display: none;" />
|
|
808
812
|
<a id="exportJSON" style="display: none"></a>
|
|
@@ -810,33 +814,35 @@
|
|
|
810
814
|
</div>
|
|
811
815
|
|
|
812
816
|
<div id="read-server-tab" style="display:none">
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
<label for="node-input-serverEnabled">
|
|
816
|
-
<input type="checkbox" id="node-input-serverEnabled" style="width: auto;" />
|
|
817
|
+
<div class="form-row bp-checkbox-row">
|
|
818
|
+
<input type="checkbox" id="node-input-serverEnabled" class="bp-checkbox"/>
|
|
819
|
+
<label for="node-input-serverEnabled"> Enable Server </label>
|
|
817
820
|
</div>
|
|
818
821
|
|
|
819
822
|
<div class="read_server_parent_div" id="serverParent">
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
label="Reinitialize Server">
|
|
823
|
+
<div
|
|
824
|
+
class="form-row bp-row clearServerContainer"
|
|
825
|
+
id="clearServerContainer"
|
|
826
|
+
style="align-items: center; display: flex;">
|
|
827
|
+
<p-button class="bacnetServerRebuildSchedule_clearButton" @click="confirmAll($event)" label="Reinitialize Server">
|
|
826
828
|
</p-button>
|
|
827
829
|
</div>
|
|
828
830
|
|
|
829
|
-
<div class="form-row" id="clearServerPointContainer">
|
|
830
|
-
<label>Server Objects</label>
|
|
831
|
+
<div class="form-row bp-row" id="clearServerPointContainer" style="margin-top: 20px;">
|
|
832
|
+
<label style="margin-bottom: 20px;"> Server Objects</label>
|
|
831
833
|
<div v-for="object in serverObjects" :key="object.name">
|
|
832
|
-
|
|
833
|
-
|
|
834
|
+
<div><p class="point_name">[{{ object.type }}{{ object.instance }}] {{ formatObjectName(object.name) }}</p></div>
|
|
835
|
+
<p-button
|
|
836
|
+
class="bacnetServerPoint_clearButton"
|
|
837
|
+
aria-label="Cancel"
|
|
838
|
+
@click="confirm({
|
|
834
839
|
type: object.type,
|
|
835
840
|
instance: object.instance,
|
|
836
841
|
name: object.name
|
|
837
|
-
})"
|
|
842
|
+
})"
|
|
843
|
+
icon="pi pi-times"></p-button>
|
|
838
844
|
</div>
|
|
839
|
-
</div>
|
|
845
|
+
</div>
|
|
840
846
|
</div>
|
|
841
847
|
</div>
|
|
842
848
|
</div>
|
package/bacnet_gateway.js
CHANGED
|
@@ -226,6 +226,21 @@ module.exports = function (RED) {
|
|
|
226
226
|
});
|
|
227
227
|
} else if (msg.testFunc == true) {
|
|
228
228
|
node.bacnetClient.testFunction(msg.address, msg.type, msg.instance, msg.property);
|
|
229
|
+
} else if (msg.applyDisplayNames) {
|
|
230
|
+
|
|
231
|
+
node.status({ fill: "blue", shape: "dot", text: "Updating display names" });
|
|
232
|
+
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
node.status({});
|
|
235
|
+
}, 2000);
|
|
236
|
+
|
|
237
|
+
node.bacnetClient
|
|
238
|
+
.applyDisplayNames(msg.pointsToRead)
|
|
239
|
+
.then(function (result) {
|
|
240
|
+
}).catch(function (error) {
|
|
241
|
+
logOut("Error in applyDisplayNames: ", error);
|
|
242
|
+
});
|
|
243
|
+
|
|
229
244
|
}
|
|
230
245
|
});
|
|
231
246
|
|