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.

    Store data that's accessible after restart of MM²

    Scheduled Pinned Locked Moved Solved Development
    7 Posts 3 Posters 1.1k Views 3 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.
    • B Offline
      Blauenfeldt
      last edited by

      I don’t know much about programming, but I guess you can store the time in a text file each second or minute, and then read the file at startup, and then continue from there

      1 Reply Last reply Reply Quote 0
      • C-sonC Offline
        C-son Module Developer
        last edited by C-son

        That’s my thought as well, the thing is I’m not sure how to do it. Not to store the time each second tho, that will destroy my SD card. But save the start time when I get home, and set the time to 0 when I leave home. And if I need to reboot I will check for the start time value I’ve saved, and if its’ more that 0 I will continue the timer from that starting point.

        My question is if there’s a recommended way to store this data, and how should I do it?

        MMM-MagicMover :: MMM-MagicSuperHero :: MMM-MagicHexClock

        1 Reply Last reply Reply Quote 0
        • B Offline
          Blauenfeldt
          last edited by

          I took a look at the web, and found this: https://unix.stackexchange.com/questions/43854/save-entire-process-for-continuation-after-reboot
          I don’t know if it is entirely helpful for you.

          1 Reply Last reply Reply Quote 0
          • C-sonC Offline
            C-son Module Developer
            last edited by

            Thanks @Blauenfeldt, but that’s not what I’m looking for. Thanks anyway. :)

            MMM-MagicMover :: MMM-MagicSuperHero :: MMM-MagicHexClock

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

              @C-son there is nothing built-in that does what you want

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              C-sonC 1 Reply Last reply Reply Quote 0
              • C-sonC Offline
                C-son Module Developer @sdetweil
                last edited by

                @sdetweil ok, thanks. I’m trying to solve this by save the timestamp in a file with fs :)

                MMM-MagicMover :: MMM-MagicSuperHero :: MMM-MagicHexClock

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