• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
  1. Home
  2. jotha
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Offline
  • Profile
  • Following 0
  • Followers 0
  • Topics 1
  • Posts 2
  • Groups 0

jotha

@jotha

0
Reputation
273
Profile views
2
Posts
0
Followers
0
Following
Joined Jan 26, 2019, 1:05 PM
Last Online Nov 25, 2023, 7:31 PM
Location South Germany

jotha Unfollow Follow

Latest posts made by jotha

  • RE: Default module Calendar not updating

    Hi,

    thanks for your reply.
    This cache management header is only used for the local caching of any (wget) download. If you set the above header in the fetcher script it isn’t using any local caching mechanism and requests a fresh file download from the web server every time it’s triggered.
    I’ve to investigate a bit more also to the fact that I’m using a caching proxy server inside my LAN. On the RPi I disabled proxy usage for local addresses, but it seems maybe something isn’t working correctly here.
    The .ics file (calendar export from Lotus Domino client) has the same structure like other files (eg. from MS Outlook or Thunderbird). So, I guess this isn’t really a calendar file problem as more an OS related issue.
    If I download this file from the web server with ‘wget’ on my RPi, I’m getting the same file version every time I try to download even if it has changed or not. If I manipulate the HTTP-header which wget is using, the download is working as expected. (see http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html for example). Some about cache management can be found here: http://dev.mobify.com/blog/beginners-guide-to-http-cache-headers/

    Currently I’m at work, but I’ll try to figure it out today evening. I’ll update this post with my findings.

    Cheers,
    Jörg

    posted in Bug Hunt
    J
    jotha
    Feb 26, 2019, 10:15 AM
  • Default module Calendar not updating

    Hello,

    First I’d like to thank Michael and the great community for this project! Six weeks ago I started with my first MM project and now I spend (too much) of my time for this amazing mirror!

    Currently I’m struggling with a strange problem:

    I’m using the default calendar module to display some different calendar (.ics) files from my intranet. I started with a fresh test appointment in a blank .ics file which is displayed correctly. If I update the .ics with other appointments and upcomming events I can see only the first test appointment. It isn’t updating the display, neither the refresh timer nor a reboot of the RPi solve the problem. It is still showing the test appointment at the display.
    Now the most amazing issue: After I deleted the .ics file from my web server the test appointment is still appearing on the MM!?! Also after a reboot!

    I checked the .js files from my calendar installation as also from the repository and found the reason for this behavior. The ‘calendarfetcher.js’ is using a default header without cache management settings for the file download.

    ‘…/MagicMirror/modules/default/calendar/calendarfetcher.js’:
    Line29:

    var opts = {
                        headers: {
                               "User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/"  + global.version +  " (https://github.com/MichMich/MagicMirror/)"
                        },
                        gzip: true
    };
    
    

    should be changed to:

    var opts = {
                        headers: {
                               "User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/"  + global.version +  " (https://github.com/MichMich/MagicMirror/)",
                               "Cache-Control": "max-age=0, no-cache, no-store, must-revalidate",
                               "Pragma": "no-cache"
                        },
                        gzip: true
    };
    

    After I changed the fetcher script, the calendar module is displaying the correct entries and updates are displayed after the refresh interval (fetchInterval).
    I checked this issue on two different RPi’s with a fresh Rasbpian and MM installation. On all I observed the same issue.

    I’ve to start some other tests with cloud calendar files also, but it seems this should be changed at the MM repository for the next version.

    Is there anybody else outside with the same bahavior?

    Cheers,
    Jörg

    posted in Bug Hunt
    J
    jotha
    Feb 26, 2019, 9:04 AM
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