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.

    calendar module: "displayRepeatingCountTitle" doesn't show peoples age

    Scheduled Pinned Locked Moved Bug Hunt
    5 Posts 2 Posters 450 Views 2 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.
    • T Offline
      thefoster
      last edited by thefoster

      I think this is a bug, but not 100% sure.
      According to the documentation, I expected setting “displayRepeatingCountTitle: true,” would enable the display of peoples’ age in calendar module, but this doesn’t even work when setting it as default (which worked for “maximumEntries”)

      Platform: ARM7 (Raspberry Pi 3+)
      Node Version: node@c46f41368c36:/opt/magic_mirror$ node -v
      v14.16.1
      MagicMirror Version: (nopackage.log in this installation)
      2021-04-13_2021-03-04-magicmirroros-buster-armhf-lite-0.2.0

      Description: the configured ics urls link to ics data with valid birthday entries and they are not being displayed on MM’s calendar module, but not their current age as intended by “displayRepeatingCountTitle” (as far as i understood).

      Steps to Reproduce: base config in “~/magicmirror/mounts/config/config.js”, entry in calendar section (tried module- config- and calendar-context)
      && “docker container restart mm” -> people and the birthday are displayed, but not their age.
      Like with the (in this installation) not-working “maximumEntries”, i chose to config this in the default values within the docker container:
      “docker exec -it mm /bin/bash” (login to mm container)
      node@c46f41368c36:/opt/magic_mirror$ nano mount_ori/modules/default/calendar/calendar.js
      Expected Results: As shown in several screenshots, there should be the age of the people shown after or before their name.
      Actual Results: Just name and date are displayed.
      Configuration: ~/magicmirror/mounts/config/config.js is attached
      Additional Notes: At least for the calendar module, url’s pointing to localhost:8080 for local ics files don’t work, i had to setup a small (radicale) server and chose the ip address, althought port 8080 is active in this container.
      docker ps -a
      CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
      381f368fe3fd tomsquest/docker-radicale “docker-entrypoint.s…” 5 hours ago Up 4 hours (healthy) 0.0.0.0:5232->5232/tcp radicale-net
      c46f41368c36 karsten13/magicmirror:latest “/usr/bin/tini – ./…” 3 days ago Up 42 minutes 8080/tcp mm

      2021-04-13_2021-03-04-magicmirroros-buster-armhf-lite-0.2.0
      edit: there’s “upload file” and “upload image”, while both do accept only images :-S …

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw https://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information on how you can configure this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var config = {
              address: "0.0.0.0",     // Address to listen on, can be:
                                                              // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                                                              // - another specific IPv4/6 to listen on a specific interface
                                                              // - "0.0.0.0", "::" to listen on any interface
                                                              // Default, when address config is left out or empty, is "localhost"
              port: 8080,
              basePath: "/",  // The URL path where MagicMirror is hosted. If you are using a Reverse proxy
                                              // you must set the sub path here. basePath must end with a /
              ipWhitelist: [],        // Set [] to allow all IP addresses
                                                                                                                              // or add a specific IPv4 of 192.168.1.5 :
                                                                                                                              // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                                                                                                                              // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                                                                                                                              // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
      
              useHttps: false,                // Support HTTPS or not, default "false" will use HTTP
              httpsPrivateKey: "",    // HTTPS private key path, only require when useHttps is true
              httpsCertificate: "",   // HTTPS Certificate path, only require when useHttps is true
      
              language: "de",
              locale: "de-DE",
              logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
              timeFormat: 24,
              units: "metric",
              // serverOnly:  true/false/"local" ,
              // local for armv6l processors, default
              //   starts serveronly and then starts chrome browser
              // false, default for all NON-armv6l devices
              // true, force serveronly mode, because you want to.. no UI on this device
      
              modules: [
                      {
                              module: "alert",
                      },
                      {
                              module: "updatenotification",
                              position: "top_bar"
                      },
                      {
                              module: "clock",
                              position: "top_left"
                      },
                      {
                              module: "calendar",
                      //      header: "Feiertage",
                              position: "top_left",
                      //      maximumNumberOfDays: "60",
                      //      maximumEntries: "60",
                      //      fadePoint: "0.75",
                              config: {
                                      displayRepeatingCountTitle: true,
                                      calendars: [
                                              {
                                                      symbol: "birthday-cake",
                                                      url: "http://192.168.100.243:5232/nf/62eb4074-d257-bc8a-08e8-fdb88236dddc/",
                                              },
                                      ]
                              },
                      },
                      {
                              module: "compliments",
                              position: "lower_third",
                      },
                      {
                              module: "weather",
                              position: "top_right",
                              config: {
                                      weatherProvider: "openweathermap",
                                      type: "current",
                                      location: "Braunschweig",
                                      locationID: "2945024", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                                      apiKey: "pizgwecjnpnfjhwpiuchpjf3rtgt3rv"
                              }
                      },
                      {
                              module: "weather",
                              position: "top_right",
                              header: "Weather Forecast",
                              config: {
                                      weatherProvider: "openweathermap",
                                      type: "forecast",
                                      location: "Braunschweig",
                                      locationID: "2945024", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                                      apiKey: "pizgwecjnpnfjhwpiuchpjf3rtgt3rv",
                                      fade: false,
                                      colored: true
                              }
                      },
                      {
                              module: "MMM-Mopidy-MPD",
                              position: "top_right",  // This can be any of the regions.
                              config: {
                                      // See 'Configuration options' for more information.
                                      hostname: "vox",
                                      port: 6600
      
                              }
                      },
                      {
                              module: "newsfeed",
                              position: "top_center",
                              config: {
                                      feeds: [
                                              {
                                                      title: "BS Bekanntmachungen",
                                                      url: "https://www.braunschweig.de/rss/bekanntmachungen.php?sp%3Aout=rss"
                                              },
                                              {
                                                      title: "BS Veranstaltungen",
                                                      url: "https://www.braunschweig.de/rss/blickpunkte.php?sp%3Aout=rss"
                                              },
                                              {
                                                      title: "FAZ",
                                                      url: "https://www.faz.net/rss/aktuell/"
                                              },
                                      ],
                                      showSourceTitle: true,
                                      showPublishDate: true,
                                      broadcastNewsFeeds: true,
                                      broadcastNewsUpdates: true,
                                      updateInterval: 15000
                              }
                      },
              ]
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @thefoster
        last edited by

        @thefoster said in calendar module: "displayRepeatingCountTitle" doesn't show peoples age:

        displayRepeatingCountTitle

        thanks… had never heard of this option before

        the CODE says

        get the value of the property “repeatingCountTitle” from the block of config for this calendar url

           displayRepeatingCountTitle: true,
           calendars: [
               {
                   repeatingCountTitle: "   years",
                   symbol: "birthday-cake",
                   url: "http://192.168.100.243:5232/nf/62eb4074-d257-bc8a-08e8-fdb88236dddc/",
               },
           ]
        

        and IF that string is NOT “” (the default) AND the event has a ‘firstYear’ attribute,
        THEN calculate and prepend the number to the string you provided…

        as for MM loading cal from local file, it will but, the web server starts at MagicMirror, so the files have to be further down the tree… typically we use the module folder

        http://localhost:8080/modules/default/calendar/????.ics
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil said in calendar module: "displayRepeatingCountTitle" doesn't show peoples age:

          @thefoster said in calendar module: "displayRepeatingCountTitle" doesn't show peoples age:

          displayRepeatingCountTitle

          thanks… had never heard of this option before

          the CODE says

          get the value of the property “repeatingCountTitle” from the block of config for this calendar url

             displayRepeatingCountTitle: true,
             calendars: [
                 {
                     repeatingCountTitle: "   years",
                     symbol: "birthday-cake",
                     url: "http://192.168.100.243:5232/nf/62eb4074-d257-bc8a-08e8-fdb88236dddc/",
                 },
             ]
          

          I don’t need the string “years” and set “displayRepeatingCountTitle: true,” like this (tried setting this in calendars and module as well).
          Or is a string “needed” to display the number?

          1and IF that string is NOT “” (the default) AND the event has a ‘firstYear’ attribute,
          THEN calculate and prepend the number to the string you provided…

          Uh, really?
          My ics does not contain that (‘firstYear’) attribute, just the common DTSTART (equals birthday date),DTEND ,RRULE etc., which is enough for my other software (e.g. KDE kontact) to calculate and display the contacts ages in the calendar.
          This is how all entries in the ics file look like:

          BEGIN:VEVENT
          DTSTAMP:20210511T194132Z
          X-KDE-KABC-BIRTHDAY:YES
          X-KDE-KABC-EMAIL-1:ttest@gmx.de
          X-KDE-KABC-NAME-1:Terry Test
          X-KDE-KABC-UID-1:3af4c44b-2086-489a-96a4-859e1fe1cdc1
          CREATED:20201018T170728Z
          UID:3af4c44b-2086-489a-96a4-859e1fe1cdc1_KABC_Birthday
          LAST-MODIFIED:20210511T194132Z
          SUMMARY:Terry Test
          CATEGORIES:Geburtstag
          RRULE:FREQ=YEARLY
          DTSTART;VALUE=DATE:19720706
          DTEND;VALUE=DATE:19720707
          TRANSP:TRANSPARENT
          END:VEVENT
          

          as for MM loading cal from local file, it will but, the web server starts at MagicMirror, so the files have to be further down the tree… typically we use the module folder

          http://localhost:8080/modules/default/calendar/????.ics
          

          I tried copying to/referencing from modules folder …
          Maybe i try that later to omit the extra server (although a caldav/carddav server is nice anyway)

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

            @thefoster I’m just repeating what the code is expecting… I added the ’ years’ just to demonstrate a string as required.

            I don’t know where the firstYear comes from… event is a manipulated object after parsing not just the text as shown in the ics. this is yearly repeating events only, so maybe firstYear comes from the start of the repeating event (but if u make it oh, since feb of this year then the count will be wrong for anyone born before then …)

            but, if you don’t supply a template for the title string, you get nothing

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil said in calendar module: "displayRepeatingCountTitle" doesn't show peoples age:

              @thefoster I’m just repeating what the code is expecting… I added the ’ years’ just to demonstrate a string as required.

              i didn’t get that requirement from the documentation

              I don’t know where the firstYear comes from… event is a manipulated object after parsing not just the text as shown in the ics. this is yearly repeating events only, so maybe firstYear comes from the start of the repeating event (but if u make it oh, since feb of this year then the count will be wrong for anyone born before then …)

              but, if you don’t supply a template for the title string, you get nothing

              Thanks, indeed even the string " " (one blank) makes the year appear, without the need for “firstYear” in ICS.
              I think now i can switch to finish the MM hardware :)
              Again trhanks for the fast reply and solution :-D

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              • 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