driver-bacnet's People
driver-bacnet's Issues
High memory usage over the time
It starts with low memory usage, but over the time the memory usage by driver-bacnet
becomes high. See this video:
Screen.Recording.2023-02-24.at.3.01.07.PM.mov
change device vendor name and id
from
BACnet Stack at SourceForge
To
- 1173
- Nube iO Operations Pty Ltd
On start of stack send MQTT
send a message so the MQTT client know the stack just restarted
bacnet-client (bacnet master) add support MSI, MSO, MSV
Multistate Input 13
Multistate Output 14
Multistate Value 19
add bacnet master (bacnet-client)
the idea would be that we could send the bacnet stack a message over MQTT and then MQTT would publish the result back on a topic
we need to resue the same bacnet instance so we can run both services on the same ethenet port
example send a whois
publish to a topic
bacnet/whois/send
{network:eth0, timeout:2000}
basic scope
- send
whois
./bacwi
- read a device
object list
read present values
or priorty send a list and responsed back with the values [ai1, ai2]write present values
or priorty send a list and responsed back with the values {{point:ao1, pri:16}}
add better support for read
send json body
{
"objectType":"1",
"objectInstance":"1",
"property":"85",
"deviceInstance":"1",
"mac":"123",
"dnet":"1",
}
aidan@pop-os-ryan:~/code/helpers/bacnet-stack-bacnet-stack-1.0.0/bin$ ./bacrp --help
Usage: bacrp device-instance object-type object-instance property [index]
[--dnet][--dadr][--mac]
[--version][--help]
Read a property from an object in a BACnet device
and print the value.
--mac A
Optional BACnet mac address.Valid ranges are from 00 to FF (hex) for MS/TP or ARCNET,
or an IP string with optional port number like 10.1.2.3:47808
or an Ethernet MAC in hex like 00:21:70:7e:32:bb
--dnet N
Optional BACnet network number N for directed requests.
Valid range is from 0 to 65535 where 0 is the local connection
and 65535 is network broadcast.
--dadr A
Optional BACnet mac address on the destination BACnet network number.
Valid ranges are from 00 to FF (hex) for MS/TP or ARCNET,
or an IP string with optional port number like 10.1.2.3:47808
or an Ethernet MAC in hex like 00:21:70:7e:32:bb
device-instance:
BACnet Device Object Instance number that you are
trying to communicate to. This number will be used
to try and bind with the device using Who-Is and
I-Am services. For example, if you were reading
Device Object 123, the device-instance would be 123.
object-type:
The object type is object that you are reading. It
can be defined either as the object-type name string
as defined in the BACnet specification, or as the
integer value of the enumeration BACNET_OBJECT_TYPE
in bacenum.h. For example if you were reading Analog
Output 2, the object-type would be analog-output or 1.
object-instance:
This is the object instance number of the object that
you are reading. For example, if you were reading
Analog Output 2, the object-instance would be 2.
property:
The property of the object that you are reading. It
can be defined either as the property name string as
defined in the BACnet specification, or as an integer
value of the enumeration BACNET_PROPERTY_ID in
bacenum.h. For example, if you were reading the Present
Value property, use present-value or 85 as the property.
index:
This integer parameter is the index number of an array.
If the property is an array, individual elements can
be read. If this parameter is missing and the property
is an array, the entire array will be read.
Example:
If you want read the Present-Value of Analog Output 101
in Device 123, you could send either of the following
commands:
bacrp 123 analog-output 101 present-value
bacrp 123 1 101 85
If you want read the Priority-Array of Analog Output 101
in Device 123, you could send either of the following
commands:
bacrp 123 analog-output 101 priority-array
bacrp 123 1 101 87
add better support for write
send json body
write PV
{
"value":"22",
"objectType":"1",
"objectInstance":"1",
"property":"85",
"deviceInstance":"1",
"mac":"123",
"dnet":"1",
}
write priority
{
"value":"22",
"priority":"22",
"objectType":"1",
"objectInstance":"1",
"property":"85",
"deviceInstance":"1",
"mac":"123",
"dnet":"1",
}
aidan@pop-os-ryan:~/code/helpers/bacnet-stack-bacnet-stack-1.0.0/bin$ ./bacwp --help
Usage: bacwp device-instance object-type object-instance property priority index tag value [tag value...]
device-instance:
BACnet Device Object Instance number that you are trying to
communicate to. This number will be used to try and bind with
the device using Who-Is and I-Am services. For example, if you were
writing to Device Object 123, the device-instance would be 123.
object-type:
The object type is object that you are reading. It
can be defined either as the object-type name string
as defined in the BACnet specification, or as the
integer value of the enumeration BACNET_OBJECT_TYPE
in bacenum.h. For example if you were reading Analog
Output 2, the object-type would be analog-output or 1.
object-instance:
This is the object instance number of the object that you are
writing to. For example, if you were writing to Analog Output 2,
the object-instance would be 2.
property:
The property of the object that you are reading. It
can be defined either as the property name string as
defined in the BACnet specification, or as an integer
value of the enumeration BACNET_PROPERTY_ID in
bacenum.h. For example, if you were reading the Present
Value property, use present-value or 85 as the property.
priority:
This parameter is used for setting the priority of the
write. If Priority 0 is given, no priority is sent. The BACnet
standard states that the value is written at the lowest
priority (16) if the object property supports priorities
when no priority is sent.
index
This integer parameter is the index number of an array.
If the property is an array, individual elements can be written
to if supported. If this parameter is -1, the index is ignored.
tag:
Tag is the integer value of the enumeration BACNET_APPLICATION_TAG
in bacenum.h. It is the data type of the value that you are
writing. For example, if you were writing a REAL value, you would
use a tag of 4.
Context tags are created using two tags in a row. The context tag
is preceded by a C. Ctag tag. C2 4 creates a context 2 tagged REAL.
value:
The value is an ASCII representation of some type of data that you
are writing. It is encoded using the tag information provided. For
example, if you were writing a REAL value of 100.0, you would use
100.0 as the value.
Here is a brief overview of BACnet property and tags:
Certain properties are expected to be written with certain
application tags, so you probably need to know which ones to use
with each property of each object. It is almost safe to say that
given a property and an object and a table, the tag could be looked
up automatically. There may be a few exceptions to this, such as
the Any property type in the schedule object and the Present Value
accepting REAL, BOOLEAN, NULL, etc. Perhaps it would be simpler for
the demo to use this kind of table - but I also wanted to be able
to do negative testing by passing the wrong tag and have the server
return a reject message.
Example:
If you want send a value of 100 to the Present-Value in
Analog Output 0 of Device 123 at priority 16,
send the one of following commands:
bacwp 123 analog-output 0 present-value 16 -1 4 100
bacwp 123 1 0 85 16 -1 4 100
To send a relinquish command to the same object:
bacwp 123 analog-output 0 present-value 16 -1 0 0
bacwp 123 1 0 85 16 -1 0 0
add response body some more details
add in networkNumber and macAddress
{"value":"AI_1_SPARE","deviceInstance":"2508"}
add index and timeout to body
if its empty then ignore the index, and if its not to hard add the timeout
{
"objectType": "0",
"objectInstance": "1",
"property": "77",
"deviceInstance": "2508",
"mac": "192.168.15.48,
"timeout": "5000",
"index": ""
{
Update name, presntValue and each priority
Make it so user can update point names and values over MQTT
Write 100
@pv
object/address/write/pv/100
Write 100
@1
object/address/write/pri/1/value/100
Write null
@16
write--priority--number--NULL
object/address/write/pri/16/null
Write null
from 1 to 16 as n set all to null
object/address/write/pri/16/all
in config file please enable an option to set persistent to true
https://www.hivemq.com/blog/mqtt-essentials-part-7-persistent-session-queuing-messages/
As its good if we can persist the bacnet point names and values on restart of the bacnet-server
So on start the bacnet-server will connect to the broker and update all the value
start bacnet point numbers at 1 not 0
eg: start AO at AO1 not AO0
MQTT payload has changed!!!
The MQTT payload of the bacnet/av/1/pri
topic has changed between v0.0.64
and v0.0.65
.
Please explain why, as it may affect the operation of our system components (ROS and Wires).
Being that you are making changes to driver-bacnet
you MUST keep a log of the changes in the CHANGELOG.md file. Please ensure this gets updated.
Please also update the README.md file so that it clearly describes how to run the Release versions of driver-bacnet
. This includes how to set up the config file, and the start commands.
What to publish on change
When to publish data over MQTT
The BV, BO, AO and AVs
PROP_PRIORITY_ARRAY
PROP_RELINQUISH_DEFAULT
Write vaue to BI and AI not working
Supported Objects
init of app objects types and number
the default amount of points will be 0
objects required
- binary input
- binary output
- binary value
- analogue input
- analogue output
- analogue value
so user will put in how many object to create on startup
BO=25 BI=50
and so on
The default for each type will be 0
so the command below would only create 50 BIs
BI=50 ./bin/bacserv 1234
See examlpe of max count of points
https://github.com/bacnet-stack/bacnet-stack/blob/master/src/bacnet/basic/object/bo.c#L42
config file to bacnet-server points count
the config file dosnt seem to set the point count anymore in the server
pi@NubeIO-RC-5:~ $ cat /data/driver-bacnet/config/config.yml
ai_max: 0
ao_max: 0
av_max: 10
bacnet_client:
commands:
- whois
- read_value
- write_value
- pics
debug: false
enable: true
tokens:
- txn_source
- txn_number
bi_max: 0
bo_max: 0
bv_max: 0
device_id: 5132
iface: eth0
mqtt:
broker_ip: 127.0.0.1
broker_port: 1883
debug: false
enable: true
retry_enable: true
retry_interval: 10
retry_limit: 5
write_via_subscribe: true
objects:
- ai
- av
- ao
- bi
- bo
- bv
port: 47808
properties:
- name
- pv
- pri
server_name: DAN_TESTING_132
add support for dnet and dadr in read/write prop
both are optional
gets an error
aidan@pop-os-ryan:~/code/helpers/bacnet-stack-bacnet-stack-1.0.0/bin$ ./bacrp 1116 2 1 77 --mac 192.168.15.222:47808
BACnet Reject: Unrecognized Service
works
aidan@pop-os-ryan:~/code/helpers/bacnet-stack-bacnet-stack-1.0.0/bin$ ./bacrp 1116 2 1 77 --dnet 2 --dadr 1 --mac 192.168.15.222:47808
"AV_BrandModel"
add support for write priority
see below from @CanuckMarc
Discover device data discrepancy over the time
Version of driver-bacnet
: v1.0.0-rc.5
When we are having this issue #121, the device gets discovered (but names don't look good) but points don't (0 points
).
When it's having that issue:
After driver-bacnet
restart:
Rounding the write value
when i write 23.44
it returns 23
pi@raspberrypi:~/bacnet-stack-bacnet-stack-1.0.0/bin $ ./bacwp 1234 1 1 85 16 -1 4 23.44
WriteProperty Acknowledged!
pi@raspberrypi:~/bacnet-stack-bacnet-stack-1.0.0/bin $ ./bacrp 1234 1 1 87
{Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,23.000000}
MQTT retry (how to handle if broker is offline)
also is there any retry on sending the MQTT message to the broker
eg, a value changes on the BACnet-server and you try to send the broker a message will you retry on fail (eg mqtt-broker is offline)
Support 2 APIs for object list discovery
Related to https://github.com/NubeIO/rubix-os/issues/646.
add 2x new APIs
API to a object list discovery
In driver-bacnet first try and get the object-list in on command if fail then get the count and for loop to build and return the object list back over MQTT
API to build points list of a known object list
So over MQTT we would send you an array [AI-1, AI-2] as an example
And you would send back
{
"AI1": {"name":"point"},
"AI2": {"error": "not found"}
}
please update these 3 feilds
Product Name: "Nube iO rubix"
Product Model Number: "rubix"
Product Description: "nube bacnet server"
aidan@pop-os-ryan:~/code/helpers/bacnet-stack-bacnet-stack-1.0.0/bin$ ./bacepics 202
PICS 0
BACnet Protocol Implementation Conformance Statement
--
--
-- Generated by BACnet Protocol Stack library EPICS tool
-- BACnet/IP Interface for BACnet-stack Devices
-- http://sourceforge.net/projects/bacnet/
--
--
Vendor Name: "Nube iO Operations Pty Ltd"
Product Name: "Nube iO rubix"
Product Model Number: "rubix"
Product Description: "nube bacnet server"
make units none
make uints none
for AO, AV, and AI
Incorrect JSON while reading priority array Null
Parent ticket: https://github.com/NubeIO/module-core-bacnetmaster/issues/41
When the BACnet server's priority array is null, this code can produce an incorrect JSON structure.
It currently exists in the type mso
, check others as well.
An example of an incorrect response:
{ "value" : Null , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "b92f5ffd5f64"}
The correct response would have been:
{ "value" : ["Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","1"] , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "93951ba0befb"}
More logs:
pi@NubeIO-RC-5:~ $ mosquitto_sub -t 'bacnet/#' -v
bacnet/program/2508/state { "value" : "started" , "uuid" : "" }
bacnet/program/54321/state { "value" : "started" , "uuid" : "" }
bacnet/cmd/read_value {"objectType":"4","objectInstance":"65550","property":"87","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"93951ba0befb","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/bo/65550/pri { "value" : ["Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","Null","1"] , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "93951ba0befb"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"4","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"42ebf805d98e","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/4/pv { "value" : "255" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "42ebf805d98e"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"6","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"fea715acd6f9","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/6/pv { "value" : "1" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "fea715acd6f9"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"8","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"d2ccd5493eb8","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/8/pv { "value" : "2" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "d2ccd5493eb8"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"32772","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"83db71666e63","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/32772/pv { "value" : "255" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "83db71666e63"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"32774","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"83aaa9de88e3","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/32774/pv { "value" : "1" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "83aaa9de88e3"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"32776","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"eded725b6fad","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/32776/pv { "value" : "3" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "eded725b6fad"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"65540","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"0fdc5ee5a295","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/65540/pv { "value" : "255" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "0fdc5ee5a295"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"65542","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"1711b30e3f28","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/65542/pv { "value" : "1" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "1711b30e3f28"}
bacnet/cmd/read_value {"objectType":"13","objectInstance":"65544","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"24dd5a339781","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/msi/65544/pv { "value" : "2" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "24dd5a339781"}
bacnet/cmd/read_value {"objectType":"14","objectInstance":"5","property":"87","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"040271e2f2f3","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/mso/5/pri { "value" : Null , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "040271e2f2f3"}
bacnet/cmd/read_value {"objectType":"14","objectInstance":"7","property":"87","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"b8ba52a9dc7b","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/mso/7/pri { "value" : Null , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "b8ba52a9dc7b"}
bacnet/cmd/read_value {"objectType":"14","objectInstance":"32773","property":"87","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"36f57eb61277","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/mso/32773/pri { "value" : Null , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "36f57eb61277"}
bacnet/cmd/read_value {"objectType":"14","objectInstance":"32775","property":"87","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"e9dba6658b68","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/mso/32775/pri { "value" : Null , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "e9dba6658b68"}
bacnet/cmd/read_value {"objectType":"14","objectInstance":"65541","property":"87","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"c5cdca10397a","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/mso/65541/pri { "value" : Null , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "c5cdca10397a"}
bacnet/cmd/read_value {"objectType":"14","objectInstance":"65543","property":"87","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"b1af4f7e953a","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/mso/65543/pri { "value" : Null , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "b1af4f7e953a"}
bacnet/cmd/read_value {"objectType":"0","objectInstance":"32777","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"210024f70725","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/ai/32777/pv { "value" : "20.000000" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "210024f70725"}
bacnet/cmd/read_value {"objectType":"0","objectInstance":"9","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"96982386e723","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/ai/9/pv { "value" : "20.000000" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "96982386e723"}
bacnet/cmd/read_value {"objectType":"0","objectInstance":"65545","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"93cd56bce19d","timeout":10,"known_object_list":null}
bacnet/cmd_result/read_value/ai/65545/pv { "value" : "21.000000" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "93cd56bce19d"}
bacnet/cmd/write_value {"objectType":"1","objectInstance":"10","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","value":"23","txn_source":"ff","txn_number":"3c8973c08d12","timeout":1}
bacnet/cmd_result/write_value/ao/10/pv { "value" : "23" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "3c8973c08d12"}
bacnet/cmd/read_value {"objectType":"1","objectInstance":"10","property":"85","deviceInstance":"3","mac":"192.168.0.3:47808","dnet":"0","dadr":"0","txn_source":"ff","txn_number":"a4cfb2db5bc2","timeout":1,"known_object_list":null}
bacnet/cmd_result/read_value/ao/10/pv { "value" : "23.000000" , "deviceInstance" : "3" , "dnet" : "0" , "dadr" : "0" , "mac" : "192.168.0.3:47808" , "txn_source" : "ff", "txn_number" : "a4cfb2db5bc2"}
Also, can see the inconsistency of using null
, "null"
& "Null"
, but leave it for now coz if we correct it, it breaks other implementations.
on bacnet server add MQTT persistence
for the bacnet server on boot/restart of the server can you make it get the MQTT last value from persistence
add it as an option in the config file
make it use persistence by default
disablePersistence=true
Make PROP_RELINQUISH_DEFAULT writeable for AV, AO, BV, BO
add suport for writting units to the BACnet-server over MQTT
For AO, AIs, AVs
units | 117 |
Start all point count from 1 not 0 as in AI1, AO1
setup github action build
ask @RaiBnod if any question
get update name of BO
same as we can update the PROP_PRESENT_VALUE
https://github.com/bacnet-stack/bacnet-stack/blob/ba0cbc1fb8768ff7b915904d836bd29ba32ed64b/src/bacnet/basic/object/bo.c#L365
we want to be able to update this name aswell PROP_OBJECT_NAME
https://github.com/bacnet-stack/bacnet-stack/blob/ba0cbc1fb8768ff7b915904d836bd29ba32ed64b/src/bacnet/basic/object/bo.c#L434
see example of being able to write a string to update the bacnet sever name
start a new server with device-id 2508
cd bacnet-stack-bacnet-stack-1.0.0/bin
./bacserv 2508
read the server name
./bacrp 2508 8 2508 77
write the server name
./bacwp 2508 8 2508 77 0 -1 7 test2
read the point name
./bacrp 2508 4 1 77
write the server name see the error
BACnet Error: property: write-access-denied`
aidan@aidan-ThinkPad-T480:~/code/bacnet-stack-bacnet-stack-1.0.0/bin$ ./bacwp 2508 4 1 77 0 -1 7 new-bo-name
BACnet Error: property: write-access-denied
aidan@aidan-ThinkPad-T480:~/code/bacnet-stack-bacnet-stack-1.0.0/bin$
Change topic
Change topic to
bacnet/objectType/objectID/name/
bacnet/objectType/objectID/pv/
example
bacnet/bo/22/name/my new name
bacnet/bo/22/pv/233.3456
add in token in read/write and whois body
we will pass the token in the JSON body and all you need to do is return the token in the reposne , so we can match up the reponses from a cmd
Remove bacnet object port
we i run bacpics
i can see there an is object called port
which is not used or needed to be show to other bacnet-clients
double publishing only over MQTT
reduce the amout of bacnet req on PICs
We are finding a lot of BACnet devices can be slow in the real world so we want to look at reducing the size of the PIC call
Dont delete the code in the PICs just comment it out for now as we might add it back in later
device request
keep all the device requests
as is
points request
on request the following name
, id
, type, units (if supported)
, description
{
object-identifier: (analog-input, 1)
object-name: "AI_1_SPARE"
object-type: analog-input
present-value: ?
status-flags: {false,false,false,false}
event-state: normal
out-of-service: FALSE
units: no-units
description: "AI_1_SPARE"
reliability: ?
cov-increment: 1.000000
time-delay: 170930739
notification-class: 4194303
high-limit: 4122011038318277427200.000000
low-limit: 17749878618931926680750522368.000000
deadband: 0.000000
limit-enable: {false,false}
event-enable: {false,false,false}
acked-transitions: {true,true,true}
notify-type: 1
event-time-stamps: { 2155-255-255T255:255:255.255,2155-255-255T255:255:255.255,2155-255-255T255:255:255.255 }
-- proprietary 9997: 90.510002
-- proprietary 9998: 90
-- proprietary 9999: -200
},
only call points so dont call alarms
, schedules
, trends
Support Multi State Points
@shomaglasang Please use this issue for tracking the BACnet multi state point support. This is a HIGH priority taks.
Previous correspondance is on this other issue: #125
Could you please provide daily updates on your progress and also advise an ETA for the completion of this functionality (including testing).
rename build name from bacserv to app-amd64 or app-armv7
rename the binary but keep zip name the as is
No response from target device when device is accessible
Version of driver-bacnet
: v1.0.0-rc.5
1. See the MQTT request/response with errors
Screen.Recording.2024-06-20.at.11.02.12.AM.mov
2. Mosquitto
restart didn't help
Screen.Recording.2024-06-20.at.11.06.58.AM.mov
3. driver-bacnet
restart did the trick
Screen.Recording.2024-06-20.at.11.11.29.AM.mov
BACnet master add support for multiple write
cant write AO above 100 or below 0
let user set the bacnet port
server_name: My Bacnet Server
device_id: 1234
iface: eth0
port:47809
MQTT pubish the PROP_PRIORITY_ARRAY on change for FOR AV, AO, BV and BO
Remove/Clean up
to get all the object run this
./bacepics 1234
this is what we want to end up with
- binary input
- binary output
- binary value
- analogue input
- analogue output
- analogue value
to remove
- command
- file
- lighting-output
- trend-log
- characterstring-value
- life-safety-point
- octetstring-value
- positive-integer-value
- accumulator
object-list: {
(device, 1234), (network-port, 1), (analog-input, 0),
(analog-input, 1), (analog-input, 2), (analog-input, 3),
(analog-output, 0), (analog-output, 1), (analog-output, 2),
(analog-output, 3), (analog-value, 0), (analog-value, 1),
(analog-value, 2), (analog-value, 3), (binary-input, 0),
(binary-input, 1), (binary-input, 2), (binary-input, 3),
(binary-input, 4), (binary-input, 5), (binary-input, 6),
(binary-input, 7), (binary-input, 8), (binary-input, 9),
(binary-output, 0), (binary-value, 0), (binary-value, 1),
(binary-value, 2), (binary-value, 3), (binary-value, 4),
(binary-value, 5), (binary-value, 6), (binary-value, 7),
(binary-value, 8), (binary-value, 9), (characterstring-value, 0),
(command, 0), (command, 1), (command, 2),
(command, 3), (integer-value, 1), (notification-class, 0),
(notification-class, 1), (life-safety-point, 0), (life-safety-point, 1),
(life-safety-point, 2), (life-safety-point, 3), (life-safety-point, 4),
(life-safety-point, 5), (life-safety-point, 6), (load-control, 0),
(load-control, 1), (load-control, 2), (load-control, 3),
(multi-state-input, 0), (multi-state-input, 1), (multi-state-input, 2),
(multi-state-input, 3), (multi-state-output, 0), (multi-state-output, 1),
(multi-state-output, 2), (multi-state-output, 3), (multi-state-value, 0),
(multi-state-value, 1), (multi-state-value, 2), (multi-state-value, 3),
(trend-log, 0), (trend-log, 1), (trend-log, 2),
(trend-log, 3), (trend-log, 4), (trend-log, 5),
(trend-log, 6), (trend-log, 7), (lighting-output, 1),
(lighting-output, 2), (lighting-output, 3), (lighting-output, 4),
(lighting-output, 5), (lighting-output, 6), (lighting-output, 7),
(lighting-output, 8), (channel, 1), (file, 0),
(file, 1), (file, 2), (octetstring-value, 0),
(octetstring-value, 1), (octetstring-value, 2), (octetstring-value, 3),
(positive-integer-value, 0), (positive-integer-value, 1), (positive-integer-value, 2),
(positive-integer-value, 3), (schedule, 0), (schedule, 1),
(schedule, 2), (schedule, 3), (accumulator, 0),
(accumulator, 1), (accumulator, 2), (accumulator, 3),
(accumulator, 4), (accumulator, 5), (accumulator, 6),
(accumulator, 7), (accumulator, 8), (accumulator, 9),
(accumulator, 10), (accumulator, 11), (accumulator, 12),
(accumulator, 13), (accumulator, 14), (accumulator, 15),
(accumulator, 16), (accumulator, 17), (accumulator, 18),
(accumulator, 19), (accumulator, 20), (accumulator, 21),
(accumulator, 22), (accumulator, 23), (accumulator, 24),
(accumulator, 25), (accumulator, 26), (accumulator, 27),
(accumulator, 28), (accumulator, 29), (accumulator, 30),
(accumulator, 31), (accumulator, 32), (accumulator, 33),
(accumulator, 34), (accumulator, 35), (accumulator, 36),
(accumulator, 37), (accumulator, 38), (accumulator, 39),
(accumulator, 40), (accumulator, 41), (accumulator, 42),
(accumulator, 43), (accumulator, 44), (accumulator, 45),
(accumulator, 46), (accumulator, 47), (accumulator, 48),
(accumulator, 49), (accumulator, 50), (accumulator, 51),
(accumulator, 52), (accumulator, 53), (accumulator, 54),
(accumulator, 55), (accumulator, 56), (accumulator, 57),
(accumulator, 58), (accumulator, 59), (accumulator, 60),
(accumulator, 61), (accumulator, 62), (accumulator, 63) }
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.