ChristianTremblay/BAC0

COV not working in multiStateValue objects

amaduain opened this issue · 1 comments

Working with COV for analogInput and analogValue works flawlessly, but when using with multiValueState object, the changes to presentValue are not reported on the bacnet instance.
Working with Yabe the changes are sucessfuly reported on the explorer, but BAC0 client is not showing them.

import BAC0
bacnet = BAC0.lite(ip='192.168.2.5/24')
bacnet.whois()
def my_callback(elements):
    print(f"Source: {elements['source']}")
    print("Object Changed is : {}".format(elements['object_changed'][0]))
    print("Object Changed Instance is : {}".format(elements['object_changed'][1]))
    print("Present value is : {}".format(elements['properties']['presentValue']))


address = "0xc0a802e4e25a"
objectID = ("multiStateValue",0)
bacnet.cov(address, objectID, callback=my_callback)

That doesn't work
but this:

import BAC0
bacnet = BAC0.lite(ip='192.168.2.5/24')
bacnet.whois()
def my_callback(elements):
    print(f"Source: {elements['source']}")
    print("Object Changed is : {}".format(elements['object_changed'][0]))
    print("Object Changed Instance is : {}".format(elements['object_changed'][1]))
    print("Present value is : {}".format(elements['properties']['presentValue']))


address = "0xc0a802e4e25a"
objectID = ("analogValue",0)
bacnet.cov(address, objectID, callback=my_callback)

Works flawlessly
Any hints or limitations for the multi state values?

Forget it, I was playing with other emulators and seems that the COV was disabled for that object instance :-(
It was a configuration problem on the emulator side.