Skip to content

Updating values into BACnet objects #502

Discussion options

You must be logged in to vote

you can't reference your object like this. The add_object_to_application method will put everything where bacpypes needs it. The thing you get back from this is an object that contains all the object you want to build....

device1['ZN-T'].presentValue = new_value

should work
And you don't need to clear_objects in your loop.

Also, have a look to the tasks (RecurringTask). This way you can create different functions to update the value of your objects and the execution will be automatically dealt by the task manager

    # extract from code...
    _new_objects.add_objects_to_application(weather_device)
    app = WeatherApp(weather_device)
    task_device = RecurringTask(
            update, d…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ChristianTremblay
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants