Rocket Launch Notifications via API
Unfortunately, I am not. I quickly shifted over to a dedicated thread, where Iâve made a lot of improvements to the piston. (although I did remove the Florida section⌠That piston keeps track of all locations)
Thanks for the imageâŚ
What happens when âIF Time & Date happens daily at Xâ triggers
? (line 89)
Without seeing a log, I would guess that maybe the GET request was sent, but the 20 sec wakeup afterwards cancelled the rest of the code?
Hereâs the log that ran this morning, for the launch today. NextLaunch appears to be set correctly. For whatever reason, I donât think the Date & Time trigger is working. Everything else seems okay.
6/26/2020, 12:34:59 AM +65ms
+1ms âReceived event [Home].time = 1593146100000 with a delay of -935ms
+105ms âRunTime Analysis CS > 22ms > PS > 39ms > PE > 44ms > CE
+108ms âRuntime (66011 bytes) successfully initialized in 39ms (v0.3.110.20191009) (106ms)
+109ms ââExecution stage started
+119ms ââCancelling statement #1's schedules...
+126ms ââSending external web request to: fdo.rocketlaunch.live/json/launches/next/5
+902ms ââExecuted virtual command httpRequest (775ms)
+906ms ââExecuted virtual command setVariable (2ms)
+918ms ââComparison (dynamic) FL is (string) FL = true (1ms)
+920ms ââCondition #20 evaluated true (6ms)
+921ms ââCondition group #19 evaluated true (state did not change) (7ms)
+923ms ââCancelling statement #21's schedules...
+928ms ââExecuted virtual command setVariable (3ms)
+935ms ââComparison (boolean) true is (boolean) true = true (1ms)
+937ms ââCondition #26 evaluated true (5ms)
+938ms ââCondition group #25 evaluated true (state did not change) (6ms)
+940ms ââCancelling statement #69's schedules...
+945ms ââExecuted virtual command setVariable (2ms)
+953ms ââCalculating (datetime) 1593131700014 - (datetime) 1593146100016 >> (datetime) -14400002
+957ms ââCalculating (decimal) -1.4400002E7 / (decimal) 3600000.0 >> (decimal) -4.000000555555555
+974ms ââCalculating (date) 1593144000000 + (time) 72780000 >> (datetime) 1593216780000
+979ms ââExecuted virtual command setVariable (2ms)
+985ms ââExecuted virtual command setVariable (2ms)
+991ms ââExecuted virtual command setVariable (3ms)
+996ms ââExecuted virtual command setVariable (2ms)
+1002ms ââExecuted virtual command setVariable (2ms)
+1008ms ââExecuted virtual command setVariable (2ms)
+1014ms ââExecuted virtual command setVariable (3ms)
+1021ms ââCalculating (string) Next FL launch is at + (string) 2020-06-26T20:13Z >> (string) Next FL launch is at 2020-06-26T20:13Z
+1024ms ââCalculating (string) Next FL launch is at 2020-06-26T20:13Z + (string) which is >> (string) Next FL launch is at 2020-06-26T20:13Z which is
+1027ms ââCalculating (string) Next FL launch is at 2020-06-26T20:13Z which is + (string) Fri, Jun 26 2020 @ 4:13:00 PM EDT >> (string) Next FL launch is at 2020-06-26T20:13Z which is Fri, Jun 26 2020 @ 4:13:00 PM EDT
+1030ms ââNext FL launch is at 2020-06-26T20:13Z which is Fri, Jun 26 2020 @ 4:13:00 PM EDT
+1031ms ââExecuted virtual command log (1ms)
+1054ms ââCalculating (string) Falcon 9 + (string) is scheduled to launch the >> (string) Falcon 9 is scheduled to launch the
+1059ms ââCalculating (string) Falcon 9 is scheduled to launch the + (string) [Starlink-10 (57x), BlackSky Global 5 & 6] >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6]
+1063ms ââCalculating (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] + (string) at >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at
+1068ms ââCalculating (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at + (string) Kennedy Space Center >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center
+1072ms ââCalculating (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center + (string) from pad >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad
+1076ms ââCalculating (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad + (string) LC-39A >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1079ms ââCalculating (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A + (string)
+1079ms ââ >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1082ms ââCalculating (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1082ms ââ + (string) A SpaceX Falcon 9 rocket will launch the Starlink-10 (57x) mission on Friday, June 26, 2020 at 8:18 PM (UTC). >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1083ms ââA SpaceX Falcon 9 rocket will launch the Starlink-10 (57x) mission on Friday, June 26, 2020 at 8:18 PM (UTC).
+1085ms ââCalculating (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1086ms ââA SpaceX Falcon 9 rocket will launch the Starlink-10 (57x) mission on Friday, June 26, 2020 at 8:18 PM (UTC). + (string)
+1086ms ââ >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1086ms ââA SpaceX Falcon 9 rocket will launch the Starlink-10 (57x) mission on Friday, June 26, 2020 at 8:18 PM (UTC).
+1088ms ââCalculating (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1088ms ââA SpaceX Falcon 9 rocket will launch the Starlink-10 (57x) mission on Friday, June 26, 2020 at 8:18 PM (UTC).
+1089ms ââ + (string) null >> (string) Falcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1089ms ââA SpaceX Falcon 9 rocket will launch the Starlink-10 (57x) mission on Friday, June 26, 2020 at 8:18 PM (UTC).
+1089ms âânull
+1092ms ââFalcon 9 is scheduled to launch the [Starlink-10 (57x), BlackSky Global 5 & 6] at Kennedy Space Center from pad LC-39A
+1092ms ââA SpaceX Falcon 9 rocket will launch the Starlink-10 (57x) mission on Friday, June 26, 2020 at 8:18 PM (UTC).
+1092ms âânull
+1093ms ââExecuted virtual command log (1ms)
+1106ms ââCalculating (string) đ + (string) Falcon 9 >> (string) đ Falcon 9
+1110ms ââCalculating (string) đ Falcon 9 + (string) is scheduled to launch from >> (string) đ Falcon 9 is scheduled to launch from
+1114ms ââCalculating (string) đ Falcon 9 is scheduled to launch from + (string) Falcon 9 is scheduled to launch from [Starlink-10 (57x), BlackSky Global 5 & 6]
+1119ms ââCalculating (string) đ Falcon 9 is scheduled to launch from >> (string) đ Falcon 9 is scheduled to launch from
+1123ms ââCalculating (string) đ Falcon 9 is scheduled to launch from + (string) Kennedy Space Center >> (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center
+1126ms ââCalculating (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center + (string) on >> (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on
+1130ms ââCalculating (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on + (string) Fri, Jun 26 2020 @ 4:13:00 PM EDT >> (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on Fri, Jun 26 2020 @ 4:13:00 PM EDT
+1133ms ââCalculating (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on Fri, Jun 26 2020 @ 4:13:00 PM EDT + (string) from pad >> (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on Fri, Jun 26 2020 @ 4:13:00 PM EDT from pad
+1136ms ââCalculating (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on Fri, Jun 26 2020 @ 4:13:00 PM EDT from pad + (string) LC-39A >> (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on Fri, Jun 26 2020 @ 4:13:00 PM EDT from pad LC-39A
+1138ms ââCalculating (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on Fri, Jun 26 2020 @ 4:13:00 PM EDT from pad LC-39A + (string) . >> (string) đ Falcon 9 is scheduled to launch from Kennedy Space Center on Fri, Jun 26 2020 @ 4:13:00 PM EDT from pad LC-39A.
+1141ms ââExecuted virtual command setState (0ms)
+1144ms ââExecution stage complete. (1034ms)
+1145ms âSetting up scheduled job for Sat, Jun 27 2020 @ 12:35:00 AM EDT (in 86399.791s)
+1152ms âEvent processed successfully (1152ms)
That last block does not like to re-evaluate until it is inside that block.
Here is the technique I used on my Rocket piston to force an update a bit early.
Thanks!
So during the daily update at 00:35, I set the nle variable to be calculated, then updated the alert block. A couple of questions:
- You mention updating nle hourly. Do I really need to do that?
- You have the alert block running for nle or what Iâm guessing is the same value of nle. Do I need to do that? Wouldnât that make it alert twice?
I put mine inside a block that runs every hour, although looking back, I do not remember why I did that, LOL
You may be able to get away with only running that line on the times where the API is updated.
Well, there are two triggers
there.
One is {nle} (which translates to launchTime -30)
The other is launchTime -91, which is the magic element I used to force the real time to be updated.
Note: I am not sure it matters, but logically, the {nle} trigger
needs to be before the -91 line
So I had a bit of a failure today. The launch was scrubbed around 1pm ET. At T-30 minutes, it triggered this time (yay!). However, it grabbed the info for whatever the next launch it found was, and announced that. How would I prevent that?
I sincerely apologize. This was addressed and solved over in my forked thread.
Basically, the workaround I added to the top trigger
was something like this:
This forces extra API pulls in the hours leading up to the launch.
(which should catch any new changes, and update the variables
before the event)