Hello, do recurring full day events work with that?
I would like an automation to behave differently depending on which full day event is active.
The default caldav integration is not able to detect recurring full day eventsā¦
Hello, do recurring full day events work with that?
I would like an automation to behave differently depending on which full day event is active.
The default caldav integration is not able to detect recurring full day eventsā¦
Recurring events will have the recurring: true
attribute.
However I remember from testing with a birthday that I still needed to fix some things. I donāt remember exactly, but I think the year may be incorrect in the sensor data now if the event has been in your calendar for several years. Itās on my to-do list to investigate and fix this sometime.
hi @EdwardEnglish, sorry my memory failed me, the recurring events attribute is currently only there for google calendar events, not for events from a caldav calendar. I do plan on adding support for recurring events, but canāt say when I will find time to work on it. I did start reading up on the documenation and having a look at examples. It seems like the most complex bit here will be calculating the current applicable date of a recurring event as the data gives you the initial date and a recurrence format, not a ready made list of future dates.
Hello @kdw2060
I try to setup your addon for my google calendar but I am struggling a bit. I have a few questions.
My config looks like this:
locale: de
fetchDays: 5
fetchCRON: '*/30 * * * *'
calendarList:
- calName: Geburtstage
calType: google
calId: xxxxxxxxxxxxx
googleServiceAccountKeyfile: google_credential.json
The log tells me the following:
23 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
Calendar(s) queried at: Wed Jul 13 2022 01:30:00 GMT+0200 (Central European Summer Time)
postEventsAllCalendars error: TypeError: Cannot read properties of undefined (reading 'length')
CRON-Task: Events posted to sensor(s) at: Wed Jul 13 2022 01:30:00 GMT+0200 (Central European Summer Time)
There was an error loading the gcal data: Error: No key or keyFile set.
So I guess this one āgoogleServiceAccountKeyfileā is wrong.
I copied it to \share
Is the folder name needed for the attribute as well?
Then I have a question regarding the addon folder. There should be the data folder with the allFutureEvents.json.
I installed your addon (as well as all other installed addons) directly via the admin UI in Home assistant. When I go to \addons the folder is empty. There is no file or directory inside. So I am wondering if this was the right way to copy my credential files to the \share folder.
And I saw something that I need to provide my service account email to my calender and share the calender with this email. But I donāt know where do I get this service account email?
Your configuration looks good, no errors there as far as I can see (I cannot know if your calId is correct off course). The \share folder is not a subfolder of addons, itās a seperate standard folder in the HA folder structure (see this earlier reply).
As the loading of the events failed itās logical there is no allFutureEvents.json file yet.
The service-account email was presented to you when you made the service account, but is also visible inside the service-account json file. Just open it with a text editor and copy paste te e-mail. How to share a calendar with that e-mail adress is shown in this earlier reply.
I think you might not have placed the serviceaccount json file in the right folder and/or you didnāt share the calendar with the service-account e-mail adress.
@kdw2060
OK, I used a wrong json file.
I think I now have the correct file, but I am not able to retrieve events:
found 0 vulnerabilities
Previously stored events posted to sensor(s) at: Wed Jul 13 2022 12:28:49 GMT+0200 (Central European Summer Time)
postEventsAllCalendars error: TypeError: Cannot read properties of undefined (reading ālengthā)
Calendar(s) queried at: Wed Jul 13 2022 12:30:00 GMT+0200 (Central European Summer Time)
postEventsAllCalendars error: TypeError: Cannot read properties of undefined (reading ālengthā)
CRON-Task: Events posted to sensor(s) at: Wed Jul 13 2022 12:30:00 GMT+0200 (Central European Summer Time)
There was an error loading the gcal data: Error: Not Found
I think there was a typo in the calendar ID. Now there is just the error with Cannot read properties of undefined.
Calendar(s) queried at: Wed Jul 13 2022 12:40:00 GMT+0200 (Central European Summer Time)
postEventsAllCalendars error: TypeError: Cannot read properties of undefined (reading 'length')
CRON-Task: Events posted to sensor(s) at: Wed Jul 13 2022 12:40:00 GMT+0200 (Central European Summer Time)
But I donāt know what else can I do.
Is it correct, that it should show up under the entity: sensor.. So in my case sensor.Geburtstage ?
Ok, after a restart the sensor shows up. Thank you for your support
Hello, The baikal and caldav woking without plugin install? My Hass Calendar working in caldav mode whitout error, but the sensor data emply.
Thx
I donĀ“t use baikal myself, so I canāt set up tests for that. From the other users that do use Baikal I understand that that baikal plugin that is mentioned in the docs is not required if you choose ācaldavā as calendar type indeed.
If your calendar is empty thatās probably a config issue. To not annoy the other users here I suggest you post your config settings in the github-issue that you re-opened. Iāll see if thereās a glaring issue visible there.
After being disappointed with the default Google Calendar integration (because you can only see one event per calendar), I was excited to find this earlier today.
I have a personal calendar and a work calendar. I was able to get them to both show up using your Calendar Add-On. Amazing!
1
There didnāt seem to be any way to read my work calendar that had been shared with my personal calendar, so I had to set up another json file for it too. Was there any easier way?
2
Is there any way to merge them into a single sensor?
(perhaps with each event having a field showing the calendar origin)
Iād like to grab the 4 next events regardless of which calendar theyāre on. I could read in the next 4 events from both calendars and then sort that by date and throw out the last 4.
A single sensor would be much easier for this use case.
3
I could never get the en localization to work (so went with en-ca). Tried multiple times, seems missing (same error the person shared earlier where they were also using en)
4
My startdate is showing up like:
startDate: '2022-08-24T00:00:00.000Z'
year: 22
start_month: Aug
start_day: 23
start_time: '17:00'
start_month_digits: 8
endDate: '2022-08-24T00:50:00.000Z'
But the event starts at 17:00 on 8-23
Iād expect it to be:
2022-08-23 17:00:00
So it could be used to trigger an automation.
Is this because my localization is wrong? Thoughts?
5
This is so great! Iāve got my next 3 meetings showing up on my dashboard (with heavy use of the custom:button-card)
You mean an extra Google service account? If the work calendar and personal calendar are both calendars under the same Google account that shouldnāt be necessary. Off course if you use two seperate Google accounts then probably yes. Iād have to delve into the google api documentation and do some tests to find out exactly if itās possible to share calendars between 2 accounts in such a way that one service account can access them.
2
Is there any way to merge them into a single sensor?
(perhaps with each event having a field showing the calendar origin)Iād like to grab the 4 next events regardless of which calendar theyāre on. I could read in the next 4 events from both calendars and then sort that by date and throw out the last 4.
A single sensor would be much easier for this use case.
That could be done, but I donāt see it becoming a priority on my to do list anytime soon. Am currently mainly working on improving how recurring events are handled. Like you said, handling this yourself with frontend-code in the card is the way to achieve this now.
Iām also busy switching from moment.js to Luxon, paying extra attention to possible date-time mishaps. That should hopefully help to fix both those issues.
Hi
I try to use this add on with nextcloud but without success.
This is my config :
- calName: nextcloudThomas
calType: caldav
username: $username
password: $password
caldavUrl: https://$domain/remote.php/dav/calendars/admin/personal/
Logs are good
Calendar(s) queried at: Wed Sep 14 2022 09:30:12 GMT+0200 (Central European Summer Time)
CRON-Task: Events posted to sensor(s) at: Wed Sep 14 2022 09:30:12 GMT+0200 (Central European Summer Time)
Calendar(s) queried at: Wed Sep 14 2022 10:00:12 GMT+0200 (Central European Summer Time)
CRON-Task: Events posted to sensor(s) at: Wed Sep 14 2022 10:00:12 GMT+0200 (Central European Summer Time)
Calendar(s) queried at: Wed Sep 14 2022 10:30:12 GMT+0200 (Central European Summer Time)
CRON-Task: Events posted to sensor(s) at: Wed Sep 14 2022 10:30:12 GMT+0200 (Central European Summer Time)
But senor.nextcloudThomas is not created.
Thanks for your help
Hi @elyisum , it seems as if no events are retrieved, and hence no sensor created.
Itās hard to guess whatās going on here. Are you familiar with Postman or similar tools with which to test api-calls? Iād need the response of those to understand whatās going on here.
In this earlier support issue on github you find some screenshots and explanation about working with postman (ignore the apple/icloud specific stuff)
Hi @kdw2060
I installed postman, for now, I only have an error 500.
I continue my researchs
Edit, now I get
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
<s:message>A calendar-query REPORT on a calendar with a Depth: 0 is undefined. Set Depth to 1</s:message>
New edit:
If I add Depth 1 in header, now i have a status 207
I donāt know what this tatus means
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"/>
If you want, I can create an account for you on my nextcloud so you can make some tests
The 207 reponse is good, only the response doesnāt return any events for some reason. Most obvious reason could be the date-range in the request body doesnāt contain events. Else having access to a test account may be handy in deed. You can send me a DM, but I canāt make any promises when I will find the time to work on it. Might be some months.
Hi @kdw2060, bumped on this, browsed through topic and on GH but couldnāt find an answer.
I run HA core, so without add on store, and use nextcloud: I wonder if there is a way to get this working for my case?
Add-ons are docker containers, so you could also run this addon standalone if you install docker on your home assistant host or another machine.
Youād also have to change some of the code inside index.js
:
process.env.SUPERVISOR_TOKEN
ā would need to be replaced by a token you have generated manually, because outside of HA this token will not be available as an environment variable
"http://supervisor/core/api/states/sensor."
ā the url/ip adress of your HA instance should be entered manually in stead of āsupervisorā
you should store your add-on options in a options.json file and load that file ā at the start of the code alter const options = require("./options")
to load that file
So doable, but you need a little programming experience.
Another route would be to rewrite the whole add-on in python and make it into a proper home assistant integration.
I had this error too (also ālooking for funding for 22 packagesā). It was resolved when I didnāt make use of SSL anymore. I think I have an issue on my certificate.
What do I have to do to create the calendar sensor entity? The addon is running, but no sensor entity shows up.
Standard CalDav integration is showing data in Calendar.
- calName: ton
calType: caldav
username: "!secret calendar_caldav_username_ton"
password: "!secret calendar_caldav_calendar_caldav_password_ton"
caldavUrl: http://XXX.XXX.XXX.XXX:20002/caldav.php/ton/
I tried to make a calender sensor by putting this in my configuration.yaml :
sensor:
- platform: hasscalendar
calName: ton
Nothing to do with ssl. Itās a flaw in my code, async await javascript is difficult
Itās non fatal because on the second fetch run the data will be there. Will try to fix this in an update still, but it isnāt critical.