/MMM-Skola24

A MagicMirror² module that shows Swedish school timetables from Skola24.

Primary LanguageJavaScriptMIT LicenseMIT

MMM-Skola24

A MagicMirror² module that shows Swedish school timetables from Skola24.

image

Bright mode screenshot
Colored dark mode screenshot

Installation

  1. Clone repo:
cd MagicMirror/modules/
git clone https://github.com/retroflex/MMM-Skola24
  1. Install dependencies:
cd MMM-Skola24/
npm install
  1. Add the module to the ../MagicMirror/config/config.js, example:
{
	module: 'MMM-Skola24',
	header: 'My Timetable',
	position: 'bottom_right',
	config: {
		host: 'goteborg.skola24.se',
		unitGuid: 'ODJiYjcwYjEtYWE3MS1mNGU1LWFhNDktOTU2ZDM5M2M4NmQ5',
		selection: 'OGQ5ZmM5YTQtOTZkMi1mY2I4LWE4M2ItZTJiZjI5MjFiMmEx',
		schoolYear: '6cd9ff8f-4a44-4c73-bec2-de67787fbda6'
	}
},

Configuration

Option Description
host The hostname of the "domain" (most often the municipality) where the school is located.
Default value: 'goteborg.skola24.se'
unitGuid An ID specifying the school.
Default value: 'ODJiYjcwYjEtYWE3MS1mNGU1LWFhNDktOTU2ZDM5M2M4NmQ5'
selection An ID specifying the class (e.g. 3A).
Default value: 'OGQ5ZmM5YTQtOTZkMi1mY2I4LWE4M2ItZTJiZjI5MjFiMmEx'
schoolYear An ID that is needed for unknown reasons. It seems to differ between domains, but not between years as far as I can tell.
Default value: '6cd9ff8f-4a44-4c73-bec2-de67787fbda6'
width Width in pixels of the timetable.
Default value: 600
height Original height in pixels of the timetable. The rendered timetable will be much less than this as the free times at the end of each days and the footer is clipped.
Default value: 600
darkMode True to fit the standard MagicMirror theme. False for the usual bright timetable colors.
Default value: true
darkModeRecolorLessons Only used in dark mode. True to color all lesson boxes dark green. False to keep original colors (which imo are to bright for MagicMirror).
Default value: true

The host can be found by browsing to https://www.skola24.se and looking at the dropdown where you select domain/municipality. The unitGuid, selection and schoolYear values can be fetched with your browser's developer tools (open with F12 in browser). Go to e.g. https://web.skola24.se/timetable/timetable-viewer/goteborg.skola24.se/any-test, select the school and class and inspect the outgoing network traffic and you can find these values.

Details

On weekdays, the timetable for the current week is shown. On the weekend it will instead show the timetable for the upcoming week.