Closed mr12obot closed 2 years ago
Could you please share your platformio.ini?
please find below platformio.ini. Is there any missed?
; PlatformIO Project Configuration File
[platformio] default_envs = esp8266 src_dir = SolarTracerBlynk
[env] framework = arduino monitor_speed = 115200 lib_deps = blynkkk/Blynk@^1.0.0 https://github.com/Bettapro/ModbusMaster.git https://github.com/schinken/SimpleTimer.git https://github.com/tzapu/WiFiManager.git#2.0.4-beta https://github.com/bblanchon/ArduinoJson.git
[extra] ota_hostname=SOLAR-MODBUS.local ota_password=admin
; ; [BOARD] ENVIRONMENT DEFS. ;
; ESP32 DEV MODULE
[env:esp32dev] platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
board = esp32dev platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.0
[env:esp32dev_ota] platform = ${env:esp32dev.platform} extends = env:esp32dev upload_protocol = espota upload_port = ${extra.ota_hostname} upload_flags = --auth=${extra.ota_password}
; WEMOS D1 MINI 32
[env:wemos_d1_mini32] platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
board = wemos_d1_mini32 platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.0
[env:wemos_d1_mini32_ota] platform = ${env:wemos_d1_mini32.platform} extends = env:wemos_d1_mini32 upload_protocol = espota upload_port = ${extra.ota_hostname} upload_flags = --auth=${extra.ota_password}
; ESP8266
[env:esp8266] platform = espressif8266 board = esp12e
[env:esp8266_ota] platform = ${env:esp8266.platform} extends = env:esp8266 upload_protocol = espota upload_port = ${extra.ota_hostname} upload_flags = --auth=${extra.ota_password}
I cannot test it, as I'm not in front of my pc, but I guess doing the following changes will solve.
In SolarTracerBlynk/SolarTracerBlynk.ino:
configTime(0, 0, NTP_SERVER_CONNECT_TO);
with configTime(0, 0, NTP_SERVER_CONNECT_TO, CURRENT_TIMEZONE);
Final result should be:
configTime(0, 0, NTP_SERVER_CONNECT_TO, CURRENT_TIMEZONE);
//setenv("TZ", CURRENT_TIMEZONE, 3);
//tzset();
EDIT: Just download latest version from v3.x.x, should solve it as well.
ok it works like a charm. then how about the 2nd log messages below ? it's look like something wrong with library ModbusMaster/src/util
'uint16_t crc16_update(uint16_t, uint8_t)' defined but not used [-Wunused-function]
It's a warning coming from modbusmaster lib., it tells that modbusmaster declared a function inside crc16.h, not used anywhere (that means I can remove it, gaining some extra bytes on flash memory).
Last warning is about a variable not used after its declaration. I guess that part could be coded a little bit better. I already planned to review the procedure on time sync so I will fix it there #21
As they are both warnings you can just ignore them and compile the project😉
How to fix this error identifier and function is undefined/unused ?