01
What it is
A smart mirror is a two-way mirror with a screen behind it. Where the screen is bright, the light comes through the glass; where it is dark, you see only yourself. Most of the work had already been done by other people: MagicMirror² is an open-source program that draws the clock, weather and calendar for exactly this. I put it on a Raspberry Pi 4 and changed one module so it shows my school assignments from Canvas. It is finished.
02
What I actually did
- Installed Raspberry Pi OS and MagicMirror² on a Raspberry Pi 4, and set it to start full-screen on its own whenever the Pi is switched on.
- Took an existing module and changed it to call the Canvas API with my access token, keep only assignments, and drop the announcements and other events Canvas sends along with them.
- Sorted the assignments by due date and showed them with the same fonts, sizes and layout as the rest of MagicMirror², so the new module looks as if it had always been there.
03
What it taught me
- Reading someone else’s code well enough to change one part of it without breaking the rest. Most of the time went on reading, not writing.
- Working with a real API: getting a token, reading the documentation, and finding that the data comes back with far more in it than you asked for.
- Matching an existing style instead of inventing my own. A module that looks different from its neighbours looks broken, even when it works.
- Knowing when not to build something. The program already did nearly everything I wanted; the honest job was the small part it didn’t.
04
Where it stands
Now
Finished. It shows the time, the weather and what is due next.
If I go back to it
Nothing planned. If I go back to it, it will be to mark assignments that are already handed in.