Shortly after enduring immense pain in getting the 4-in-1 sensor going, as explained in the story of home automation with openHAB, Z-Wave, and MQTT the sensor's batteries ran dry. I uttered a stream of unprintables and decided that I needed a more reliable method of finding out when sunrise and sunset are.
I settled on forecast.io, wrote up a little program which queries that a couple of times a day and publishes the values via MQTT on my broker which is bridged to another Mosquitto broker which runs on the little openHAB box.
home/weather/today/sunsetTime 1425748577 home/weather/today/sunsetTime-iso 2015-03-07T18:16:17 home/weather/today/sunsetTime-hhmm 18:16
A rule fires at sunset minus a bit, and we rejoiced. (I in particular because the WAF returned to 100.)
For a few days now I've been getting heat because the lights came on late afternoon while it was still very light outside. I patiently explained that it's due to the "official" sunset time for our city, but when the lights switched on again today at 16:15 I thought I'd better investigate.
So I did. To cut a rather long story short, everything would have worked if the disk of our openHAB box hadn't filled up to 100% with log files... Who said
#monitoringsucks? They were right.
Once cleaned up, all started working again.
Now I have to go and explain to the management that the "official" sunset time isn't actually 16:15 after all...