When & where is the next rocket launch worldwide?


#21

Adding an ‘or length(name)<1’ or similar will help with initiation. Then I set the every to ‘minute’, let it run once and then edit back to ‘hour’. Initialization complete!


#23

lol


#24

Maybe it’s a good thing…

I did rush this a bit at the end trying to get this out in time…


Edit:

I am curious as to how quickly the API updates at the source…


#25

I was just looking at this since I have an alert setup 2 minutes before so need to see about a refresh to cancel the last notification :slight_smile:

great work all around though!

edit-1, as of 4:24 EST currently its not updated yet

edit-2, at 4:31 EST it updated to next date

so @WCmore maybe we can add a refresh 1x minute prior to go time for a refresh?


#26

The piston is nearly out of room, and there is still a lot of things that I want to squeeze in there.

… but I will try during my next update


#27

Sounds good. I know this is going to sound silly, but let us know how we can help :laughing:


#28

What do you mean by out of room? what limits is it up against?


#29

If I remember correctly WCmore has a limit of 15x (?) blocks per piston just to make sure it runs well. Could be wrong about that.


#30

When saving a piston, I used to be able to save pistons as large as 22 or 23 “chunks”…

Lately, with about 450 pistons stored, I can usually save pistons up to 17 or 18 “chunks”…


#31

FYI, I started running my original next launch piston every minute for a while. You can see when they edited and updated the launch as there were a bunch of errors in the request.

5/27/2020, 1:38:29 PM +109ms
+0ms	╔Received event [Las Vegas].time = 1590611909958 with a delay of -850ms
+7873ms	║ Next launch is at 2020-05-30T19:22Z which is Sat, May 30 2020 @ 12:22:00 PM PDT
+7873ms	║ [in 2 days, 22 hours, 43 minutes, and 23 seconds].
+7899ms	║ Launch will be a Falcon 9 from pad LC-39A
+7899ms	║For the first time since the last flight of the Space Shuttle in 2011, U.S. astronauts will go to orbit from American soil. As part of NASA's Commercial Crew Program, SpaceX's Falcon 9 will launch the Crew Dragon spacecraft to the International Space Station.
+7923ms	║Setting up scheduled job for Wed, May 27 2020 @ 1:39:29 PM PDT (in 52.926s), with 1 more job pending
+8365ms	╚Event processed successfully (8365ms)
5/27/2020, 1:37:28 PM +141ms
+0ms	╔Received event [Las Vegas].time = 1590611849958 with a delay of -1817ms
+8542ms	║ Next launch is at 2020-05-30T19:22Z which is Sat, May 30 2020 @ 12:22:00 PM PDT
+8542ms	║ [in 2 days, 22 hours, 44 minutes, and 23 seconds].
+8568ms	║ Launch will be a Falcon 9 from pad LC-39A
+8568ms	║For the first time since the last flight of the Space Shuttle in 2011, U.S. astronauts will go to orbit from American soil. As part of NASA's Commercial Crew Program, SpaceX's Falcon 9 will launch the Crew Dragon spacecraft to the International Space Station.
+8592ms	║Setting up scheduled job for Wed, May 27 2020 @ 1:38:29 PM PDT (in 53.226s), with 1 more job pending
+8600ms	╚Event processed successfully (8599ms)
5/27/2020, 1:36:29 PM +193ms
+1ms	╔Received event [Las Vegas].time = 1590611789958 with a delay of -765ms
+8627ms	║Error executing external web request: groovyx.net.http.HttpResponseException: Service Unavailable
+8643ms	║Error retrieving JSON data part null
+8706ms	║ Next launch is at which is Wed, May 27 2020 @ 6:36:37 AM PDT
+8706ms	║ [in 7 hours].
+8713ms	║Error retrieving JSON data part null
+8716ms	║Error retrieving JSON data part null
+8719ms	║Error retrieving JSON data part null
+8739ms	║ Launch will be a from pad
+8739ms	║
+8786ms	║Setting up scheduled job for Wed, May 27 2020 @ 1:37:29 PM PDT (in 51.979s), with 1 more job pending
+8851ms	╚Event processed successfully (8850ms)
5/27/2020, 1:35:29 PM +303ms
+0ms	╔Received event [Las Vegas].time = 1590611729958 with a delay of -655ms
+9493ms	║ Next launch is at 2020-05-30T19:22Z which is Sat, May 30 2020 @ 12:22:00 PM PDT
+9493ms	║ [in 2 days, 22 hours, 46 minutes, and 21 seconds].
+9518ms	║ Launch will be a Falcon 9 from pad LC-39A
+9518ms	║For the first time since the last flight of the Space Shuttle in 2011, U.S. astronauts will go to orbit from American soil. As part of NASA's Commercial Crew Program, SpaceX's Falcon 9 will launch the Crew Dragon spacecraft to the International Space Station.
+9543ms	║Setting up scheduled job for Wed, May 27 2020 @ 1:36:29 PM PDT (in 51.113s), with 1 more job pending
+9551ms	╚Event processed successfully (9550ms)
5/27/2020, 1:34:29 PM +274ms
+1ms	╔Received event [Las Vegas].time = 1590611669958 with a delay of -684ms
+459ms	║Error executing external web request: groovyx.net.http.HttpResponseException: Service Unavailable
+476ms	║Error retrieving JSON data part null
+540ms	║ Next launch is at which is Wed, May 27 2020 @ 6:34:29 AM PDT
+540ms	║ [in 7 hours].
+545ms	║Error retrieving JSON data part null
+549ms	║Error retrieving JSON data part null
+552ms	║Error retrieving JSON data part null
+577ms	║ Launch will be a from pad
+578ms	║
+607ms	║Setting up scheduled job for Wed, May 27 2020 @ 1:35:29 PM PDT (in 60.078s), with 1 more job pending
+615ms	╚Event processed successfully (615ms)
5/27/2020, 1:33:29 PM +211ms
+0ms	╔Received event [Las Vegas].time = 1590611609958 with a delay of -748ms
+10231ms	║Error executing external web request: java.net.SocketTimeoutException: Read timed out
+10248ms	║Error retrieving JSON data part null
+10317ms	║ Next launch is at which is Wed, May 27 2020 @ 6:33:39 AM PDT
+10318ms	║ [in 7 hours].
+10324ms	║Error retrieving JSON data part null
+10328ms	║Error retrieving JSON data part null
+10331ms	║Error retrieving JSON data part null
+10350ms	║ Launch will be a from pad
+10350ms	║
+10375ms	║Setting up scheduled job for Wed, May 27 2020 @ 1:34:29 PM PDT (in 50.372s), with 1 more job pending
+10383ms	╚Event processed successfully (10383ms)
5/27/2020, 1:32:29 PM +272ms
+0ms	╔Received event [Las Vegas].time = 1590611549958 with a delay of -686ms
+306ms	║ Next launch is at 2020-05-30T19:22Z which is Sat, May 30 2020 @ 12:22:00 PM PDT
+306ms	║ [in 2 days, 22 hours, 49 minutes, and 30 seconds].
+332ms	║ Launch will be a Falcon 9 from pad LC-39A
+333ms	║For the first time since the last flight of the Space Shuttle in 2011, U.S. astronauts will go to orbit from American soil. As part of NASA's Commercial Crew Program, SpaceX's Falcon 9 will launch the Crew Dragon spacecraft to the International Space Station.
+359ms	║Setting up scheduled job for Wed, May 27 2020 @ 1:33:29 PM PDT (in 60.327s), with 1 more job pending
+366ms	╚Event processed successfully (365ms)

#32

@wcmore, as you work on your next revision, I have the following suggestion to help initialization and transition to the next launch. These added conditions will help initialization after install and request an update once the launch is over.


#33

I took a different approach that will not only initialize a new piston, but will also grab new data shortly after the scheduled launch.

pic

I will include this new bit in my next update…


Edit: My auto-update worked well…

(my original post has been updated with the new import code)


#34

Man, you guys are awesome!! This is great.

Thanks @WCmore and all other contributors.


#35

To bring context to this, NASA officially scrubbed the mission at about 4:16.

This means it took between 8 - 15 minutes for the API to update…
(Not too shabby, really. Especially if this is a third party API)


#36

It seemed like the servers were getting hit for a minute because the page wouldn’t load so even with that in mind they got new data out pretty quick. All in all a good test run for probably my new favorite piston out of all of them! :slight_smile:


#38

@WCmore or anyone else, what are your thoughts on the modifications below? Few points outlined for consideration;

  • This has a large number of chunks then we would like (21) but worth a shot?
  • I made the interval every 20x minutes since it appears leading up to launch, weather windows are every 30x minutes. Figured at this interval might be able to catch a scrub sooner?
  • I have separated the text versus spoken notification into different times using additional offset variables. Figured that with the text I could get ready and grab the necessary snacks and beverages and then stand at the moment the voice comes on.
  • In between the notifications I have added a -4 offset to re-ping the launch date, as a last resort catch to a scrub. At this point in time I would have already gotten the written notification but at least the voice will not come on. Not overly concerned about the piston having the new data right away so figured at least the launchdate variable would suffice to stop the last portion of the piston based on a scrub.

There might be some errors I made or things I missed to consider so if anyone cares to review that would be awesome


#39

I had thought about this. Seems better to make the every a variable. Start at 3-4 hours and then shorten the interval as it gets closer to launch. Will always be one cycle delay in changing interval but easily compensated for.

To reduce the number of chunks thought maybe the messaging could be put in a separate piston if you store nextLaunch and the message you want to send into global variables. Just brainstorming here.

In the end, @wcmore always comes up with something better than we think of. :slight_smile:


#40

I thought about this as well but haven’t played around with it yet. It would allow additional granular control if you for example wanted to limit messaging/notification based on more parameters.


#41

My 4:16 estimate was because it was (officially) scrubbed at about T-17 minutes on a :33 launch.

Although like you, we saw clues leading up to that.


#43

Unfortunately, I will be unable to test this due to it’s size


With the block in place to prevent spamming the API, this is OK.
(although personally, I still want a normal alert if there is a scrub)


I like this, and was planning to add at least one bonus alert.


If you are referring to lines 140-145, I don’t think that bit will work. It is not grabbing new data on those last three timed triggers. (meaning it can only update based on line 61)