ISS Alert- should this work?

This program is awesome. I put this down for a few months and rebuilt the 3-D model for OLED, made it taller. The program was running. I was about to wire up a finished product, but then I blasted the WeMos Mini with 12V intended for a laser (I got a cool cutting laser, going to try to design a cutting tool.).

Now it won’t build. It says the last two items in secrets.h, the geolocation, aren’t kosher. I was surprised to learn PIO is kosher:

Compiling .pio\build\esp12e\lib239\ESP8266WiFi\ESP8266WiFi.cpp.o
In file included from src\main.cpp:30:0:
.pio\libdeps\esp12e\ISS-Notifier\include/secrets.h:20:1: error: 'TimeChangeRule' does not name a type
 TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600};    // UTC + 10 hours      
 ^
.pio\libdeps\esp12e\ISS-Notifier\include/secrets.h:21:1: error: 'Timezone' does not 
name a type
 Timezone myTz(aEST);
 ^
*** [.pio\build\esp12e\src\main.cpp.o] Error 1

I’m finally ready to give this as a gift, but now it doesn’t work.
1- What changed???
2- HOW CAN I MAKE IT WORK AGAIN???

Off hand, it looks like you might have lasered off a header file? Whatever header defines a TimeChangeRule and/or a Timezone looks to be missing from your #include statements.

I had a quick Google for TimeChangeRle esp8266 and got this hit GitHub - JChristensen/Timezone: Arduino library to facilitate time zone conversions and automatic daylight saving (summer) time adjustments. which looks like it could be what you are using.

Have you got #include Timezone.h in your code? (With the Uppercase T.)

Cheers,
Norm.

I don’t have those includes, but I never had them.
There is a file, secrets.h, and that’s where those two items live.
This is it:

/*** Your WiFi Credentials ***/
const char *ssid = "... ";
const char *password = "....";

/*** Your coordinates ***/
const float latitude = 37.25;
const float longitude = -121.9;
const float altitude = 260.00;

No wait…
And now there is no build function. And now this:
Error: Multiple requests to rebuild the project “Dashboard_Receiver_ESPNow_DOIT” index have been received! Automatic index rebuilding process has been terminated for 10 minutes. at A.value (c:\Users\joema.vscode\extensions\platformio.platformio-ide-2.3.1\node_modules\platformio-node-helpers\dist\index.js:1:935337) at A.value (c:\Users\joema.vscode\extensions\platformio.platformio-ide-2.3.1\node_modules\platformio-node-helpers\dist\index.js:1:938227) at A.value (c:\Users\joema.vscode\extensions\platformio.platformio-ide-2.3.1\node_modules\platformio-node-helpers\dist\index.js:1:940063) at c:\Users\joema.vscode\extensions\platformio.platformio-ide-2.3.1\node_modules\platformio-node-hel…

I can’t find either of the error words. They’re not in the script, they’re not in secrets.h.

Is that your complete secrets.h by any chance? The first error in your post is this:

In file included from src\main.cpp:30:0:
.pio\libdeps\esp12e\ISS-Notifier\include/secrets.h:20:1: error: 'TimeChangeRule' does not name a type
 TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600};    // UTC + 10 hours      
 ^

It’s complaining about the first character on line 20 and something called TimeChangeRule.

The second error is this, and also is found in secrets.h:

.pio\libdeps\esp12e\ISS-Notifier\include/secrets.h:21:1: error: 'Timezone' does not 
name a type
 Timezone myTz(aEST);
 ^

This time it doesn’t like something called Timezone at the start of line 21.

I see none of these in the code you posted above for the file secrets.h.

Cheers,
Norm.

There was discussion in here

So I’d request that the ISS-Notifier project is not used a library. This does have unintended side-effects like these. Refer

and GitHub - pfeerick/ISS-Notifier: Neopixel notifier for when the ISS goes overhead

Looking at Peter’s code, where this project came from, line 31 in main.cpp is this:

#include "Timezone.h"

Check your main.cpp file. That line is just above the inclusion of secrets.h.

See ISS-Notifier/main.cpp at master · pfeerick/ISS-Notifier · GitHub.

Cheers,
Norm.

1 Like

Thank you. I don’t understand how I could have deleted those.
I guess it’s operator error.

1 Like

No worries,we got there!

Cheers,
Norm.

DOes anybody know how I got secrets.h to work?
It’s in the include folder.
I had to edit it for a different location.
Now it isn’t being seen.
It’s saved in PIO as a C++ .h document.

How does that get included correctly again???

Hi Joe,

header files go into either:

  • The src folder; or
  • The include folder; or
  • The lib/library_name if it’s a header for the “library_name” library.

Secrets.h should be located in the include directory, if you are using Peter’s code. (@pfeerick).

Mine is in that location and works fine.

HTH

Cheers,
Norm.

Thank you. I was right.
I put a new secrets.h in the include folder, and it won’t load.

I’ll confirm again, but this is what happened:
I edited secrets.h for a different location and uploaded the program.
The program ran with the same location. It didn’t change the secrets data.
I deleted the pio folder, and build failed.
The file is in there.

When I try to build, secrets.h isn’t found.

But it’s there. I even re-saved it, copied from pfeerick, saved in PIO as a C++ .h document.

I’ll give it another shot today.

I had a strange hardware issue. The 2812 is associated with four fried WeMos 8266. I have two working ISS trackers, out of a six-pack of 8266.

If you still have trouble, show a screenshot of the folder structure… might be able to see what’s going on from that. Try to build it, and the screenshot will have the error message on it also.

If the location didn’t change, was the upload successful? As if that failed, it naturally won’t change.

I closed everything but this and the documents folder. secrets.h is in fact sitting in the secrets folder in /include. It looks exactly like the old one, with different numbers.

I copied your text from Github, pasted into a new PIO file, and saved as a .h C++ file.

This is the error:
Compiling .pio\build\esp12e\lib239\ESP8266WiFi\ESP8266WiFiGratuitous.cpp.o
src\main.cpp:34:21: fatal error: secrets.h: No such file or directory


  • Looking for secrets.h dependency? Check our library registry!
  • CLI > platformio lib search “header:secrets.h”
  • Web > PlatformIO Registry

#include “secrets.h”
^
compilation terminated.
*** [.pio\build\esp12e\src\main.cpp.o] Error 1

The file:

/*** Your WiFi Credentials ***/
const char *ssid = " ";
const char *password = " ";

/*** Your coordinates ***/
const float latitude = 39.92;
const float longitude = -75.55;
const float altitude = 260.00;

/*** Your timezone ***/
// How to set: https://github.com/JChristensen/Timezone#coding-timechangerules
TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600};    // UTC + 10 hours
Timezone myTz(aEST);

I was hoping to see something more like this…

As from your screenshot, I can’t see where that secrets.h is in relation to the rest of the project. Or if secrets.h is the real file extension… if you copied the text from the github page, and used notepad to save it, it probably has the wrong file extension, and is actually secrets.h.txt, not secrets.h. Which you would be able to see in the VSCode file brower, and rename from there.

To avoid issues like that, download the raw file from github, as that will download the file to your computer as is, with the proper file name.

secrets.h is inside the secrets folder inside include? Really?

If the path is include\secrets\secrets.h the you need #include secrets\secrets.h.

And you have changed the structure of the project directory but not made appropriate changes to the code.

Cheers,
Norm.

Cheers,
Norm.

1 Like

I hate that Windows defaults to hiding file extensions. That way many people have ben scammed/virussed/affected. People can cope with file extensions, Microsoft!

It’s the first thing I turn off when forced to use Windows.

(End rant!)

Cheers,
Norm.

1 Like

Urgh! Good catch! :laughing:

Same. Or use xplorer2 instead of “windows exploder”. :grin:

1 Like

Again, I used PIO and saved it as a C++ h file.
The tree:

I did nothing to the code. secrets.h is as it is in the original code.

I’m too scared to make any changes to it.