Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload fails #410

Closed
markus786 opened this issue Mar 14, 2024 · 9 comments
Closed

Upload fails #410

markus786 opened this issue Mar 14, 2024 · 9 comments

Comments

@markus786
Copy link

Hello!
I don't know what I'm doing wrong.
I've followed the instructions from start to finish step by step twice now, but every time I try to upload the code to my WEMOS D1 Mini ESP32, I get the error described below.
I've also tried selecting/including other environments and boards and even customizing the code a bit, but I can't get it fixed.
Is there anyone who knows this failure and can help me solve it?

Processing esp32 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 (6.5.0) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - tool-mkfatfs @ 2.0.1 
 - tool-mklittlefs @ 1.203.210628 (2.3) 
 - tool-mkspiffs @ 2.230.0 (2.30) 
 - tool-openocd-esp32 @ 2.1100.20220706 (11.0) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
Dependency Graph
|-- PubSubClient @ 2.8.0
|-- ArduinoOTA @ 2.0.0
|-- WiFi @ 2.0.0
|-- EEPROM @ 2.0.0
|-- WiFiClientSecure @ 2.0.0
Building in release mode
Compiling .pio\build\esp32\src\main.cpp.o
Archiving .pio\build\esp32\liba0b\libPubSubClient.a
Archiving .pio\build\esp32\lib25f\libUpdate.a
Compiling .pio\build\esp32\lib807\WiFi\WiFiSTA.cpp.o
Compiling .pio\build\esp32\lib807\WiFi\WiFiScan.cpp.o
Compiling .pio\build\esp32\lib807\WiFi\WiFiServer.cpp.o
Compiling .pio\build\esp32\lib807\WiFi\WiFiUdp.cpp.o
Compiling .pio\build\esp32\libb17\ESPmDNS\ESPmDNS.cpp.o
In file included from src/main.cpp:31:
include/mqtt.h: In function 'void readEEPROM()':
include/mqtt.h:64:84: error: 'PIN_THERM_ACTIVE_STATE' was not declared in this scope
     mqttSerial.printf("Restoring previous state: %s",(EEPROM.read(EEPROM_STATE) == PIN_THERM_ACTIVE_STATE)? "On":"Off" );
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:64:84: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
     mqttSerial.printf("Restoring previous state: %s",(EEPROM.read(EEPROM_STATE) == PIN_THERM_ACTIVE_STATE)? "On":"Off" );
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~
                                                                                    SG_RELAY_ACTIVE_STATE
include/mqtt.h:69:32: error: 'PIN_THERM_ACTIVE_STATE' was not declared in this scope
     EEPROM.write(EEPROM_STATE,!PIN_THERM_ACTIVE_STATE);
                                ^~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:69:32: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
     EEPROM.write(EEPROM_STATE,!PIN_THERM_ACTIVE_STATE);
                                ^~~~~~~~~~~~~~~~~~~~~~
                                SG_RELAY_ACTIVE_STATE
In file included from src/main.cpp:31:
include/mqtt.h: In function 'void callbackTherm(byte*, unsigned int)':
include/mqtt.h:135:30: error: 'PIN_THERM_ACTIVE_STATE' was not declared in this scope
     digitalWrite(PIN_THERM, !PIN_THERM_ACTIVE_STATE);
                              ^~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:135:30: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
     digitalWrite(PIN_THERM, !PIN_THERM_ACTIVE_STATE);
                              ^~~~~~~~~~~~~~~~~~~~~~
                              SG_RELAY_ACTIVE_STATE
include/mqtt.h:142:29: error: 'PIN_THERM_ACTIVE_STATE' was not declared in this scope
     digitalWrite(PIN_THERM, PIN_THERM_ACTIVE_STATE);
                             ^~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:142:29: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
     digitalWrite(PIN_THERM, PIN_THERM_ACTIVE_STATE);
                             ^~~~~~~~~~~~~~~~~~~~~~
                             SG_RELAY_ACTIVE_STATE
include/mqtt.h: In function 'void callbackSafety(byte*, unsigned int)':
include/mqtt.h:212:37: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
     digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:212:37: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
     digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
                                     SG_RELAY_ACTIVE_STATE
include/mqtt.h:218:36: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
     digitalWrite(SAFETY_RELAY_PIN, SAFETY_RELAY_ACTIVE_STATE);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:218:36: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
     digitalWrite(SAFETY_RELAY_PIN, SAFETY_RELAY_ACTIVE_STATE);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
                                    SG_RELAY_ACTIVE_STATE
src/main.cpp: In function 'void setup()':
src/main.cpp:314:35: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
   digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:314:35: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
   digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
                                   SG_RELAY_ACTIVE_STATE
Compiling .pio\build\esp32\lib94c\ArduinoOTA\ArduinoOTA.cpp.o
Compiling .pio\build\esp32\lib8b6\EEPROM\EEPROM.cpp.o
*** [.pio\build\esp32\src\main.cpp.o] Error 1
====================================================================================== [FAILED] Took 15.31 seconds ======================================================================================

Environment    Status    Duration
-------------  --------  ------------
esp32          FAILED    00:00:15.312
================================================================================= 1 failed, 0 succeeded in 00:00:15.312 =================================================================================
@Bobby5169
Copy link

I tried tonight and I have the same problem.
I'm totally newbie with esp.
Hope we will find a solution

@raomin
Copy link
Owner

raomin commented Mar 15, 2024

Hmm sorry guys I must have messed up with the latest pr... I'll fix it today

@raomin
Copy link
Owner

raomin commented Mar 16, 2024

Sorry guys I forgot to add PIN_THERM_ACTIVE_STATE on the public setup.h. Now it should work.

@raomin raomin closed this as completed Mar 16, 2024
@Bobby5169
Copy link

Thanks for the work and the short delay for the resolution

@markus786
Copy link
Author

markus786 commented Mar 17, 2024

Hello @raomin

it still doesn't work for me.
Seems like you still need to include SAFETY_RELAY_ACTIVE_STATE and SG_RELAY_ACTIVE_STATE as you did it for PIN_THERM_ACTIVE_STATE !?

In file included from src/main.cpp:31:
include/mqtt.h: In function 'void callbackSafety(byte*, unsigned int)':
include/mqtt.h:212:37: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
     digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:212:37: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
     digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
                                     SG_RELAY_ACTIVE_STATE
include/mqtt.h:218:36: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
     digitalWrite(SAFETY_RELAY_PIN, SAFETY_RELAY_ACTIVE_STATE);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:218:36: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
     digitalWrite(SAFETY_RELAY_PIN, SAFETY_RELAY_ACTIVE_STATE);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
                                    SG_RELAY_ACTIVE_STATE
src/main.cpp: In function 'void setup()':
src/main.cpp:314:35: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
   digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:314:35: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
   digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
                                   SG_RELAY_ACTIVE_STATE
*** [.pio\build\esp32\src\main.cpp.o] Error 1
================= [FAILED] Took 31.43 seconds =================

Environment    Status    Duration
-------------  --------  ------------
esp32          FAILED    00:00:31.428
============ 1 failed, 0 succeeded in 00:00:31.428 ============ 

@sdpeixoto
Copy link

sdpeixoto commented Mar 18, 2024

I have got build error on "SAFETY_RELAY_ACTIVE_STATE" variable, which is missing to be declared... Should it be declared in setup.h as well as you did for "PIN_THERM_ACTIVE_STATE" or this can be replaced by "SG_RELAY_ACTIVE_STATE" variable?

@markus786
Copy link
Author

@raomin Can we expect an answer from you in here? Although the issue was closed, after you had declared PIN_THERM_ACTIVE_STATE, the problem with SAFETY_RELAY_ACTIVE_STATE and SG_RELAY_ACTIVE_STATE seems not solved yet...

@raomin
Copy link
Owner

raomin commented Mar 19, 2024

I'm sorry, I missed this one yesterday but fixed it today. Can you cross check?

@markus786
Copy link
Author

Thanks @raomin! Now it works.

But unfortunately I just found another issue while I was setting up my system: #418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants