NubeIO / driver-bacnet

0 stars 2 forks source link

BACnet master add support for multiple write #70

Closed NubeDev closed 9 months ago

NubeDev commented 1 year ago

http://svn.code.sf.net/p/bacnet/code/trunk/bacnet-stack/src/rpm.c

shomaglasang commented 11 months ago

@NubeDev Hi mate, just want your confirmation. This would be the bacwrp, right? Example:

bacwpm 123 1 44 85 16 4 100 1 45 85 16 4 100

So we will support this over MQTT also. The a sample json payload would be like:

{"deviceInstance":"17", "objects": [{"objectType":"0","objectInstance":"1","property":"117", "value": "166"}, {"objectType":"0","objectInstance":"1","property":"85", "value": "100.50"}], "mac":"192.168.15.17:47808"}
shomaglasang commented 11 months ago

@NubeDev mate should we also support for multiple read? The link to the source file above is actually for read properly multiple.

shomaglasang commented 10 months ago

Hi mate @NubeDev , I also supported read multiple property. Please test the latest version v0.0.50 when you have time mate. Thanks.

Here's a sample request payload.

{"deviceInstance":"5678", "objects": [{"objectType":"0","objectInstance":"1","property":"117"}, {"objectType":"1","objectInstance":"1","property":"85"}, {"objectType":"4","objectInstance":"1","property":"87"}], "mac":"10.104.0.11:47900"}

Sample result:

{ "deviceInstance" : "5678", "objects" : [{"objectType" : "0", "objectInstance" : "1", "property" : "117", "value" : "no-units"},{"objectType" : "1", "objectInstance" : "1", "property" : "85", "value" : "0.000000"},{"objectType" : "4", "objectInstance" : "1", "property" : "87", "value" : ["Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null"]}], "mac" : "10.104.0.11:47900"  }
shomaglasang commented 9 months ago

Closing this issue.