Still works for me.  Do you have your lat, long, and tz properly set?


On Thu, Aug 7, 2014 at 6:47 PM, Rick Reed <rickerdo@savantex.net> wrote:
I've been running MH for a few years now. During this time, I've had a snippet of code that made use of the $Dark global variable. Since upgrading to v3.1, the code using $Dark no longer executes. 

My code snippet:

# Garage door opened
if ($Dark and ($RearGarageOverheadDoor->{state_now} eq OPEN or $FrontGarageOverheadDoor->{state_now} eq OPEN)) {
   print_log "[lighting_events] Turning car port lights: ON";
   $Car_Port_Lights->set(ON);
}

Just as a test, I added the following snippet:

if ($New_Minute) {
   if ($Dark) {
      print_log "[lighting_events] It is dark";
   }
}

It's 25 minutes past sunset as I write this, yet no log entries from the test snippet have been generated. It seems as if $Dark is no longer being updated. Any ideas?

Thanks,
Rick

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users