Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^4: Efficiency of indoor grow light timer

by stevieb (Abbot)
on Dec 12, 2017 at 00:11 UTC ( #1205314=note: print w/replies, xml ) Need Help??

in reply to Re^3: Efficiency of indoor grow light timer
in thread Efficiency of indoor grow light timer

So after a month of testing, the compare code most definitely breaks after the clock switches past midnight. I hacked and played, but to no avail. I have reverted back to my original idea of comparing DateTime objects, that I documented in Benchmark routines earlier in the thread. Although the modules that 1nickt suggested were good ideas, they did not provide what I needed in the specific manner in which I needed them.

So right now, I'm doing trials with this code starting at line 114 and ending at line 191. I have left the private functions immediately beneath the main method in this commit for clarity here. I've also made immortal the link by ensuring that the file is referenced to the commit itself.

In all my testing so far, it works exactly how I need. I have two RPis running this code, both set with different times and time zones (and different "light on" times along with different "light on hours" times). We'll see what happens.

  • Comment on Re^4: Efficiency of indoor grow light timer

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1205314]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2019-06-19 12:42 GMT
Find Nodes?
    Voting Booth?
    Is there a future for codeless software?

    Results (88 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!