MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Default-Calendar and MMM-Calendar-Ext2 with CalDAV from NextCloud?



  • Hello Forum,

    i did my first initial Setup of MM2 a few days before, and got it all running very fast.
    Thanks a lot for the much work, MM2-Creators and Community. Youre top!

    But with one synch i do have my complications, and i hope some of you have a idea how to deal with this.

    I tried the original Calendar-Module and the MMM-Calendar-EXT2, but both of them do have his problems getting the NextCloud (=owncloud) caldav Calendar.
    Two other calendars i have successfully bound to MM2 works fine, but my own “nextcloud”-Calendar not.

    Lets describe what i had done:
    The configuration looks like this:

    {
        symbol: "calendar",
        url: "https://nc.[url].de/remote.php/dav/calendars/[user]/personal/",
        auth: {
            user: '[user]',
            pass: '[password]',
            method: 'basic'
        }
    },
    

    [2020-07-08 14:08:09.526] [LOG] Create new calendar fetcher for url: https://nc.[url].de/remote.php/dav/calendars/[user]/personal/ - Interval: 300000
    [2020-07-08 14:13:08.958] [LOG] Use existing calendar fetcher for url: http://nc.[url].de/remote.php/dav/calendars/[user]/personal/
    [2020-07-08 14:13:08.960] [INFO] Calendar-Fetcher: Broadcasting 0 events.

    This is impossible, there are items in this Calendar. So i tried MMM-Calendar-Ext2

    [2020-07-08 12:34:58.860] [LOG] Create new calendar fetcher for url: https://nc.[url].de/remote.php/dav/calendars/[user]/personal/ - Interval: 300000
    [2020-07-08 12:34:59.192] [INFO] Checking git for module: MMM-CalendarExt2
    [2020-07-08 12:34:59.250] [LOG] [CALEXT2] calendar:0 >> Scanning start with interval:1800000
    [2020-07-08 12:35:00.182] [LOG] [CALEXT2] calendar:0 >> invalid line (no token “;” or “:”) “”
    [2020-07-08 12:35:00.271] [INFO] Calendar-Fetcher: Broadcasting 0 events.

    So I am going around checking the forum and playing a while with cURL to check what is going on. It seems the NextClound|OwnCloud do something else which is not just ical, it is caldav with every schedule in one separated ical-File. So the XML i got is a summarize of a “directory” showing the ical-“Files” for this calendar:

    pi@magicmirror01:~# curl -i -X PROPFIND https://[user]:[password]@nc.[url].de/remote.php/dav/calendars/[user]/personal/ --upload-file - -H "Depth: 1" <
    
    
    
    end
    
    HTTP/1.1 100 Continue
    
    HTTP/1.1 207 Multi-Status
    Date: Wed, 08 Jul 2020 10:23:53 GMT
    [some standard http header]
    DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendar-auto-schedule, calendar-availability, nc-calendar-webcal-cache, calendarserver-subscribed, oc-resource-sharing, oc-calendar-publishing, calendarserver-sharing, nc-calendar-search, nc-enable-birthday-calendar
    Transfer-Encoding: chunked
    Content-Type: application/xml; charset=utf-8
    
    
    /remote.php/dav/calendars/[user]/personal/HTTP/1.1 200 OK/remote.php/dav/calendars/[user]/personal/031acb15-cd36-42a2-a7c2-63f8bf270594.icsHTTP/1.1 200 OK/remote.php/dav/calendars/[user]/personal/049056e8-8c5f-425d-9c65-236a7069af49.ics ......
    
    

    Dear Team, do you see any possibility to parse these XML, get the found ics files and publish this as calendar-Items to the MM2-Calendar-System?

    Thanks a lot!
    Stefan



  • This post is deleted!


  • It seems XML is a bit tricky in this Forum. I am on it to make it visible to you…



  • @do1mps
    the calendar reader expects ics format. others have been able to download ics file ( into module folder) and point config to the downloaded file


Log in to reply