Added the Sunrise / Sunset protocol and fixed bug in config lib.