Custom Written Dashboard (Private Google calendars, weather, etc.)

So, I’ve been toiling away some of the pandemic hours writing a custom dashboard in Python, and mounting tablets to my walls. The dashboard itself is less about Smartthings than displaying all of our upcoming events in one place from my and my wife’s Google calendars, and a shared family one, but the tablet is fully integrated using ActionTiles. In the event this gives others ideas, or someone wants the source code I thought I’d share.

(There is not a pretty graphical system to set things up, but the calendar definitions and customizable settings are all made at the top of the respective Python scripts so it isn’t terrible.)

Here is the final product:

(Note that I have an active weather alert right now. Ordinarily that section is blank.)

Ultimately what we have is a dashboard running on a Raspberry Pi that generates webpages accessible from the tablets. It pulls from Google Calendar using authenticated, private calendars (unlike Dakboard and others that requires the calendars be public), it combines all of the calendars together, and displays the upcoming events for the next two days. It also pulls out birthdays, assigns custom icons based on the content of the meeting, and allows specifying both the text and background colors on a calendar-by-calendar (and meetings with a time versus all day meetings) basis. (Both the icons and the search strings that trigger them are customizable through the script.) Finally it displays the weather using data from the National Weather Service API (with weather icons customizable through the script) and continually checks for and displays active weather alerts. This all executes fairly quickly but the backend actually generates static webpages when things change so that the tablets can take full advantage of the caches and avoid flickers during reloads.

Events can also be added from our work calendars by simply inviting as an attendee the gmail account associated with the dashboard.

My Ring doorbell ringing auto switches into the Ring app and displays the live video. The screen turns off automatically after a set period and upon darkness, and wakes back up based on proximity. Everything reverts back to the dashboard automatically after a set period of time. (These actions are actually handled by the Fully browser and macros so they’re a little more hacky than I’d like.)

Tapping the clock switches over to ActionTiles, which is loaded in a hidden tab in the background so its instant. Tapping the weather forecast switches it to an hourly forecast. And tapping the calendar for the next two days switches to displaying the calendar for the next 30 days (customizable).

(With the hourly weather displayed)

(Showing the 30-day scrollable calendar)

(When you tap the clock you’re swapped into ActionTiles to control things.)

Hardware wise, these are Samsung Galaxy Tab A 10.1" tablets, mounted in VidaMount On-Wall Tablet mounts. They’re hardwired into mains powers using line voltage to USB lamp adapters (all to Code), meant to add USB power to lamps and furniture. There are other options to power the tablets by fishing low-voltage wires and plugging them into an outlet nearby but I’m comfortable and experienced running electrical wires so I went for the completely hidden solution.

USB power adapters:


Very nice! :sunglasses: