MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-CalDAV

    Scheduled Pinned Locked Moved Productivity
    97 Posts 10 Posters 40.3k Views 9 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sdetweil @caw
      last edited by sdetweil

      @caw said in MMM-CalDAV:

      @sdetweil i dont have a dot in front of the Prefix

      module :“MMM-CalDAV”,
      config: {
      servers: [
      {
      envPrefix: “SYNOLOGY_”,

      2024/09/06 01:23:15 stderr path: ‘/opt/magic_mirror/modules/MMM-CalDAV/service/.SYNOLOGY_Simon.ics’
      2024/09/06 01:23:15 stderr syscall: ‘open’,
      2024/09/06 01:23:15 stderr code: ‘EACCES’,
      2024/09/06 01:23:15 stderr errno: -13,
      2024/09/06 01:23:15 stderr at async saveIcs (/opt/magic_mirror/modules/MMM-CalDAV/node_helper.js:76:7) {
      2024/09/06 01:23:15 stderr at async Object.writeFile (node:internal/fs/promises:1212:14)
      2024/09/06 01:23:15 stderr at async open (node:internal/fs/promises:639:25)
      2024/09/06 01:23:15 stderr [2024-09-06 01:23:15.709] [ERROR] Error: EACCES: permission denied, open ‘/opt/magic_mirror/modules/MMM-CalDAV/service/.SYNOLOGY_Simon.ics’
      2024/09/06 01:23:15 stderr [2024-09-06 01:23:15.707] [ERROR] Whoops! There was an uncaught exception…

      i dont know what caldav wants in its setup,
      sorry. you’ll have to wait for @MMRIZE to help

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • M Offline
        MMRIZE @caw
        last edited by

        @caw

        [ERROR] Error: EACCES: permission denied, open ‘/opt/magic_mirror/modules/MMM-CalDAV/service/.SYNOLOGY_Simon.ics’

        I’m not familiar with the Docker setting. Anyway, it seems to be a permission issue. The docker container creation and execution might be performed by different accounts. Or you may need proper permission for those files or directories. However, I have no idea of Docker environment, so that’s all I can say.

        1 Reply Last reply Reply Quote 0
        • karsten13K Offline
          karsten13 @caw
          last edited by

          @caw

          [ERROR] Error: EACCES: permission denied, open ‘/opt/magic_mirror/modules/MMM-CalDAV/service/.SYNOLOGY_Simon.ics’

          how did you start the container? Please provide full docker run ... command or compose file.

          C 1 Reply Last reply Reply Quote 0
          • D Offline
            danny607
            last edited by

            Hello, I am new and wondering what do you name the file env.example to? Second What lines need to be added to the /config/config.js file?
            Thanks

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @danny607
              last edited by

              @danny607 the env file name is typically
              .env

              note the leading dot

              the linux file systems do not have a flag for hidden, so by convention anything with a leading . (dot) will not be shown in file lists unless explicitly requested

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @sdetweil
                last edited by sdetweil

                @caw

                so looking at the code, this module will write out the constructed ICAL format data to

                  const filePath = path.resolve(__dirname, 'service', '.' + fileName)
                

                notice the dot… in linux =by convention, file/folder names that start with dot are not shown unless explicitly requested… (making them hidden ‘most’ of the time

                SO, the code above is trying to USE a directory ‘service’ (part of this module repo)
                in THIS module folder… but write to it…

                @karsten13 is the docker volume for where modules are located mapped read/write?? (the compose file doesn’t say)

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                karsten13K 1 Reply Last reply Reply Quote 0
                • karsten13K Offline
                  karsten13 @sdetweil
                  last edited by

                  @sdetweil said in MMM-CalDAV:

                  @karsten13 is the docker volume for where modules are located mapped read/write?? (the compose file doesn’t say)

                  see docs

                  rw: Read and write access. This is the default if none is specified.

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @karsten13
                    last edited by sdetweil

                    @karsten13 thats what I thought

                    @caw can you ssh logon to your synology and execute a docker command

                    docker inspect  magicmirror 
                    

                    scroll up to look at the mounts section
                    (this is from a different container, as I don’t have one running MM)

                    Mounts": [
                                {
                                    "Type": "volume",
                                    "Name":  
                    "94f89b1076c681a8dd32a7863d7a867e2077849f0fc53091062aae3797433919",
                                    "Source": "/var/lib/docker/volumes/94f89b1076c681a8dd32a7863d7a867e2077849f0fc53091062aae3797433919/_data",
                                    "Destination": "/config",    <---- check for /opt/magic_mirror/modules
                                    "Driver": "local",
                                    "Mode": "",
                                    "RW": true,    <------------    check this , should be true
                                    "Propagation": ""
                                },
                    

                    also, how (from where, as what userid?) did you git clone the module, and npm install?

                    another docker command

                    docker exec magicmirror ls /opt/magic_mirror/modules -laF

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 1
                    • C Offline
                      caw @karsten13
                      last edited by

                      @karsten13

                      i used:

                      docker run -d --user root --name magicmirror
                      -p 8036:8080
                      -v /volume1/docker/magicmirror/config:/opt/magic_mirror/config
                      -v /volume1/docker/magicmirror/modules:/opt/magic_mirror/modules
                      -v /volume1/docker/magicmirror/customcss:/opt/magic_mirror/customcss
                      -e TZ=Europe/Berlin
                      –restart always
                      registry.gitlab.com/khassel/magicmirror

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @caw
                        last edited by

                        @caw from synology ssh terminal window do

                        ls /volume1/docker/magicmirror -laF
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        C 1 Reply Last reply Reply Quote 0
                        • C Offline
                          caw @sdetweil
                          last edited by

                          @sdetweil mm1.PNG

                          thats the result

                          and

                          mm.PNG

                          are the mounts section

                          S 1 Reply Last reply Reply Quote 0
                          • S Offline
                            sdetweil @caw
                            last edited by sdetweil

                            @caw ok now need to look inside modules

                            ls -laF /volume1/magicmirror/modules
                            and in the module folder
                            ls -laF /volume1/magicmirror/modules/MMM-CalDAV

                            we did not check INSIDE the MMM-CalDAV/service folder to see if there is an existing file that might be overwritten (with the wrong permissions)

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            C 1 Reply Last reply Reply Quote 0
                            • C Offline
                              caw @sdetweil
                              last edited by

                              @sdetweil mm2.PNG mm3.PNG

                              it´s in the /volume1/docker/magicmirror/modules

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @caw
                                last edited by sdetweil

                                @caw ok, the docker container is running as user/group 1000/1000

                                so Simon and users is neither of those

                                and linux permissions are a set of values, 3 flags per

                                user – this user number/name (Simon)
                                group --if the user is part of the named group (users)
                                other – permissions for any user NOT in the two choices above

                                the permissions shown

                                user = rwx // user can read( r) write(w) and execute(x)
                                group = r-x // group can read( r) and execute(x)
                                other = r-x // all others can read ( r) and execute(x)

                                or 755

                                if you fix the permissions to 757
                                user rwx
                                group r-x
                                other rwx

                                or 775 (probably better, not allow ‘any’ other…)
                                user rwx
                                group rwx
                                other r-x

                                then other (1000) will be allowed to write to the folder (service folder)

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                C 1 Reply Last reply Reply Quote 0
                                • C Offline
                                  caw @sdetweil
                                  last edited by

                                  @sdetweil

                                  so the permission error is gone but the *ics is still not saved
                                  LOG attachedmm4.PNG

                                  S M 2 Replies Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @caw
                                    last edited by

                                    @caw can you show all the calDAV messages…

                                    last says fetching
                                    but the prior says not found…

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      MMRIZE @caw
                                      last edited by MMRIZE

                                      @caw
                                      I cannot say anything without the full log. But at the first execution, ics would not be written yet, (calendar module is so fast than CalDAV’s connection and parsing) so just wait for the next cycle to finish serving, or just stop and rerun MM. From the second execution, ics will be served.
                                      bf4de281-b9a7-4467-88bb-7c60effdc079-image.png

                                      C 1 Reply Last reply Reply Quote 0
                                      • C Offline
                                        caw @MMRIZE
                                        last edited by

                                        @MMRIZE
                                        hi i´ve got it- it was the firewall blocking and the ics files are created and a test is shown

                                        THANK YOU VERY MUCH!!! :)
                                        maybe you can add the workaround for a tutorial for any Synology User :)

                                        S 1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          sdetweil @caw
                                          last edited by

                                          @caw add the workaround?

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          C 1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            caw @sdetweil
                                            last edited by

                                            @sdetweil i think some of the Synology users have the same issue with permissions an their nas

                                            S 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 4 / 5
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy