ISS Alert- should this work?

I really, really dig the 32-pixel 1306 OLED. That format is very visually appealing.
I have the monochrome 64s and a few with yellow print at the top.

I have two kinds of TFT. One fits the Uno and one fits the Mega. Haven’t gotten it to work yet, but there’s moratorium on all non-ISS projects.

@pfeerick,

Only works between October and March · Issue #1 · pfeerick/ISS-Notifier · GitHub raised. :wink:

Cheers,
Norm.

@monsterthews You might want to check the code out again then :wink:
https://imgur.com/a/3jgI4Bj

@normandunbar Grumble mumble… not-my-bug squashed… thanks for spotting it!

1 Like

@pfeerick - you are welcome. I write bugs too! :wink:

Cheers,
Norm.

1 Like

I get this:
Looking up next ISS flyover time…
getNextPass(): HTTP request failed, reason:

There’s nothing to change but SSID, PW, right?

Only SSID, PW, latitude, longitude and altitude…

Since you’re only showing two lines of the output, does it fail multiple times, or just the once, and work on the retry? Odd that the reason isn’t being stated - not much should fail around that code since it’s basically what is used on the example code Actually, I know why… it’s probably a server response error, not a outright failure to connect… I’ll have to add a second check there so it knows how to display that also.

Right… see what the latest commit gives you.

This was a looped output, about one second between.

I didn’t have longitude or latitude. I was looking for them up top.

Now it looks accurate, reported in 11:11:11 format- nice.

OLED isn’t lit. I have to figure that out. I2C can be funny.

Wow thanks man. I assume you’re a man, but it’s meant in the androgynous “dude” way.

If it lights up, I’ll be very happy.

1 Like

Why isn’t the OLED lighting up?

What’s this ifdef business?
Why not just write it in?

(I tried deleting your #ifdefs, but it still doesn’t light up.)

If I put my logon credentials in secrets.h, can I remove that from the program?

Yes, that is the whole purpose of a separate secrets.h file… you use that instead, and then if you share code, it isn’t shown as you won’t copy it by accident. So you can put WiFi SSID & password, as well as lat, long and altitude there. In my case, I wrote the sample config file, and then stopped it from being tracked when I commit stuff, so my secrets.h has my actual credentials in it… but you can’t see them :stuck_out_tongue:

Don’t just start randomly changing stuff… i.e. deleting the #ifdefs… just enable the OLED support by uncommenting the #USE_OLED line that is commented out… which will enable all of the OLED code. It’s behind #ifdef blocks so it can be completely enabled or disabled with a single option. The #ifdef blocks are not seen by the compiler if turned off, so it is as if they weren’t even there.

If you hadn’t read it already, there was some guidance on all of this in the README.md file at the front of the git hub repo. :wink:

Are you interested in it only showing passes that are likely to be visible? As the code only looks for the next pass, rather than taking into account sunrise and sunset, and the relationship between that and the next pass. This is why it shows multiple passes in a day (which is the case) rather than just the (typically) one entry you see on the NASA spotter site - as that only shows passes that are a few hours before or after sunrise/sunset.

If so, I’ll see what I can do about adding that in, which will also be behind an #ifdef toggle so it can be turned on or off at compile time.

Stopped working:
getCurrentTime(): HTTP request failed, server response: 503
Getting the current time (UTC)…
getCurrentTime(): HTTP request failed, server response: 503

1 Like

A quick Google:

The HyperText Transfer Protocol ( HTTP ) 503 Service Unavailable server error response code indicates that the server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded.

(Their emphasis!)

Basically, the server you wanted is down/off-line/unavailable.

However, if you copy and paste the URL from the code, into a browser, you get the same error message. Go directly to http://worldtimeapi.org and click through to the list of Canonical Timezones, then click the Etc/UTC one, you get a different URL:
Current time in Etc/UTC, via World Time API: Simple JSON/plain-text API to obtain the current time in, and related data about, a timezone. – which does work – rather than http://worldtimeapi.org/api/timezone/etc/utc - there’s an extra “/api” in the code’s URL.

@pfeerick: Looks like the URL is incorrect, needs to be Current time in Etc/UTC, via World Time API: Simple JSON/plain-text API to obtain the current time in, and related data about, a timezone..

Cheers,
Norm.

1 Like

Actually, no… if you check the page again (Current time in Etc/UTC, via World Time API: Simple JSON/plain-text API to obtain the current time in, and related data about, a timezone.), and use the API link that’s shown there… (JSON)…

it says it should have api in the url…

But, it is probably case sensitive. The strange thing is, that URL is working for me… both upper and lower case. There is a caution on the World TIme API site that it will have downtime…

The API can go down from time-to-time, for relatively long periods. It is provided with no SLA, no guarantees, and no direct funding .

Which is why, when I get time (pun intended), I plan to rip it out completely, and exchange it with plain NTP… or at least that’s the plan. May be a few days before I can do that though. In the mean time, I’ll change the URL to the correct case, and see if that makes any difference. :wink:

Silly me! (again!) - the “api” URL is of course required to get the result back in JSON (or text) as opposed to a normal Web Page. My bad. Sorry.

Need. More. Coffee!

Cheers,
Norm.

PS. Puns – need to be pun-ished! :wink:

1 Like

So when you click on the JSON or plain text links does it also 503?

If you navigate to those pages in most web browsers, it should still give you something - either the json, or the txt… if it 503 there’s still a problem…

:coffee:

It was giving a 503 (with the lower case URL from the code) – but I’ve tried it again just now and all is well. I get the JSON data back quite happily now.

I’m suspecting it was a valid “server down” error.

Cheers,
Norm.

1 Like

1- I have a buzz from this.
2- I was thinking about NTP. My WebServer has NTP, so I want to synchronize everything that has a clock, for trading data, etc.

The ISS would be overhead right now if I were in India.

How do I change the time zone? UTC is at 0 longitude, and I’m in California. I tried changing the URL to the Los Angeles API page.

And the lights only come on at startup (a few green blinks) and error state (red blinks when I messed up the time).

But if this is essentially GMT, it’s still off. The ISS is over China right now, and the serial output says it just happened- about six hours’ flight from UK.