Recently one of our new CoopBoss owners emailed me asking why his CoopBoss wasn't closing the door when he turned off the light to the room he was testing it in. He was following the product manual and going through the setup procedure. He had his actuator attached and everything was working as expected. He could close and open the door with the SmartApp, see that the light sensor was reading a light value and everything looked fine. So as an extra step he decided to test the auto close feature. He made sure auto close was enabled in the SmartApp (door closing icon was green) and turned the light off in the room. After a few moments the light value jumped to a low enough value to trigger a close but the door did not close nothing happened. Before he took the time to install it in his coop he wanted to make sure it was working so he sent me an eMail to see what the heck was going on.
Well everything was fine and the door did auto closed for him later in the evening. You have to wait two hours after tuning off the light for the CoopBoss to auto close the door after a reboot. Keep reading if you want to know why.
Explanation: The CoopBoss has a fairly complex algorithm that uses the light level over a period of time to help it figure out what mode it should be in. When the CoopBoss is powered up it has to figure out if it should be in day mode or night mode. To give it time to make that decision it won’t do an auto close or open for two hours after a reboot. This gives the CoopBoss enough time to observe the sun and set the proper mode. Why is this so complex you ask? Heck if it is light out it is day mode if it is dark it is night mode right. Well I wish it was that simple. Without this delay the CoopBoss may incorrectly open the door in the evening if the power cycles just at the right time during sunset. Yea I know that sounds like an unlikely situation but in the Midwest it happens more than you think. Since we are this deep in the theory of operation I might as well explain the other set of times in the algorithm. The CoopBoss has another set of timers that kick in to prevent the doors from closing or opening prematurely. Say its afternoon a couple of hours before your chickens go in for the night and a bad storm blows in with thick black clouds making the light level go below the close light threshed. To prevent a premature close in this situation another timer is used to make sure roughly 24 hours has passed since the last time the door was closed. A similar timer is used to keep the door from opening at night. After all you don't want the door to open just because of a passing car's headlights or you turn on a light in your backyard to check on things.
This algorithm allowed us to design the CoopBoss without an internal clock. That was one of the original design requirements. If we based the auto open and close on time, then we would have to make sure the clock is always set correctly and have to keep track of when the sunsets at your location. We wanted to make sure the CoopBoss was as independent as possible, so it wouldn’t have to rely on the internet once it was configured and up and running. Since we don’t have to rely on batteries to keep a timing circuit running we don’t have any batteries inside the CoopBoss. That is a big deal as the CoopBoss is used in extreme temperatures that batteries would not be able to survive.
There you have it, probably way more than you every wanted to know about how the CoopBoss figures out what to do next.
