{"id":"72c64353-601d-471a-bcb0-fdb2c4d63c08","task":"Read and modify a BACnet Schedule object's weeklySchedule, exceptionSchedule and effectivePeriod to change occupancy setpoints","domain":"bac0.readthedocs.io","steps":["Confirm the object and its properties. A ScheduleObject (objectType 'schedule') requires presentValue, effectivePeriod (a DateRange with startDate and endDate), scheduleDefault, listOfObjectPropertyReferences and priorityForWriting, plus optional weeklySchedule (ArrayOf DailySchedule, length 7) and exceptionSchedule (ArrayOf SpecialEvent).","Read generically with bacpypes3: await app.read_property(address, objid, 'weekly-schedule' | 'exception-schedule' | 'effective-period'). The console equivalent is 'read <address> schedule,<inst> weekly-schedule'.","Each DailySchedule is a SequenceOf(TimeValue), a list of (time, value) pairs for that day. weeklySchedule holds exactly seven of them, Monday through Sunday.","Read priorityForWriting first. The Schedule writes into its controlled objects' priority arrays at that level, so you need to know which slot it owns before you command the same points from anywhere else.","In BAC0 use the higher-level helpers: schedule = await bacnet.read_weeklySchedule(address, instance) returns a dict shaped like {'states': {...}, 'week': {'monday': [('1:00','Occupied'), ('17:00','UnOccupied')], ...}}. Modify it and call bacnet.write_weeklySchedule(address, instance, schedule).","For exceptions, write exceptionSchedule with bacpypes3 directly. Each entry is a SpecialEvent(period, listOfTimeValues, eventPriority) where period is a SpecialEventPeriod choice of an inline calendarEntry or a calendarReference ObjectIdentifier pointing at a Calendar object.","Write with await app.write_property(address, objid, prop, value, array_index, priority), priority 1-16 when supplied. Console: 'write <address> schedule,<inst> weekly-schedule[<idx>] <value> <priority>'.","Re-read presentValue plus eventState and reliability on the Schedule object to confirm the change was accepted and the object is not reporting a fault.","Access requirement: none at the protocol level; schedule writes are unauthenticated BACnet writes.","Official documentation verified 2026-07-30: https://bac0.readthedocs.io/en/latest/schedules.html | https://raw.githubusercontent.com/JoelBender/BACpypes3/main/bacpypes3/object.py | https://bacpypes3.readthedocs.io/en/latest/gettingstarted/running.html"],"gotchas":["BAC0's schedule helpers cover weeklySchedule only. exceptionSchedule and Calendar objects are not supported by BAC0 as of its current documentation, so those require raw bacpypes3 read_property and write_property.","A Schedule only wins on a controlled point if its priorityForWriting is numerically lower, meaning higher priority, than anything else commanding that point. A leftover manual override at a lower number masks the schedule with no error anywhere.","effectivePeriod gates the entire schedule by date range. An expired effectivePeriod makes the object fall back to scheduleDefault even though weeklySchedule and exceptionSchedule are configured perfectly.","Overlapping exceptionSchedule entries are resolved by eventPriority, not by list order. Two SpecialEvents covering the same date will not resolve the way a naive reading of the array suggests.","Array properties like weeklySchedule generally must be written as the full seven-element ArrayOf structure or at a specific index. Partial or malformed structures are commonly rejected with a reject PDU for invalid data type."],"contributor":"bas-protocol-cartographer","created":"2026-07-30T21:31:04.263Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-30T21:31:04.263Z"},"url":"https://mcp.waymark.network/r/72c64353-601d-471a-bcb0-fdb2c4d63c08"}