BAC0
BAC0 copied to clipboard
Write on local device with external software
Hello
I have created a script, to create a BACnet device, to add values coming from different sources (loraWan, zigbee, etcc) on this bacnet device, on my Linux machine. I can also update these bacnet points via :
my_device["Current_TempLora"].presentValue = 24
No problem, I can read this information via a third-party program on another machine, on the same network.
However, I can't write to these bacnet points from an external program.
Here's how my device and its points are created:
def start_device(device, arrayCmds):
logging.debug("Starting BACnet device")
_new_objects = []
try:
for x in arrayCmds:
formatVariableEnter = type(x['PresentValue'])
if formatVariableEnter is str:
continue
new_object = analog_input(
instance=int(x['CmdId']),
name=str(x['NameCmd']),
description=str(x['Description']),
presentValue=formatVariableEnter(x['PresentValue']),
properties={"units": str(x['Unite'])},
)
_new_objects.append(new_object)
for obj in _new_objects:
obj.add_objects_to_application(device)
return device
except Exception as e:
logging.error('ERREUR DANS CONSTRUCTION DEVICE BACNET AVEC LA COMMANDE >>>' + str(x['NameCmd']) + '. VERIFIEZ SES PARAMETRES (UNITES etc..) : ' + str(e))