Sorry in advance if I missed something obvious; this is my first time opening an issue.
Summary
ReadPropertyMultiple currently returns an empty or partial ACK when:
- the requested object does not exist
- the requested property does not exist
Instead of returning standard BACnet errors such as:
ErrorClass.OBJECT / ErrorCode.UNKNOWN_OBJECT
ErrorClass.PROPERTY / ErrorCode.UNKNOWN_PROPERTY
Current behavior
In BDDevice.#onBacnetReadPropertyMultiple:
- missing objects are skipped silently
In BDObject.___readPropertyMultiple:
- missing properties are skipped silently
This produces successful ReadPropertyMultipleResponse payloads with empty or partial values arrays
instead of an error response.
Why this is a problem
This differs from the behavior of:
ReadProperty
SubscribeCOV
which already return proper BACnet errors for unknown objects.
For clients, this creates ambiguous behavior:
- a deleted object may look like a successful read with no data
- polling logic may count a read as successful unless extra defensive checks are added client-side
Expected behavior
For ReadPropertyMultiple:
- if a requested object does not exist, return
UNKNOWN_OBJECT
- if a requested property does not exist, return
UNKNOWN_PROPERTY
Minimal fix idea
In dist/objects/device/device.js
Use #getObjectByIdOrThrow(objectId) instead of silently skipping unknown objects in
#onBacnetReadPropertyMultiple.
In dist/objects/generic/object.js
Use ___getPropertyOrThrow(identifier.id) instead of silently skipping unknown properties in
___readPropertyMultiple.
Reproduction
- Start a virtual BACnet device with one exposed object
- Have a client read it successfully using
ReadPropertyMultiple
- Delete that object from the server
- Perform the same
ReadPropertyMultiple again
Actual result
A valid ACK is returned with no useful result data.
Expected result
A BACnet error response such as:
ErrorClass.OBJECT / ErrorCode.UNKNOWN_OBJECT
Notes
I found this while testing a BACnet client polling a BACnet device built with this library.
In the same scenario:
SubscribeCOV correctly returns an error for the missing object
ReadPropertyMultiple returns an empty/partial ACK instead
So the RPM path appears inconsistent with the rest of the device behavior.
Sorry in advance if I missed something obvious; this is my first time opening an issue.
Summary
ReadPropertyMultiplecurrently returns an empty or partial ACK when:Instead of returning standard BACnet errors such as:
ErrorClass.OBJECT / ErrorCode.UNKNOWN_OBJECTErrorClass.PROPERTY / ErrorCode.UNKNOWN_PROPERTYCurrent behavior
In
BDDevice.#onBacnetReadPropertyMultiple:In
BDObject.___readPropertyMultiple:This produces successful
ReadPropertyMultipleResponsepayloads with empty or partialvaluesarraysinstead of an error response.
Why this is a problem
This differs from the behavior of:
ReadPropertySubscribeCOVwhich already return proper BACnet errors for unknown objects.
For clients, this creates ambiguous behavior:
Expected behavior
For
ReadPropertyMultiple:UNKNOWN_OBJECTUNKNOWN_PROPERTYMinimal fix idea
In
dist/objects/device/device.jsUse
#getObjectByIdOrThrow(objectId)instead of silently skipping unknown objects in#onBacnetReadPropertyMultiple.In
dist/objects/generic/object.jsUse
___getPropertyOrThrow(identifier.id)instead of silently skipping unknown properties in___readPropertyMultiple.Reproduction
ReadPropertyMultipleReadPropertyMultipleagainActual result
A valid ACK is returned with no useful result data.
Expected result
A BACnet error response such as:
ErrorClass.OBJECT / ErrorCode.UNKNOWN_OBJECTNotes
I found this while testing a BACnet client polling a BACnet device built with this library.
In the same scenario:
SubscribeCOVcorrectly returns an error for the missing objectReadPropertyMultiplereturns an empty/partial ACK insteadSo the RPM path appears inconsistent with the rest of the device behavior.