Astronomical Data API



i stumbled upon this page and found it interesting and would like to use the piston.

i was able to import without issue.

my problem is manually creating the global variables, say for @astronomical_twilight_begin for example. When i create the variable name “@astronomical_twilight_begin”, which I set with the ‘date & time’ data type. I am not sure what the value should be? Is it an expression? If so, is that the one defined on line 48 in the piston? Or is the value a date and time I manually set?


edit: issue resolved by leaving the value blank once the date and time variable has been created with a name for the variable itself.


Sorry for the delay, I was AFK for a few days.

Glad you got it sorted. Yes, just create the variable as “Date and Time” and set the value to “Nothing selected.”


Hello, I am seeing a problem with this piston after updating Webcore recently.

When the piston is executed I a seeing a ‘status 500’ error:

Anyone else experience this problem? And what the fix is? It’s actually impacting my routines that are location based and on time of day.

Here’s what the piston looks like:



This is external to WebCoRE and the piston. It looks like the SSL certificate at sunrise-sunset has expired:

This has happened once in the past that I can remember. I’ll bet your noticing was just coincident with the WebCoRE update since it happened less than a week ago.

There’s a simple fix. Just change the API string from HTTPS to HTTP:



There’s really no need for SSL, it’s just a best practice. Moving back to HTTP will make the piston work again and bypass the need for a valid SSL cert.


Thank you for your response.

I will give it a try.