Writing a Schedule from FIN Stack to BACnet device
There are two ways of writing a schedule:

1) One way is automatically when you edit a schedule in Finstack. For this, the schedule must be added (linked) to a point in DB Builder, and that point must be bound to a BACnet object on the device. 
Here are the steps:

Drag a SCHEDULE Object from the connector in DB Builder - this will create the FIN Stack point and bind the object to the point

Make the point writable and schedulable

Add a connTuning on the point that has the tag 'writeSchedule'

Create a schedule and add it to the point

When you edit the schedule it will automatically be written on the device

This method works, but there is one small issue (please read and tell me if you do not understand this). 

If you set the schedule calendar with dates and values, and the value associated with the current time (the moment you finish editing the schedule) as it results from the calendar is Null, then the Skyspark framework will not call the connector functions that write to the device

The second way is by using the functionbacnetScheduleWrite(connRef, pointRef, scheduleGrid, writeLevel)

pointRef - can be a string with a valid BACnet schedule object id like "SCH2" or a ref/record of a FIN Stack point that is bound to a BACnet schedule object 

scheduleGrid - is the actual content of a schedule, a grid/list of 'date : value' pairs, that you want to set as WEEKLY_SCHEDULE.

As you can see you do not need to have in DB Builder points bound to BACnet objects, you do not need to drag objects from the connector into DB Builder, you can just specify a schedule calendar (a grid with 'date: value' pairs) to be written to a BACnet object.

A way to get a schedule calendar grid is by using the (Skypark) function scheduleHis(pointRef, thisWeek() +1day , {timeline})

This method works, but if you specify a string as pointRef the conversion from Str -> UnsignedInteger in case of MultiState and Bool -> Enumerated in case of Binary will not be done.

Reading a Schedule from BACnet device to FIN Stack

There is the function bacnetScheduleRead(connRef, pointRef), that is similar to the 'write' one.

This function only reads the Schedule and returns it (prints it out), it does not store it in folio DB.

The read also works, but the returned Grid looks very "ugly" and was intended for testing purposes. The user can look at it to debug if the information is correct on the device.

 

The initial design was to just push 1-week schedules from FIN Stack.

This was envisioned by doing a job that pushed 1-week schedules and programs the controller for the next week.

Read function was only for debug and maybe use some logic to compare schedules, the idea was that only FIN Stack(1 instance) will drive the schedule and not the BACnet controllers.