'How to set BAC0 to set weekly schedule
I tried BAC0 for reading and writing BACnet data, I was following the BAC0 Document for performing various functions... I am able to read weekly schedule using read function i.e bacnet.read_weeklySchedule(address, instance), When I was trying to set weekly schedule using write_weeklySchedule(address, instance, schedule), I am getting error as "data type not supported".. If I am setting weekly schedule with out time value and key value in side week, write function (Shown as below) is able to write successfully.
schedule = {
"states": {"inactive": 0, "active": 1},
"week": {
"monday": [],
"tuesday": [],
"wednesday": [],
"thursday": [],
"friday": [],
"saturday": [],
"sunday": [],
},
}
If I am using the following format, BAC0 function is generating error.
"monday": [("1:00", "active"), ("16:00", "inactive")] or
"monday": [("1:00", 1), ("16:00", 0)]
Can any one please help me to understand what datatype are used and, what values to be used inside week
Thanks
Solution 1:[1]
With the information provided, it looks like the object is not configured properly, in a sense that data is incomplete and / or inconsistent. Please try the following:
setup 'schedule-default' and 'list-of-object-property-references' to have matching types, e.g.:
schedule-default: "inactiave"
// Not sure about the json format for this one so it'll probably be wrong:
list-of-object-property-references: [{(device, 12345), (binary-value, 0), present-value, -}]
after you've that setup correctly, retry to wring the weekly schedule property like you initially did.
If that does not work, you can also try to setup the schedule object to point at a numeric value (for testing purposes) and write numeric values to schedule-defaulf and weekly-schedule.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
