this post was submitted on 21 Aug 2024
11 points (100.0% liked)

homeassistant

12276 readers
385 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 2 years ago
MODERATORS
 

I have three different calendars syncing using caldav, one on fastmail and two on icloud. When I open the calendar view it's often the case that one or more of these timeout (all of them are afflicted by this), so it seems that these calendars are not actually stored on the server but polled everytime I want to view them.

Are there any alternative integrations that will periodically sync the calendars and keep them on the server? Or can I self-host an app that does this and will never time out because it's on my local network?

you are viewing a single comment's thread
view the rest of the comments
[–] just_another_person 1 points 4 months ago (4 children)

So you want to make a caldav instance that pulls in three calendars, then syncs to one? You could script this pretty simply, or maybe just create another account on Proton or Google or something that subscribes to these others, then sync from that one. Seems more complex than just using a single instance for all your calendar needs though.

[–] aleq 1 points 4 months ago (3 children)

Not exactly. My main use-case here is for my girlfriend and me to see each both of our calendars in one place, and HA had support for it and is a web portal we both have access to. To do automations on them is secondary.

Currently, whenever I look at the calendar control panel it will load for a bit while pulling all the calendars, and sometimes timeout and not show anything. I believe this to be because it's pulling from Fastmail / iCloud everytime and might be rate limited or just have a poor connection, this wouldn't be an issue if the calendars were stored on the instance itself because then it would only miss the latest entries.

The idea that maybe I can self-host an app that does it is that if HA can't do the caching, then maybe this self-hosted app can and it wouldn't matter that HA fetches it remotely each time since the remote is on the same local network. Having them as separate calendars is still desirable since that gives some additional information.

[–] just_another_person 1 points 4 months ago (2 children)

Well the docs say it syncs about (weird phrasing there) every 15 minutes, so what you're getting from HA is actually cached and served from the HA instance. It's not just proxying comms to the calendars.

If you're seeing something different, you may need to check your logs and see what the issue is, but the process as defined here stores everything locally in HA, and pulls down changes every 15m, which should also be configurable.

[–] aleq 2 points 4 months ago (1 children)

Interesting, so I guess those API-calls are just fetching the cached calendar on my HA Yellow. Wonder why it's so slow, but I guess there's not much to do about that then. :(

[–] just_another_person 2 points 4 months ago

Sure there is! Look through the docs and make some test requests you can check with Curl or Python, and break down what is taking so long. Maybe have a look at the logs as a first step and see if there aren't some warnings or errors that may point you in the right direction as well. Double check all your URL endpoints and check to ensure https and auth is all set properly. Lots of ways to attack it.

Don't give up!