Astronomical Data API

time
variables
light
triggers

#21

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?

thanks

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


#22

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.”


#23

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:

Thanks


#24

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:

Current:

https://api.sunrise-sunset.org/json?lat={$latitude}&lng={$longitude}&formatted=0

Fix:

http://api.sunrise-sunset.org/json?lat={$latitude}&lng={$longitude}&formatted=0

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.


#25

Thank you for your response.

I will give it a try.