Open linuxlurak opened 4 years ago
Using some of the info found here https://github.com/sabre-io/Baikal/issues/695
Adding the debugging statement to the thrown error in MimeDir.php and did indeed get my designated timezone printed out. Apparently the timezone is being sent instead of the string "BEGIN:VCARD" or "BEGIN:VCALENDAR". I assume this is some old broken behavior in setting up the calendar, sending the TZ instead of the BEGIN statement.
I put a print statement in the python3.8/site-packages/caldav/objects.py just above line 167 and the following XML is triggering this issue:
`<?xml version='1.0' encoding='utf-8'?>
@linuxlurak see my "fix" at the end of https://github.com/sabre-io/dav/issues/1318
This is possibly something that should be fixed in the python caldav library?
The problem still exists in HA 2024.3.2.
So it appears that the python caldav request issued by homeassistant are using an iCal namespace
Oh. I've been wondering a bit about that. The link to Apple has been broken probably for a decade, and the namespace seems not to be documented anywhere - but quite some calendars supports the calendar-color
and calendar-order
attributes that apparently belongs to this namespace.
There is a comment in caldav.lib.namespace
indicating that it should not be sent in requests where it's not needed. I'll try to investigate it, possibly later today.
The git commit message reads: Ref https://github.com/python-caldav/caldav/issues/98 - only send the invalid namespace URL http://apple.com/ns/ical
if this namespace is actually used.
This is probably not related to the passing of the invalid namespace anyway. If I understand it correctly, the incompability here is between homeassistant and baikal, and hence unrelated to "my" caldav library.
Not sure if this is caused by the same issue, but https://github.com/TheZoker had a similar issue in https://github.com/ckulka/baikal-docker/issues/219 and found a solution:
I fixed this error by mounting a patched Plugin.php file into the docker container, like:
... volumes:
- ./baikal/Plugin.php:/var/www/baikal/vendor/sabre/dav/lib/CalDAV/Plugin.php ...
The patched file can be found here: https://github.com/MrAlucardDante/baikal-docker-hass/blob/master/Plugin.php
You might not use Docker, but you could still update the Plugin.php
file and give it a try?
Not sure if this is caused by the same issue, but https://github.com/TheZoker had a similar issue in ckulka/baikal-docker#219 and found a solution:
I fixed this error by mounting a patched Plugin.php file into the docker container, like: ... volumes:
- ./baikal/Plugin.php:/var/www/baikal/vendor/sabre/dav/lib/CalDAV/Plugin.php ... The patched file can be found here: https://github.com/MrAlucardDante/baikal-docker-hass/blob/master/Plugin.php
You might not use Docker, but you could still update the
Plugin.php
file and give it a try?
This worked for me, HASS can now see my calendar. Thank you!
The problem
I can't get my calendar running in home assistant... Works perfect in Thunderbird but not in home assistant.
Environment
Home Assistant Version: 0.115.6 Ubuntu Server 20.04 Linux homeautomation 5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux baikal v. 0.7.1
Problem-relevant configs:
This is my config: part of configuration.yaml:
apache config:
baikal config /var/www/html/baikal/config/baikal.yaml:
Traceback/Error logs
As stated thunderbird works fine, home assistant tells me:
and apache2 error and access log tells me this:
==> /var/log/apache2/error.log <==
and after this:
First apache gives me a 401 (unauthorized), and later a internal server error 500... baikal seems to work just fine with thunderbird, but not with home assistant...
Additional information
Community Topic: https://community.home-assistant.io/t/correct-config-for-calendar-component-caldac-baikal-apache2/232055 homeassistant core issue: https://github.com/home-assistant/core/issues/41222