Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

It's very useful if your Raspberry can trigger events based on time and sunset and sunrise. That's why I did some investigations on this and finaly found two APIs in the internet which allowed me to write a Python script to calculate these values very fast. gneadr found another interesting variant which I modified a bit.

 

 

The location calculated is the place where the internetprovider offers the IP address to the client and which can be far away from the actual client location. In my case it's approx 30 km.

 
Add comment

*** Note ***

Comments are welcome. But in order to reject spam posts please consider following rules:
  1. Comments with string http are rejected with message You have no rights to use this tag
  2. All comments are reviewed by hand and thus it usually takes one day until a comment will be published.