tidbyt app google calendar event

Finishing a Tidbyt Google Calendar App with Cursor

I'm a sucker for hardware gizmos. Building a website or web app is cool, but seeing something you've made appear on a hardware device is a giddy feeling.

It's like unlocking a secret hack to the physical world - not just the digital universe.

So a couple years ago I bought a Tidbyt for the express purpose of learning to code in Python. Not to build another web app but to impress my kids with a physical, retro-looking device that I could hack into. Who knows, maybe it would help them see how fun coding could be.

Everything went according to plan, until like many side projects, life got busy and I had to move on. But thanks to Cursor, I recently picked this back up on a Sunday evening and finished what I first started two years ago.

And then I found out Tidbyt has recently been discontinued. Just my luck! More on that in a bit.

Before I get to the back story, first let me show you the app.

Tidbyt Any Calendar app - display any Google or Outlook calendar

This Tidbyt app displays your current Google Calendar events on your Tidbyt device. It actually works with any iCAL public URL that ends with .ICS, so any public calendar like Outlook works too, but Google Calendar in my opinion is the easiest to manage.

Tidbyt Any Calendar app - add google or outlook calendar ical ics link

Unlike the official Tidbyt Google Calendar app, you don't need to worry about OAuth authentication, you don't have to own the calendar, and you can create an entirely separate calendar just for this Tidbyt app.

In addition to showing event times, you can also turn off the time display and only show the event title. This is a great way to display messages, announcements, reminders, and of course meetings and events - all handled through your calendar without having to open up the Tidbyt app more than once.

How to use Any Calendar

To get the iCal .ICS link from a Google Calendar, you first have to make the calendar public, and then you can copy the link and paste it into the Tidbyt app.

How to get an iCal .ICS link from Google Calendar

To get the link from Outlook, it's easiest to go to outlook.office.com, click on the gear icon in the top right to go to settings, then Calendar, then Shared Calendars, publish the calendar, and then copy the link.

Calendar logic to get one event

Now the Tidbyt Any Calendar app will use this logic to display one event:

  • Is there a current event happening? Show that.
  • If no current event, is there an upcoming event today? If so, show that.
  • If no upcoming event today, is there an all day event today? If so, so that.
  • If no event today, don't load the app at all. This is helpful if you have several apps rotating on your Tidbyt, so this app isn't wasting unnecessary space in the rotation.

If an event starts today but goes through midnight, it's still considered a today event and will show as a current or upcoming event.

Here's the Tidbyt with an upcoming event. The event title and time are both centered and use the smallest font available so everything shows nicely. If the event title is too long to fit in the display, it will scroll vertically.

An upcoming google calendar event with Tidbyt Any Calendar app

You can also choose to customize the background and text colors in both the time and event sections. Here's an all day event:

Google Calendar all day event with Tidbyt Any Calendar app

And finally, there's an option to hide the time entirely. This is what makes this app so useful I think. It's more than just a calendar reminder of current or upcoming meetings or events - you can use it to schedule any kind of announcements or messages.

Here's an example of the time hidden:

Tidbyt Any Calendar app with a google calendar event as an announcement or message

I can think of lots of use cases for the event-only display. For example, a coffee shop or store showing daily specials. Or a business office showing important messages for front desk visitors. Or really any kind of announcement or message, like current sales or fundraising numbers.

Being able to manage and schedule these messages via a calendar event is way easier than going into the Tidbyt app and typing in a message, saving, scheduling, manually removing or editing the message, etc.

And best of all, you can create any calendar or even use a public calendar already available, without having to login to your account with the OAuth credentials. This makes it easy for staff or family members to manage one calendar for this app.

The idea for a Tidbyt calendar app

If you've never heard of Tidbyt, it's a colorful little retro display with only 64x32 pixels, with a community of hobbyist and professional developers submitting fun and useful apps.

Tidbyt apps

The apps actually use Starlark, a Python-like language, along with some Tidbyt-specific configuration and rendering modules. Each device can be controlled via a mobile app, and relies on Tidbyt's servers to receive the apps and send back images to each device.

There's actually a built-in Google Calendar app that works well, but it requires logging into your Google account via OAuth, and it only uses your primary calendar. So to me, the display is good for seeing upcoming events from your main Google Calendar, but I had a different idea.

Tidbyt Google Calendar

I wanted to use the Tidbyt to display messages and events for my family, which I could control via a secondary Google calendar. Seems simple enough, right?

Turns out there's been other Tidbyt owners requesting something like this too - the ability to show events from other calendars without logging into their account, and the ability to schedule messages via a calendar rather than going into the Tidbyt app to type in a message. You can see some of the user requests in the Tidbyt instagram post above.

Building the Tidbyt app for myself, but then giving up

So I learned enough Python and read the Tidbyt documentation lots of times to where I could parse a Google iCal file via a public .ICS link.

Then I used a self-hosted Tidbyt manager web app that developed by rock star Ingmar Stein to run my app on my own Tidbyt, without going through the public submission process.

The first morning after I got it working, I put up a fun message for the kids and it was such a fun win. Tidbyt hacked! For a useful app!

Tidbyt private calendar app

We continued to use it for a variety of messages, events, and reminders. But I wanted to make it available to other Tidbyt owners, along with some features and enhancements I thought would make this app really useful.

And that's where I started to hit a wall. The calendar has a timezone, the user has a timezone, there's logic about what's a current or past or upcoming event, there's all day events, what happens if an event spans multiple days.

I tried asking ChatGPT for help since it was all the rage at the time, but it would suggest all sorts of Python solutions that did not work with Starlark, or web app architecture that wouldn't work with the simple Tidbyt system.

So I put it aside and moved on. And then a couple years later, on a recent Sunday evening, I picked it back up again. And for a moment I thought about going through it all by hand, by trial and error, with only my brain and the documentation. The only true way to code and own your app and have fun and all the things AI haters say.

But a few hours later I had to face the truth: this just isn't enough of a priority for me to spend my limited time on, and so it simply wouldn't get done.

But maybe Cursor could help? Vibe coding is all the trend and maybe it would work now when it couldn't a couple years ago (which is a lifetime in AI).

Finishing the app with Cursor

I really love Anthropic Claude and have been using it daily for all sorts of tasks and research. But for coding, Cursor with Claude Sonnet is so much faster than copying and pasting code into the Claude web app over and over again.

Building Tidbyt app with Cursor and Claude AI

Cursor has a Chat window where you can ask questions and it can use your entire folder for context. But there's also a Composer tab where you can give it the keys to make changes for you. It will also run the app via terminal, see any errors, make changes, and generally keep going until it's satisfied.

Of course there are many problems with this kind of power, and it's still hilariously terrible at times, but as long as you use Git for source control, you can let Composer (in agent mode) do its thing. It can also run git commands too, but that's too risky in my opinion.

Cursor docs

The one feature that makes Cursor so helpful for something like a Tidbyt app is you can provide it a link to code documentation. So instead of copying and pasting pages and pages of docs, you provide it a link (like tidbyt.dev/) and it will read through all the pages and subpages and use that for context learning.

Cursor docs for Tidbyt Starlark documentation

So that's really the difference between now and two years ago, when ChatGPT couldn't figure out how to use Starlark specifically and would try to use Python modules that didn't exist in the Tidbyt ecosystem.

Now, Cursor with Claude knows precisely what Starlark is via the docs, and with Claude getting web search recently, it won't be long before the Cursor version can also do its own research.

Of course it's never a 'one shot' attempt like people claim all over X. For this app, it took a few late evenings fine tuning all the logic so it works just like I envisioned. I would have to guide it and make my own edits to the code when Cursor got stuck in a cycle of neverending rabbit holes and fixes that went nowhere.

Publishing the Tidbyt app

After a lot of testing, I was finally satisfied with the Any Calendar app and was ready to publish it for others to use. Tidbyt has designed this as a very streamlined process for developers.

First you fork the community repo, then you can use pixlet create to make a skeleton starter with Tidbyt's requirements. This is to ensure the manifest and .star file have the right configuration, along with max characters for the title and description.

Then once you've created your app folder and files inside the commmunity /apps folder, you can then create a new feature branch and push the changes, which will create a pull request. A Tidbyt developer will review and approve if all goes well. In my case I had a few unused variables that failed the linter test, so after fixing that I pushed changes and my app was merged into production.

Tidbyt ios app - search and find Any Calendar app

It's so cool to see my app available to others who have a Tidbyt. Also since I really like to add finishing touches to projects, with Tidbyt apps the thumbnails displayed in the app search is the default app result - not an image you provide. So for many apps, the thumbnail is an error message.

So I made my default image a simple event display with instructions to add a link. Simple but makes the presentation a little nicer.

Tidbyt discontinued - what now?

I hadn't paid much attention to Tidbyt news until taking on this calendar app again, so I was surprised to learn Tidbyt was sold and they're no longer selling new units. Will the parent company take over the hardware and sell them in the future? Who knows, let's see.

But in the meantime, all current Tidbyts continue to work, new apps are being reviewed and approved, and the Tidbyt servers are still keeping everything running. For how long? That is the question.

To prevent these super cool retro displays from becoming paperweights, Ingmar Stein (the same developer who made the Tidbyt Manager I loved and used for my personal app) has launched a new project called Tronbyt, while building support from the Tidbyt dev community.

Tronbyt will allow Tidbyt owners to continue to use the device, to build new apps for the public, and to serve up private apps, all without depending on Tidbyt servers. I look forward to trying it out and hope to keep playing with this device for many years, and maybe my kids will make their own Tidbyt apps too.

I'm also looking forward to the TRML project, which is similar to Tidbyt but uses an e-ink display. Hardware gizmos for the win.

You can see the Any Calendar source code with README here, as well as the app on the Tidbyt community repo.