Compare commits
No commits in common. "28e0dc3b113de642c012713b2be7698d03e65a81" and "75e851a2ebe8241c849bc786c66d06ac0ad1139b" have entirely different histories.
28e0dc3b11
...
75e851a2eb
|
@ -6,5 +6,3 @@
|
||||||
.vs/
|
.vs/
|
||||||
.vscode/
|
.vscode/
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
firmware/
|
|
||||||
release/
|
|
|
@ -73,6 +73,5 @@
|
||||||
"C_Cpp_Runner.useLeakSanitizer": false,
|
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||||
"C_Cpp_Runner.showCompilationTime": false,
|
"C_Cpp_Runner.showCompilationTime": false,
|
||||||
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||||
"C_Cpp_Runner.msvcSecureNoWarnings": false,
|
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||||
"cmake.sourceDirectory": "D:/Git/iot-firmware/.pio/libdeps/full/Adafruit BusIO"
|
|
||||||
}
|
}
|
|
@ -1,66 +0,0 @@
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import platform
|
|
||||||
import subprocess
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import platform
|
|
||||||
|
|
||||||
|
|
||||||
# Get the current directory
|
|
||||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
|
|
||||||
# Define the path to the firmware folder
|
|
||||||
firmware_folder = os.path.join(current_dir, 'firmware')
|
|
||||||
|
|
||||||
# Define the path to the release folder
|
|
||||||
release_folder = os.path.join(current_dir, 'release')
|
|
||||||
|
|
||||||
# Add the path to the PlatformIO executable to the system PATH
|
|
||||||
platformio_path = os.path.expanduser('~/.platformio/penv/Scripts')
|
|
||||||
|
|
||||||
if os.path.exists(release_folder):
|
|
||||||
# If the release folder exists, delete it
|
|
||||||
shutil.rmtree(release_folder)
|
|
||||||
os.makedirs(release_folder)
|
|
||||||
|
|
||||||
# Get the current Git branch name
|
|
||||||
git_branch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode().strip()
|
|
||||||
|
|
||||||
# Build the PlatformIO project
|
|
||||||
if len(sys.argv) > 1:
|
|
||||||
# If arguments are supplied, build the environments that match the arguments
|
|
||||||
environments = sys.argv[1:]
|
|
||||||
for environment in environments:
|
|
||||||
subprocess.run([f'{platformio_path}/platformio.exe', 'run', '-e', environment], cwd=current_dir)
|
|
||||||
|
|
||||||
# Iterate over the subfolders in the firmware folder
|
|
||||||
for subfolder in os.listdir(firmware_folder):
|
|
||||||
subfolder_path = os.path.join(firmware_folder, subfolder)
|
|
||||||
|
|
||||||
# Check if the subfolder matches the environment argument
|
|
||||||
if subfolder == environment:
|
|
||||||
# Check if the subfolder contains a firmware.bin file
|
|
||||||
firmware_file = os.path.join(subfolder_path, 'firmware.bin')
|
|
||||||
if os.path.isfile(firmware_file):
|
|
||||||
# Move the firmware.bin file to the release folder with the Git branch name appended
|
|
||||||
new_file_name = os.path.join(release_folder, f"{subfolder}_{git_branch}.bin")
|
|
||||||
shutil.move(firmware_file, new_file_name)
|
|
||||||
else:
|
|
||||||
# If no argument is supplied, build all environments
|
|
||||||
subprocess.run([f'{platformio_path}/platformio.exe', 'run'], cwd=current_dir)
|
|
||||||
|
|
||||||
# Iterate over the subfolders in the firmware folder
|
|
||||||
for subfolder in os.listdir(firmware_folder):
|
|
||||||
subfolder_path = os.path.join(firmware_folder, subfolder)
|
|
||||||
|
|
||||||
# Check if the subfolder contains a firmware.bin file
|
|
||||||
firmware_file = os.path.join(subfolder_path, 'firmware.bin')
|
|
||||||
if os.path.isfile(firmware_file):
|
|
||||||
# Move the firmware.bin file to the release folder with the Git branch name appended
|
|
||||||
new_file_name = os.path.join(release_folder, f"{subfolder}_{git_branch}.bin")
|
|
||||||
shutil.move(firmware_file, new_file_name)
|
|
147
platformio.ini
147
platformio.ini
|
@ -8,15 +8,11 @@
|
||||||
; Please visit documentation for the other options and examples
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[platformio]
|
[env:wt32-eth01]
|
||||||
build_dir = .\firmware
|
|
||||||
|
|
||||||
[env:full]
|
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = wt32-eth01
|
board = wt32-eth01
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board_build.f_cpu = 240000000L
|
board_build.f_cpu = 240000000L
|
||||||
build_flags = -DENABLE_INTERNAL_LCD -DENABLE_IR_MODULE -DENABLE_CLIMATE_MODULE -DENABLE_ANALOG_MODULE -DENABLE_WEBUI
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
||||||
knolleary/PubSubClient@^2.8
|
knolleary/PubSubClient@^2.8
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
ivanseidel/ArduinoThread@^2.1.1
|
||||||
|
@ -28,144 +24,3 @@ lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
robtillaart/FRAM_I2C@^0.6.1
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|
||||||
[env:lcd_climate]
|
|
||||||
platform = espressif32
|
|
||||||
board = wt32-eth01
|
|
||||||
framework = arduino
|
|
||||||
board_build.f_cpu = 240000000L
|
|
||||||
build_flags = -DENABLE_INTERNAL_LCD -DENABLE_IR_MODULE -DENABLE_CLIMATE_MODULE
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
|
||||||
knolleary/PubSubClient@^2.8
|
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
|
||||||
arduino-libraries/Arduino_BuiltIn@^1.0.0
|
|
||||||
dersimn/PubSubClientTools@^0.6
|
|
||||||
z3t0/IRremote@^4.2.0
|
|
||||||
robtillaart/DHTNEW@^0.4.18
|
|
||||||
seithan/Easy Nextion Library@^1.0.6
|
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
[env:webui]
|
|
||||||
platform = espressif32
|
|
||||||
board = wt32-eth01
|
|
||||||
framework = arduino
|
|
||||||
board_build.f_cpu = 240000000L
|
|
||||||
build_flags = -DENABLE_WEBUI
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
|
||||||
knolleary/PubSubClient@^2.8
|
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
|
||||||
arduino-libraries/Arduino_BuiltIn@^1.0.0
|
|
||||||
dersimn/PubSubClientTools@^0.6
|
|
||||||
z3t0/IRremote@^4.2.0
|
|
||||||
robtillaart/DHTNEW@^0.4.18
|
|
||||||
seithan/Easy Nextion Library@^1.0.6
|
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
|
||||||
|
|
||||||
[env:climate_webui]
|
|
||||||
platform = espressif32
|
|
||||||
board = wt32-eth01
|
|
||||||
framework = arduino
|
|
||||||
board_build.f_cpu = 240000000L
|
|
||||||
build_flags = -DENABLE_IR_MODULE -DENABLE_CLIMATE_MODULE -DENABLE_WEBUI
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
|
||||||
knolleary/PubSubClient@^2.8
|
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
|
||||||
arduino-libraries/Arduino_BuiltIn@^1.0.0
|
|
||||||
dersimn/PubSubClientTools@^0.6
|
|
||||||
z3t0/IRremote@^4.2.0
|
|
||||||
robtillaart/DHTNEW@^0.4.18
|
|
||||||
seithan/Easy Nextion Library@^1.0.6
|
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
[env:lcd_webui]
|
|
||||||
platform = espressif32
|
|
||||||
board = wt32-eth01
|
|
||||||
framework = arduino
|
|
||||||
board_build.f_cpu = 240000000L
|
|
||||||
build_flags = -DENABLE_INTERNAL_LCD -DENABLE_WEBUI
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
|
||||||
knolleary/PubSubClient@^2.8
|
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
|
||||||
arduino-libraries/Arduino_BuiltIn@^1.0.0
|
|
||||||
dersimn/PubSubClientTools@^0.6
|
|
||||||
z3t0/IRremote@^4.2.0
|
|
||||||
robtillaart/DHTNEW@^0.4.18
|
|
||||||
seithan/Easy Nextion Library@^1.0.6
|
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
[env:ir_climate_analog_webui]
|
|
||||||
platform = espressif32
|
|
||||||
board = wt32-eth01
|
|
||||||
framework = arduino
|
|
||||||
board_build.f_cpu = 240000000L
|
|
||||||
build_flags = -DENABLE_IR_MODULE -DENABLE_CLIMATE_MODULE -DENABLE_ANALOG_MODULE -DENABLE_WEBUI
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
|
||||||
knolleary/PubSubClient@^2.8
|
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
|
||||||
arduino-libraries/Arduino_BuiltIn@^1.0.0
|
|
||||||
dersimn/PubSubClientTools@^0.6
|
|
||||||
z3t0/IRremote@^4.2.0
|
|
||||||
robtillaart/DHTNEW@^0.4.18
|
|
||||||
seithan/Easy Nextion Library@^1.0.6
|
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
[env:lcd_analog]
|
|
||||||
platform = espressif32
|
|
||||||
board = wt32-eth01
|
|
||||||
framework = arduino
|
|
||||||
board_build.f_cpu = 240000000L
|
|
||||||
build_flags = -DENABLE_INTERNAL_LCD -DENABLE_ANALOG_MODULE
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
|
||||||
knolleary/PubSubClient@^2.8
|
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
|
||||||
arduino-libraries/Arduino_BuiltIn@^1.0.0
|
|
||||||
dersimn/PubSubClientTools@^0.6
|
|
||||||
z3t0/IRremote@^4.2.0
|
|
||||||
robtillaart/DHTNEW@^0.4.18
|
|
||||||
seithan/Easy Nextion Library@^1.0.6
|
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
[env:lcd]
|
|
||||||
platform = espressif32
|
|
||||||
board = wt32-eth01
|
|
||||||
framework = arduino
|
|
||||||
board_build.f_cpu = 240000000L
|
|
||||||
build_flags = -DENABLE_INTERNAL_LCD
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
|
||||||
knolleary/PubSubClient@^2.8
|
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
|
||||||
arduino-libraries/Arduino_BuiltIn@^1.0.0
|
|
||||||
dersimn/PubSubClientTools@^0.6
|
|
||||||
z3t0/IRremote@^4.2.0
|
|
||||||
robtillaart/DHTNEW@^0.4.18
|
|
||||||
seithan/Easy Nextion Library@^1.0.6
|
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
[env:minimal]
|
|
||||||
platform = espressif32
|
|
||||||
board = wt32-eth01
|
|
||||||
framework = arduino
|
|
||||||
board_build.f_cpu = 240000000L
|
|
||||||
lib_deps = siwats/ESPMegaPROR3@^1.3.0
|
|
||||||
knolleary/PubSubClient@^2.8
|
|
||||||
ivanseidel/ArduinoThread@^2.1.1
|
|
||||||
arduino-libraries/Arduino_BuiltIn@^1.0.0
|
|
||||||
dersimn/PubSubClientTools@^0.6
|
|
||||||
z3t0/IRremote@^4.2.0
|
|
||||||
robtillaart/DHTNEW@^0.4.18
|
|
||||||
seithan/Easy Nextion Library@^1.0.6
|
|
||||||
robtillaart/FRAM_I2C@^0.6.1
|
|
||||||
esphome/ESPAsyncWebServer-esphome@^3.1.0
|
|
|
@ -1837,7 +1837,6 @@ void set_mqtt_useauth(bool use_auth)
|
||||||
ESPMega_FRAM.write8(FRAM_ADDRESS_MQTT_USEAUTH, MQTT_USE_AUTH);
|
ESPMega_FRAM.write8(FRAM_ADDRESS_MQTT_USEAUTH, MQTT_USE_AUTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_WEBUI
|
|
||||||
void set_webui_username(String username)
|
void set_webui_username(String username)
|
||||||
{
|
{
|
||||||
username.toCharArray(WEBUI_USERNAME, 32);
|
username.toCharArray(WEBUI_USERNAME, 32);
|
||||||
|
@ -1849,7 +1848,6 @@ void set_webui_password(String password)
|
||||||
password.toCharArray(WEBUI_PASSWORD, 32);
|
password.toCharArray(WEBUI_PASSWORD, 32);
|
||||||
ESPMega_FRAM.write(FRAM_ADDRESS_WEBUI_PASSWORD, (uint8_t *)WEBUI_PASSWORD, 32);
|
ESPMega_FRAM.write(FRAM_ADDRESS_WEBUI_PASSWORD, (uint8_t *)WEBUI_PASSWORD, 32);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Resets the device to factory default settings.
|
* @brief Resets the device to factory default settings.
|
||||||
|
@ -1886,10 +1884,8 @@ void factory_reset()
|
||||||
set_ip("192.168.0.10");
|
set_ip("192.168.0.10");
|
||||||
set_gw("192.168.0.1");
|
set_gw("192.168.0.1");
|
||||||
set_netmask("255.255.255.0");
|
set_netmask("255.255.255.0");
|
||||||
#ifdef ENABLE_WEBUI
|
|
||||||
set_webui_username("admin");
|
set_webui_username("admin");
|
||||||
set_webui_password("admin");
|
set_webui_password("admin");
|
||||||
#endif
|
|
||||||
|
|
||||||
// Reboot
|
// Reboot
|
||||||
#ifdef ENABLE_INTERNAL_LCD
|
#ifdef ENABLE_INTERNAL_LCD
|
||||||
|
|
|
@ -19,12 +19,11 @@
|
||||||
#define VIRTUAL_INTERRUPT_PRELOAD // Preload Virtual Interrupts buffer
|
#define VIRTUAL_INTERRUPT_PRELOAD // Preload Virtual Interrupts buffer
|
||||||
|
|
||||||
// Enable Software Module(s)
|
// Enable Software Module(s)
|
||||||
// Deprecated. Use Build Flags instead.
|
#define ENABLE_INTERNAL_LCD
|
||||||
// #define ENABLE_INTERNAL_LCD
|
#define ENABLE_IR_MODULE
|
||||||
// #define ENABLE_IR_MODULE
|
#define ENABLE_CLIMATE_MODULE // Require IR Module
|
||||||
// #define ENABLE_CLIMATE_MODULE // Require IR Module
|
//#define ENABLE_ANALOG_MODULE
|
||||||
// #define ENABLE_ANALOG_MODULE
|
#define ENABLE_WEBUI
|
||||||
// #define ENABLE_WEBUI
|
|
||||||
|
|
||||||
// IR Kit Configuration
|
// IR Kit Configuration
|
||||||
#define IR_RECIEVE_PIN 35
|
#define IR_RECIEVE_PIN 35
|
||||||
|
|
Loading…
Reference in New Issue