Jump to content

Planning tool for structured days, for example for children with autism

Language: Bash

Platform: Linux (currently raspbian on Rpi 4)

Repository: github

 

I would like to share my story of creating and using my own planning tool to offer structured days to my two children with autism (sidenote: I do have autism myself). Hopefully I can offer others in a similar situation a solution worth looking at. I have evaluated quite a few paid offerings and none of them were offering the simplicity, repeatability, scalability and solution I had my eyes set on.

 

Our children (13 and 11) benefit greatly by having a structure for their days. Currently they cannot go to school because of long covid and autism burnouts, so we need to offer a whole day of activities / plans. Before my wife created a new schedule for every day on a whiteboard at the end of the evening of the previous day and she had to update the schedule before lunch time because the whiteboard wasn’t large enough to have a whole day of planning with icons reasonably readable. I have been a Linux system admin for quite a few years and have used some bash scripting to administer tasks for clients I worked for. I am not the best programmer, and I am aware that the program I wrote could probably be recreated a lot faster/sleeker/better than I have created, but I have to do with what I have and know.

 

The core idea of the solution I built was to have a rolling schedule which offers the current and the upcoming 6 tasks along with an accompanying icon and description. The script uses a semicolon delimited file, one for each child, and a local repository of icons used with children with autism (I used the free offering from sclera – make sure you don’t use icon filenames with spaces in them since you will be pointing towards them in the html files). The semicolon files are stored on a shared location, in our case on a samba share on a NAS, which allows us to use a different machine to edit the files to tailor the plan for the (upcoming) day. The script grabs the latest saved schedule file from the NAS and uses that to regenerate the index.html and a separate html for every child. This child specific html file is linked as starting page on their tablets, so they can view the schedule on the big 43” tv in the living room as well as on their tablet. Because the bash script grabs the latest saved version of that day’s schedule, a change in that file is visible within 2 minutes.

 

Along with the “working” version of that day’s schedule, we also have a standard version of that day’s schedule. That one is the most common schedule for that given day, the “working” version is a copy of the standard schedule and can be altered to fit that day’s plans and appointments. At the end of the day the working copy is overwritten by the standard version, ready for the new week.

 

The semicolon file markup is <time>;<minutes since midnight>;<icon name>;<activity description>;<color> . The script can currently select 6 colors to be used in the html file: red, blue, green, yellow, purple and white (default). Currently the schedule starts at 5 am and continues until 11:55 pm. The script uses the minutes since midnight column to keep order of the schedule and compares that value to that current number of minutes from midnight. The field <time> is not used by the script to determine for what time of day that line is, therefor it is treated as a text value and can be anything you want: 24h notation or American (am/pm) notation. The script walks through each of the 2 semicolon files and grabs the current and upcoming 6 activities from the file and stores it in a separate file, that will be read a bit later to replace the variables in the default html files for the actual values. If all activities are still in the future (it is still night and according to the schedule the children are supposed to still be asleep) the script displays the upcoming 7 activities. The script uses the field activity description to determine if there is something to display: if that field is empty that line is skipped. If an activity in the future becomes the active activity (the time scheduled for that activity matches the actual time), the time for that activity (say 12:45) is still displayed in the html pages, once that minute has passed (so the actual time is now 12:46) the current activity (one that started at 12:45) displays the text “Now” for the time of the active activity.

Increasing or decreasing the number of activities is easily done by introducing more or removing fields from the default html files and adjusting the script to match the html files.

 

The script is currently written to work with screens that can be controlled by wayland commands from the via HDMI connected raspberry pi’s. It will turn on the connected display 15 minutes before the new day’s schedule starts and turns it off 5 minutes after the schedule ends. For the start and the end of the schedule the program expects the value “Getup” for the beginning and “Time for bed” for the end of the day’s schedule.

An example of the semicolon file:
15:00;900;eat_and_drink.png;Having coffee;B
15:05;905;;;
15:10;910;clean_up_dishes.png;Clean up the cups;G

As you can see in this example we have 2 activities: one starting at 15:00 and one at 15:10. The line at 15:05 doesn’t describe an activity, it is empty. So, in the html file you will see a depiction of the 15:00 activity with its icon and the description “Having coffee” in blue (time & activity) followed by the depiction of the 15:10 activity in green.

The script expects a 5-minute jump from one line to the next, but it does allow for minute specific scheduled task (say at 19:23), just make sure that the minutes since midnight for the line(s) you add are correct.
 

I have included an example of the planning in Dutch, but since the text to the right of the icon is straight from the semicolon file, using it in another language is easily done. If the language you want to use here uses different characters than for example English, you would have to tweak the script to display the descriptions correctly. Also currently any accented character like é will not work. For me that doesn't pose a problem.

 

The script is free to download and use. If there are questions, suggestions or remarks feel free to let me know.

 

Voorbeeld planning.jpg

Link to post
Share on other sites

Although archives are convenient for sharing your project, git repositories should contain the source files. Most would rightfully apprehensive about downloading a random archive to their machine without first knowing the contents to verify the code. 

 

I recommend you unpack it, and push up your source files directly. 

 

That aside, it looks really useful so thank you for sharing! 

Link to post
Share on other sites

4 hours ago, codesidian said:

Although archives are convenient for sharing your project, git repositories should contain the source files. Most would rightfully apprehensive about downloading a random archive to their machine without first knowing the contents to verify the code. 

 

I recommend you unpack it, and push up your source files directly. 

 

That aside, it looks really useful so thank you for sharing! 

The unpacked files are uploaded to the github page

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×