@halsystems/red-bacnet 1.0.17 → 1.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.
@@ -207,7 +207,9 @@ module.exports = {
207
207
 
208
208
  if (Array.isArray(data.result))
209
209
  data.result.forEach(i => {
210
- points[`${data.id}_${i.objectId.type}_${i.objectId.instance}_${i.values[0].id}`] = i.values?.[0]?.value?.[0]?.value;
210
+ i.values.forEach(v => {
211
+ points[`${data.id}_${i.objectId.type}_${i.objectId.instance}_${v.id}`] = v.value[0].value;
212
+ });
211
213
  });
212
214
 
213
215
  count++;
@@ -232,6 +234,10 @@ module.exports = {
232
234
  let value = points[key];
233
235
  let err = null
234
236
 
237
+ // process
238
+ if (typeof value === 'boolean')
239
+ value = value ? 1 : 0
240
+
235
241
  if (value == null || value?.errorClass != null || value?.errorCode != null) {
236
242
  value = 0
237
243
  err = ERR_READING_POINT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halsystems/red-bacnet",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "NodeRED BACnet IP client",
5
5
  "email": "open_source@halsystems.com.au",
6
6
  "repository": {