Get events from Cal file (OPEN)

hi everyone wondering if this is possible my kids school has a website that hosts two pdf files, these files contain the dates for when the school holidays are is there a way to pull this information from there site and use it to trigger a switch on/off on these dates

Hi Sharpy,
maybe something like PDFMiner could help you to extract their holiday dates.
But to be honest: That is not worth the effort as you would have to figure out the exact position of the data manually beforehand. My advice is: Type that stuff into a google calendar and use the calendar binding to react on these entries. Less error prone, less complex, faster, more stable -> Better solution.
Think about someone changing the PDF structure, use a different PDf writer… you would have to start from scratch very often.

1 Like

i will input them by hand thanks for that

Ok so after more research the school offer a cal subscription would this be a better option for automating the holidays?

the website says you subscribe they push events & changes too your calendar but the events are non editable

whats your opinion

I have downloaded the cal file it looks like you can edit events but i’m assuming if anything changes on their cal sever side all changes i made will be updated and deleted.

could i download the file they host, scan the file for title dates times, auto update the descripton for OH save a new cal file and import that for Openhab as this would not be controlled by them so updates would be manual but quicker than manually typing all dates ect ?

its pretty simple what i need to do the calendar has two events Term start Term end
and i need to toggle a switch Kids_Holiday_Mode so on Term End switch Kids Holiday mode ON & OFF at Term Start i just need to pull the data and make the changes

Check out the caldav Personal Binding, this should give you the functionality you are looking for.

ok thanks for that i have had a look through the docs its quite confusing and theres alot too understand couple of questions

what would i do point the binding towards the schools server or download the file its an .ics file

what would i then do use filters or something to trigger thee switch

Create a Google calendar, an example on how to use the binding with it would be something like this.
I´m not using it myself, but if you search for e.g. “Müllkalender” you will find plenty of threads dealing with it.

Maybe this is something that would help you: Simple Python script that reads Google Calendar and updates OH items with event information
Good luck :wink:

I have noticed that thread myself and was wondering if it was sutable i still havent made any progress on this yet im deciding how to go about it still