ISSues with Secrets.h- ISS tracker

I stepped away for a while and learned how to modify 3-D models, so I could add the OLED and make it taller.

Of course, the working script that was working when I put it down is getting hung up in build.
These lines raise a flag for “does not name a type”:

/*** 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’m going to re-open and see what happens, but how would one address this?

The library that is linked here says it’s only made for the AVR architecutre (ATMega / Arduino Uno, e.g.), not an ESP32 or ESP8266, if that’s the board you’re using.

What’s the full platformio.ini and code that reproduces the error?

platform = espressif8266
board = esp12e
framework = arduino
build_flags = -D SERIAL_DEBUG
monitor_filters = esp8266_exception_decoder
build_type = debug
monitor_speed = 9600
lib_deps = 
	ESP8266WiFi
	ArduinoJson
	ESP8266HTTPClient
	adafruit/Adafruit NeoPixel@^1.6.0
	Wire
	SPI
    https://github.com/pfeerick/ISS-Notifier.git
	https://github.com/adafruit/Adafruit-GFX-Library.git
	https://github.com/adafruit/Adafruit_SSD1306.git
	https://github.com/adafruit/Adafruit_BusIO.git

This is an awesome working program.

This seems weird. The repo you’re linking to, GitHub - pfeerick/ISS-Notifier: Neopixel notifier for when the ISS goes overhead, is a project with a platformio.ini, not a library. You shouldn’t use it as a library. If you do, the code in there (main.cpp) will overshadow any code you place in src/main.cpp and just not get executed.

If I just clone the repo and build that project, it gives

C:\Users\Max\temp>git clone https://github.com/pfeerick/ISS-Notifier.git
Cloning into 'ISS-Notifier'...
remote: Enumerating objects: 174, done.
remote: Counting objects: 100% (174/174), done.
remote: Compressing objects: 100% (74/74), done.
Receiving objects:  51% (89/174)te: Total 174 (delta 88), reused 153 (delta 69), pack-reused 0
Receiving objects: 100% (174/174), 44.09 KiB | 673.00 KiB/s, done.
Resolving deltas: 100% (88/88), done.

C:\Users\Max\temp>cd ISS-Notifier

C:\Users\Max\temp\ISS-Notifier>pio run
Processing d1_mini (board: d1_mini; platform: espressif8266@2.6.2; framework: arduino)
------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 (2.6.2+sha.af47912) > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.20704.0 (2.7.4)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing adafruit/Adafruit BusIO @ ^1.6.0
Library Manager: Adafruit BusIO @ 1.7.2 has been installed!
Library Manager: Installing adafruit/Adafruit GFX Library @ ^1.10.2
Library Manager: Adafruit GFX Library @ 1.10.7 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit BusIO @ 1.7.2 is already installed
Library Manager: Installing adafruit/Adafruit NeoPixel @ ^1.7.0
Library Manager: Adafruit NeoPixel @ 1.7.0 has been installed!
Library Manager: Installing adafruit/Adafruit SSD1306 @ ^2.4.1
Library Manager: Adafruit SSD1306 @ 2.4.3 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit GFX Library @ 1.10.7 is already installed
Library Manager: Installing bblanchon/ArduinoJson @ ^6.17.2
Library Manager: ArduinoJson @ 6.17.3 has been installed!
Library Manager: Installing paulstoffregen/Time @ ^1.6
Library Manager: Time @ 1.6.0 has been installed!
Library Manager: Installing jchristensen/Timezone @ ^1.2.4
Library Manager: Timezone @ 1.2.4 has been installed!
Library Manager: Installing dependencies...
Library Manager: Time @ 1.6.0 is already installed
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Adafruit BusIO> 1.7.2
|   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|-- <Adafruit GFX Library> 1.10.7
|   |-- <Adafruit BusIO> 1.7.2
|   |   |-- <Wire> 1.0
|   |   |-- <SPI> 1.0
|   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|-- <Adafruit NeoPixel> 1.7.0
|   |-- <Time> 1.6.0
|-- <Adafruit SSD1306> 2.4.3
|   |-- <Adafruit GFX Library> 1.10.7
|   |   |-- <Adafruit BusIO> 1.7.2
|   |   |   |-- <Wire> 1.0
|   |   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|   |-- <Wire> 1.0
|-- <ArduinoJson> 6.17.3
|-- <Time> 1.6.0
|-- <Timezone> 1.2.4
|   |-- <Time> 1.6.0
|-- <ESP8266HTTPClient> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <SPI> 1.0
|-- <Wire> 1.0
Building in release mode
Compiling .pio\build\d1_mini\src\main.cpp.o
Generating LD script .pio\build\d1_mini\ld\local.eagle.app.v6.common.ld
Compiling .pio\build\d1_mini\lib6e5\Wire\Wire.cpp.o
[..]
Indexing .pio\build\d1_mini\libFrameworkArduino.a
Linking .pio\build\d1_mini\firmware.elf
Retrieving maximum program size .pio\build\d1_mini\firmware.elf
Checking size .pio\build\d1_mini\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  34.7% (used 28400 bytes from 81920 bytes)
Flash: [===       ]  28.0% (used 292392 bytes from 1044464 bytes)
Building .pio\build\d1_mini\firmware.bin
Creating BIN file ".pio\build\d1_mini\firmware.bin" using "C:\Users\Max\.platformio\packages\framework-arduinoespressif8266\bootloaders\eboot\eboot.elf" and ".pio\build\d1_mini\firmware.elf"
============================================= [SUCCESS] Took 17.49 seconds =============================================

Environment    Status    Duration
-------------  --------  ------------
d1_mini        SUCCESS   00:00:17.487
============================================= 1 succeeded in 00:00:17.487 =============================================

a successfull compile.

The secrets.h file

standalone is indeed ‘wrong’ because it does not use a

#include <Timezone.h>

before declaring thse time zone objects, so VSCode IntelliSense will complain, but actual compilation will go through, since the file is being included in such an order that it pulls in the needed header beforehand. An IntelliSense nitpick, but not a real compile error.

I really have no idea what you’re talking about. That pfeerick guy wrote this.
I only put my stuff in secrets.h, and it ran awesomely. It was running on the WeMos until I blasted it with 12V. So I’m trying to upload the same thing to the same thing, sitting in the same chair.
I have to add those #includes?
My line 32 starts the OLED.

Compiling .pio\build\esp12e\lib239\ESP8266WiFi\CertStoreBearSSL.cpp.o
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
========================= [FAILED] 

The project you’ve linked to looks very much to me as if it’s its own PlatformIO root project, not a library supposed to be usable via lib_deps. But you’re using it like one, which I’m sure is wrong.

Oh. I see in the .ini. I deleted that, but I still have this:

.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);

That’s in secrets.h:

/*** Your WiFi Credentials ***/

const char *ssid = "your ssid";

const char *password = "your password";

/*** Your coordinates ***/

const float latitude = 00.00;

const float longitude = 00.00;

const float altitude = 100.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);

Why delete the .ini? As said, the way to work with this project should be to download it (https://github.com/pfeerick/ISS-Notifier/archive/refs/heads/master.zip), unpack it, and use open that project in the PIO home screen, then switch to the project, and build and upload as normal. It works as I’ve shown above with my clone & compile. Using a PlatformIO as a library will yield really weird results if you do that.

I deleted the github ISS tracker from the .ini.
It’s obviously not a library. That looks like artifact.

And I added the libraries, put them in lib_deps, and still Timezone and TimeChangeRule raise errors.