Skip to content

ReadPropertyMultiple silently ignores unknown objects/properties instead of returning BACnet errors #33

@Danebae

Description

@Danebae

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

  1. Start a virtual BACnet device with one exposed object
  2. Have a client read it successfully using ReadPropertyMultiple
  3. Delete that object from the server
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions