› Alarm Engine Support Forum › Dark outside › Reply To: Dark outside
Correct. When you set the time and date in the system settings of the control panel, you are also setting the specific longitude and latitude. We use this information, along with GMT time, to calculate sunrise and sunset. This allows the control panel to determine if it is dark outside or when the sun rises and sets. Use data similar to what’s provided on this website to calculate it:
Sunrise and Sunset for Hickory, NC.
As long as the control panel is set to the correct location, it can accurately tell when it is dark outside.
This is useful for lighting or safety-related rules. For example:
WHENEVER any area ARM STATUS IS DISARMED by any user
IF IT IS DARK OUTSIDE
THEN TURN ON the garage lights FOR 500 SECONDS.
I want to note that we are currently working on a bug related to the “Before Sunrise / After Sunrise” and “Before Sunset / After Sunset” rules. Originally, the configuration required entering a negative value to activate the rule before sunrise or sunset. However, we have since removed the ability to input negative values, as it was causing issues. As a result, the “before” part of this rule is not functioning at the moment, while the “after” part works as intended.
We will be updating the editor to separate these into two distinct rules for clarity. It will display as “Minutes before Sunrise” and “Minutes after Sunrise.” You will always enter a positive value, allowing the system to handle it properly. The same update will apply to the Sunset rule.