Closed henrisokka closed 3 years ago
tl;dr : This is a problem with the sample code.
The "configuration error" for reliability
is set in the _check_reliability()
function of the LocalScheduleObject
when an exception is raised during the process of crawling through the weekly and exception schedules. If you turn on debugging for the class then you should be able to see it, python3 app.py --debug bacpypes.local.schedule.LocalScheduleObject
.
The weeklySchedule
property value you are providing is a list and it needs to be converted to the appropriate array datatype. From this:
weeklySchedule=weekly_schedule,
to this:
weeklySchedule = ArrayOf(DailySchedule, 7)(weekly_schedule),
In an older version of BACpypes, initialization of property values went through a "convert the value if it needs to be converted" process. In later versions the design attitude changed to "if the developer is setting something to a value, assume they know what they're doing."
Note that if you set an exception schedule there is no fixed length, so the code would look something like this:
exceptionSchedule = ArrayOf(SpecialEvent)(exception_schedule),
I'll fix the sample code.
Thanks for the quick reply! It turned out the we were supposed to use Unisgned instead of Enumerated type. That made the configuration error go away.
There is still only 6 items in the weekly schedule although I'm creating the object like this weeklySchedule=ArrayOf(DailySchedule, 7)(weekly_schedule)
and len(weekly_schedule)
is 7.
Update, the length of obj.weeklySchedule is 7 in the bacpypes. For some reason the Yabe only shows only 6 items in the list. As all seems to be working correctly on the Bacpypes side I'll close this issue.
Hey, and thanks for an awesome library!
We are building a bacnet integration for a legacy automation system and we are modelling whole site's BMS with it.
I'm having issues when creating schedules. I've been trying following the sample. I have two issues, first is that the reliability of the schedule is
10 Configuration error
other is that there are only 6 items on the weekly schdedule -property although I'm creating it with 7.I've been trying to disable all the properties one by one but that doesn't help. I get the configuration error until there is only presentValue left and if I remove that the object is empty.
Console output when creating an object:
Screenshot from Yabe:
Thanks!