Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New App: Next Event #2409

Merged
merged 5 commits into from
May 22, 2024
Merged

New App: Next Event #2409

merged 5 commits into from
May 22, 2024

Conversation

mattcaruso
Copy link
Contributor

Description

This new app displays the next date in an iCalendar (ics) calendar when an event will occur. The other calendar options available from the community all focused on daily schedules and would often show "No more events today" (or similar) if there were no events in the connected calendar left on that day. For my use case, I want to display the next day when there's an event coming up, such as a calendar feed of concerts, shows, birthdays, or holidays!

next_event

Thanks to @quesurifn whose Universal iCal app heavily inspired the architecture of this app.

(PS: The code for the Lambda function referenced in this Pixlet app will also be open sourced soon. I'll submit a new PR when I can link to it directly in the code comments for future creators to see how I'm handling the server-side functionality).

Copilot

copilot:all

@tidbyt
Copy link

tidbyt bot commented Apr 23, 2024

⚠️ The automated review process is experimental and likely has bugs. Please bear with us as we iron out the kinks and enable you to ship changes at high velocity 🚀

Next Steps

Hello! Thank you so much for your change 🤜 🤛 . There are a few things you need to do:

  • Sign the CLA if you haven't already
  • Ensure your build is green! Any problem will display a proposed solution to try out
  • Get a review, either by Tidbyt Bot or by a Tidbyt engineer

Manual Review Required

Hang tight! A Tidbyt engineer will be by shortly to review your change. Here is what they will be looking for:

Test Details
App Dir All files are in a single app directory
🟡 Modules Usage of http.star requires review
Original Author The original author matches the PR author

Previews

apps/nextevent/next_event.star:

@tidbyt-bot
Copy link

tidbyt-bot commented Apr 23, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@mattcaruso
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@quesurifn
Copy link
Contributor

@mattcaruso I'm glad I inspired this. One quick note I haven't been able to resolve, even though it seems my code works, the way the Tidbyt updates (or doesn't) means it only shows the correct next event once. If you have the same issue, or if you figured out a solution, I'd love to hear! I haven't had the time to look into it.

@mattcaruso
Copy link
Contributor Author

@quesurifn Thanks for calling that out. Because of the way Tidbyt prevents you from "private publishing" outside of manually pushing updates via the API, I haven't been able to QA the app long enough to see that behavior. I'll keep an eye out for it and will think on it if it occurs.

@matslina
Copy link
Contributor

@mattcaruso @quesurifn Could you guys elaborate a bit on these Lambda functions? Are they just there to aid in parsing ics?

@quesurifn Could you provide more detail on the issue you mentioned about how "Tidbyt updates (or doesn't)"?

Also, @mattcaruso, private app hosting is available, but requires a subscription.

@quesurifn
Copy link
Contributor

quesurifn commented Apr 25, 2024

@matslina The lambda parses the ICS. Unfortunately for starlink, even though it's implemented in Go, we cannot add our own modules. So for more complex functionality, things like Lambdas are required.

In terms of updating, the UniversalIcal app has a bug where only the first status is showed. It doesn't update after. I'm not sure if that's due to the latency of the lambda on a cold start or because of the way the tidbyt updates.

@matslina
Copy link
Contributor

@matslina The lambda parses the ICS. Unfortunately for starlink, even though it's implemented in Go, we cannot add our own modules. So for more complex functionality, things like Lambdas are required.

Pixlet is FOSS, and I think something like an ics parser would be a great addition. Unless there's some technical limitation I'm unaware of, it should be easy to add.

In terms of updating, the UniversalIcal app has a bug where only the first status is showed. It doesn't update after. I'm not sure if that's due to the latency of the lambda on a cold start or because of the way the tidbyt updates.

Not sure about the lambda, but Tidbyt apps are run each time they're displayed, and they run in an environment that's very similar to what you have locally with Pixlet. There are some differences in caching that might come into play, but not sure how that would happen exactly. I can try to take a look later today.

@quesurifn
Copy link
Contributor

quesurifn commented Apr 25, 2024

@matslina That would be great. I do think the Tidbyt might be hitting a timeout with the lambda and displaying the last image. What exactly is FOSS?

@matslina
Copy link
Contributor

matslina commented Apr 25, 2024

Free and Open Source Software.

And that sounds like a plausible explanation. Unless explicitly instructed via the max_age parameter on Root, device will continue displaying the most recently received graphic in the case of the app crashing (or getting killed due to time limit exceeded).

@quesurifn
Copy link
Contributor

@matslina Do you guys have a procedure for extending pixlet or documentation? Not a project I can take on now, but when I free up it does sound interesting.

@matslina
Copy link
Contributor

Just submit a PR! Of course always a good idea to get some input on design and such before investing tons of time into it, just in case there's some issue that prevents us from merging. Discord is a great place for connecting with other community devs, and there's plenty of folks there who have enough experience with pixlet etc to give quality feedback.

@mattcaruso
Copy link
Contributor Author

@matslina Here's the Lambda function code used in my app, related to this PR.
https://github.com/mattcaruso/tidbyt-nextevent-lambda

@matslina
Copy link
Contributor

Took a quick look at iCal, and wow, yeah, adding support to Pixlet would not be entirely trivial. Might need some caching to get acceptable performance, as these ics files can get pretty large. My personal Google Calendar export is almost 1MB, reaching back to 2015.

For now, I'd like to at least add the suggested warning about how the data's processed in the app description. And @quesurifn would you mind doing the same on your app? I want it to be clear to users that their data is being processed by an external service.

@quesurifn
Copy link
Contributor

@matslina I'll update it when I get a chance.

@mattcaruso
Copy link
Contributor Author

@matslina Hello! Any other actions needed to get this one released?

@matslina matslina merged commit cafcee2 into tidbyt:main May 22, 2024
2 checks passed
@tidbyt tidbyt locked as resolved and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants