JoelBender / BACpypes3

BACnet communications library
33 stars 7 forks source link

Error reading covIncrement of largeAnalogValue #45

Closed trapperl closed 1 month ago

trapperl commented 1 month ago

I was testing objects and reading properties on a BACnet device and I've run into an error I haven't been able to solve.

I went back to the example code and found I had the same issue.

samples/read-property.py

python read-property.py 10.102.15.56 largeAnalogValue:1 covIncrement

Traceback (most recent call last):
  File "/home/pses/site_level_controller/bacnet_interface/read-property.py", line 89, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/pses/site_level_controller/bacnet_interface/read-property.py", line 59, in main
    response = await app.read_property(
  File "/home/pses/site_level_controller/.venv/lib/python3.10/site-packages/bacpypes3/service/object.py", line 146, in read_property
    property_value = response.propertyValue.cast_out(property_type)
  File "/home/pses/site_level_controller/.venv/lib/python3.10/site-packages/bacpypes3/constructeddata.py", line 1751, in cast_out
    result = cls.decode(tag_list)
  File "/home/pses/site_level_controller/.venv/lib/python3.10/site-packages/bacpypes3/primitivedata.py", line 1013, in decode
    raise InvalidTag("unsigned application tag expected")
bacpypes3.errors.InvalidTag: unsigned application tag expected
JoelBender commented 1 month ago

The LargeAnalogValueObject had the wrong datatype in its "schema." Thank you for the report!