@halsystems/red-bacnet 1.1.4 → 1.1.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.4]
4
+ ### Change
5
+ - ReadPoint to not add device to task queue if no points attached to device
6
+
3
7
  ## [1.1.4]
4
8
  ### Added
5
9
  - DiscoverPoint added new discover mode: Analog and Binary only
@@ -211,7 +211,7 @@ module.exports = {
211
211
  smartReadEvent.on(EVENT_OUTPUT, (data) => {
212
212
  this.#updateProgress(
213
213
  Math.round((85 / size) * (count + 1) + 10)
214
- )
214
+ );
215
215
 
216
216
  if (Array.isArray(data.result))
217
217
  data.result.forEach(i => {
@@ -223,15 +223,17 @@ module.exports = {
223
223
  count++;
224
224
  });
225
225
 
226
- const tasks = entries.map(([k, v]) => ({
227
- id: k,
228
- task: async () => {
229
- return await smartReadProperty(
230
- this.client, v.device, v.points, this.readMethod,
231
- this.maxConcurrentSinglePointRead, 10, this.concurrentTaskDelay
232
- );
233
- }
234
- }));
226
+ const tasks = entries
227
+ .filter(([_, v]) => Array.isArray(v.points) && v.points.length > 0) // eslint-disable-line
228
+ .map(([k, v]) => ({
229
+ id: k,
230
+ task: async () => {
231
+ return await smartReadProperty(
232
+ this.client, v.device, v.points, this.readMethod,
233
+ this.maxConcurrentSinglePointRead, 10, this.concurrentTaskDelay
234
+ );
235
+ }
236
+ }));
235
237
 
236
238
  await concurrentTasks(smartReadEvent, tasks, this.maxConcurrentDeviceRead);
237
239
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halsystems/red-bacnet",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "NodeRED BACnet IP client",
5
5
  "email": "open_source@halsystems.com.au",
6
6
  "repository": {