This is a small daemon snippet for using RaspberryPi gpio as a pushbutton for a remote control system that turns lights on and off based on time of day.
Right now the system just checks if the sun has gone down and pushes the button accordingly and shuts the lights down at about 23:30.
Snippet is under public domain, daemon class sources are cited on the code.