Your app depends upon knowing the current time - what happens if that time isn't known

You make a good point. I've not tried it, but I guess that the clock would initialise to sometime in the past (1st January 1970 perhaps) when the system boots until it is able to get the time from the internet. The plan is to not make any changes to the state of the curtains if the system time is before sometime in the past - probably 1st December 2020 to remind me when all this weird activity happened 😜

Once it knows the time, and knows it knows the time, it can go to work determining what state the curtains need to be in and putting them that way. There will be some 'fiddling' needed with the setup to get everything fine tuned as I cannot develop the system with a set of powered curtains to test it.

I have a Raspberry Pi. I am just starting to play with it - so I am a Pi newbie

Good luck!
It is proving to be an interesting and, at times frustrating process. Using an RPi Zero is frustrating at times as it is rather slow. Perflectly capable for the task it is to perform but very slow to set up and develop.


In reply to Re^2: Continuous or timed? by Bod
in thread Continuous or timed? by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.