10
CalDav integration with caching?
(lemmy.world)
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
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.
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.
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.
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. :(
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!