<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Store data that&#x27;s accessible after restart of MM²]]></title><description><![CDATA[<p dir="auto">Hi all!<br />
I have a Homey device with a MQTT Client who sends out a message that tells if I’m at home or not to my MM². It’s a message containing <code>1</code> if I’m home, and <code>0</code> if I’m away. If I receive a <code>1</code> I start a timer on my mirror telling me for how long I’ve been at home, I.E. <code>2h 34m 22s</code>. Pretty basic actually.<br />
Now here’s my issue. When I, for some reason, restart my MM², the counter is lost. Is there a way to save the data I’m using somehow? I’m thinking that I can save the start time somewhere, if I have one, and when the MM² starts up I will check for that and continue the timer. But where can I store that kind of data? I guess localStorage isn’t the way to go, or?</p>
]]></description><link>https://forum.magicmirror.builders/topic/13891/store-data-that-s-accessible-after-restart-of-mm</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 03:04:09 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/13891.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Oct 2020 08:32:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Store data that&#x27;s accessible after restart of MM² on Sun, 25 Oct 2020 15:07:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> ok, thanks. I’m trying to solve this by save the timestamp in a file with <code>fs</code> :)</p>
]]></description><link>https://forum.magicmirror.builders/post/83941</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83941</guid><dc:creator><![CDATA[C-son]]></dc:creator><pubDate>Sun, 25 Oct 2020 15:07:48 GMT</pubDate></item><item><title><![CDATA[Reply to Store data that&#x27;s accessible after restart of MM² on Sun, 25 Oct 2020 12:13:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/c-son" aria-label="Profile: C-son">@<bdi>C-son</bdi></a> there is nothing built-in that does what you want</p>
]]></description><link>https://forum.magicmirror.builders/post/83933</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83933</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 25 Oct 2020 12:13:26 GMT</pubDate></item><item><title><![CDATA[Reply to Store data that&#x27;s accessible after restart of MM² on Sun, 25 Oct 2020 12:08:09 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/blauenfeldt" aria-label="Profile: Blauenfeldt">@<bdi>Blauenfeldt</bdi></a>, but that’s not what I’m looking for. Thanks anyway. :)</p>
]]></description><link>https://forum.magicmirror.builders/post/83932</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83932</guid><dc:creator><![CDATA[C-son]]></dc:creator><pubDate>Sun, 25 Oct 2020 12:08:09 GMT</pubDate></item><item><title><![CDATA[Reply to Store data that&#x27;s accessible after restart of MM² on Sun, 25 Oct 2020 11:22:09 GMT]]></title><description><![CDATA[<p dir="auto">I took a look at the web, and found this: <a href="https://unix.stackexchange.com/questions/43854/save-entire-process-for-continuation-after-reboot" target="_blank" rel="noopener noreferrer nofollow ugc">https://unix.stackexchange.com/questions/43854/save-entire-process-for-continuation-after-reboot</a><br />
I don’t know if it is entirely helpful for you.</p>
]]></description><link>https://forum.magicmirror.builders/post/83930</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83930</guid><dc:creator><![CDATA[Blauenfeldt]]></dc:creator><pubDate>Sun, 25 Oct 2020 11:22:09 GMT</pubDate></item><item><title><![CDATA[Reply to Store data that&#x27;s accessible after restart of MM² on Sat, 24 Oct 2020 11:13:08 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">My question is if there’s a recommended way to store this data, and how should I do it?</p>
]]></description><link>https://forum.magicmirror.builders/post/83889</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83889</guid><dc:creator><![CDATA[C-son]]></dc:creator><pubDate>Sat, 24 Oct 2020 11:13:08 GMT</pubDate></item><item><title><![CDATA[Reply to Store data that&#x27;s accessible after restart of MM² on Fri, 23 Oct 2020 20:31:08 GMT]]></title><description><![CDATA[<p dir="auto">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</p>
]]></description><link>https://forum.magicmirror.builders/post/83846</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83846</guid><dc:creator><![CDATA[Blauenfeldt]]></dc:creator><pubDate>Fri, 23 Oct 2020 20:31:08 GMT</pubDate></item></channel></rss>