@bitpoolos/edge-bacnet 1.4.6 → 1.4.7

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/bacnet_client.js CHANGED
@@ -1637,6 +1637,7 @@ class BacnetClient extends EventEmitter {
1637
1637
  let result;
1638
1638
  if (device.getIsInitialQuery()) {
1639
1639
  result = await this._readObjectLite(device, address, point.value.type, point.value.instance);
1640
+ device.setIsInitialQuery(false);
1640
1641
  } else {
1641
1642
  result = await this._readObjectFull(device, address, point.value.type, point.value.instance);
1642
1643
  }
package/bacnet_read.html CHANGED
@@ -405,7 +405,7 @@
405
405
  },
406
406
  exportPointListCsv() {
407
407
  let app = this;
408
- let csvContent = "data:text/csv;charset=utf-8,ipAddress,deviceId,deviceName,pointName,objectType" + "\r\n";
408
+ let csvContent = "ipAddress,deviceId,deviceName,pointName,objectType" + "\r\n";
409
409
  const keys = Object.keys(app.pointList);
410
410
  for (key in keys) {
411
411
  const guid = keys[key];
@@ -437,9 +437,10 @@
437
437
 
438
438
  if (parseInt(point) == points.length - 1 && parseInt(key) == keys.length - 1) {
439
439
  // last iteration
440
- var encodedUri = encodeURI(csvContent);
440
+ var csvBlob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
441
441
  var link = document.createElement("a");
442
- link.setAttribute("href", encodedUri);
442
+ var url = URL.createObjectURL(csvBlob);
443
+ link.setAttribute("href", url);
443
444
  link.setAttribute("download", "pointslist.csv");
444
445
  document.body.appendChild(link);
445
446
  link.click();
@@ -448,9 +449,10 @@
448
449
  } else {
449
450
  if (parseInt(key) == keys.length - 1) {
450
451
  // last iteration
451
- var encodedUri = encodeURI(csvContent);
452
+ var csvBlob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
452
453
  var link = document.createElement("a");
453
- link.setAttribute("href", encodedUri);
454
+ var url = URL.createObjectURL(csvBlob);
455
+ link.setAttribute("href", url);
454
456
  link.setAttribute("download", "pointslist.csv");
455
457
  document.body.appendChild(link);
456
458
  link.click();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitpoolos/edge-bacnet",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "A bacnet gateway for node-red",
5
5
  "dependencies": {
6
6
  "@plus4nodered/ts-node-bacnet": "^1.0.0-beta.2",