BiancoRoyal / node-red-contrib-bacnet

maintained by PLUS for Node-RED - https://plus4nodered.com
https://www.npmjs.com/package/node-red-contrib-bacnet
MIT License
24 stars 16 forks source link

BACnet Multiple Write Feature not working #32

Closed eusouocristian closed 1 year ago

eusouocristian commented 1 year ago

Which node-red-contrib-bacnet version are you using?

0.2.7

What happened?

I am trying to use the multiple-write feature, but it is not working. Following the documentation, the function node should be set up as: image Where type should be replaced by "tag". When using "tag", it raises an error:

Error: Cannot encode a value if the type has not been specified

If I use 'type' instead, it raises an error:

Error: BacnetError Class: DEVICE (0) Code: CONFIGURATION_IN_PROGRESS (2)

Have anyone tried multiple-write?

How can this be reproduced?

Import .json to reproduce the behaviour.

[ { "id": "f6fa9fdfa782b552", "type": "tab", "label": "Flow 1", "disabled": false, "info": "", "env": [] }, { "id": "975b3174b7066505", "type": "function", "z": "f6fa9fdfa782b552", "name": "map to BACnet0", "func": "\nlet arr_values = [\n {\n objectId: { type: 1, instance: 100 },\n values: [{\n type: 4,\n property: { id: 85 },\n value: [{ type: 4, value: 25.125 }],\n }]\n }\n]\n\nmsg.payload = { \n //deviceIPAddress: '172.19.21.197', \n values: arr_values \n }\nreturn msg;\n\n/*\n// SINGLE WRITE\n\nmsg.payload = {\n objectId: {type: 1, instance: 100},\n property: {Id: 85},\n values: [{\n type:4,\n value: msg.payload.variables[0].value[0]\n }]\n}\nreturn msg;\n\n*/", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 540, "y": 140, "wires": [ [ "bf389f9f7c79b94c" ] ] }, { "id": "85d64c34a50c7f73", "type": "inject", "z": "f6fa9fdfa782b552", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 340, "y": 140, "wires": [ [ "975b3174b7066505" ] ] }, { "id": "bf389f9f7c79b94c", "type": "BACnet-Write", "z": "f6fa9fdfa782b552", "name": "BACnet Write Num", "objectType": "1", "instance": "03818aeefee9cbdb", "valueTag": "4", "valueValue": "", "propertyId": "85", "priority": "", "device": "c91481bdd8c07bd6", "server": "f72e893c6c8738ab", "multipleWrite": true, "x": 750, "y": 140, "wires": [ [] ] }, { "id": "03818aeefee9cbdb", "type": "BACnet-Instance", "name": "", "instanceAddress": "" }, { "id": "c91481bdd8c07bd6", "type": "BACnet-Device", "name": "ModbusSlave", "deviceAddress": "172.19.21.197" }, { "id": "f72e893c6c8738ab", "type": "BACnet-Client", "name": "Bacnet-Client", "adpuTimeout": "10000", "port": "47808", "interface": "172.19.21.200", "broadcastAddress": "172.19.21.255" } ]

What did you expect to happen?

It should not raise an error and write the values into the BACnet instances.

Other Information

Using a JACE8000 as BACnet device. I already created a flow for multiple-reading from the BACnet network, it is working normally.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. It will be closed in 30 days, but can be saved by removing the stale label or commenting.

beentaken commented 3 months ago

is the issue solve?