JoelBender / BACpypes3

BACnet communications library
33 stars 7 forks source link

Device object settings not being used in requests #7

Open Bepacom-Raalte opened 11 months ago

Bepacom-Raalte commented 11 months ago

I set up my BACpypes3 application the same way I set up my BACpypes application, using the device object.

this_device = DeviceObject(
    objectIdentifier=ObjectIdentifier(f"device,{config.get('BACpypes', 'objectIdentifier')}"),
    objectName=config.get('BACpypes', 'objectName'),
    description="BACnet Add-on for Home Assistant",
    vendorIdentifier=int(config.get('BACpypes', 'vendorIdentifier')),
    maxApduLengthAccepted=1476,
    segmentationSupported=Segmentation.segmentedBoth,
    maxSegmentsAccepted=64,
)

While using this setup, the requests my application sends are using the default settings and not the parameters used in the Device object. The workaround solution currently is adjusting the ApplicationServiceAccessPoint variables by overwriting them like the following

app.asap.maxApduLengthAccepted = 1476

app.asap.segmentationSupported = Segmentation.segmentedBoth

app.asap.maxSegmentsAccepted = 64

In short, the Device object parameters are not being used by the app. The application I use BACpypes3 in can be found here