[platformio]
default_envs = esp8266_4mb
data_dir = data_svelte

[common_env_data]
lib_deps_external = 
	bblanchon/ArduinoJson @6.18.0
	knolleary/PubSubClient

[env]
extra_scripts = pre:tools/prebuildscript.py

[env:esp8266_1mb_ota]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp8266_1mb_ota_fromitems.lib_deps}
	ESPAsyncUDP
build_flags = -Desp8266_1mb_ota="esp8266_1mb_ota"
framework = arduino
board = nodemcuv2
board_build.ldscript = eagle.flash.1m64.ld
platform = espressif8266 @4.0.1
monitor_filters = esp8266_exception_decoder
upload_speed = 921600
monitor_speed = 115200
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp8266_1mb_ota_fromitems.build_src_filter}

[env:esp8266_1mb]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp8266_1mb_fromitems.lib_deps}
	ESPAsyncUDP
build_flags = -Desp8266_1mb="esp8266_1mb"
framework = arduino
board = nodemcuv2
board_build.ldscript = eagle.flash.1m256.ld
platform = espressif8266 @4.0.1
monitor_filters = esp8266_exception_decoder
upload_speed = 921600
monitor_speed = 115200
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp8266_1mb_fromitems.build_src_filter}

[env:esp8285_1mb_ota]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp8285_1mb_ota_fromitems.lib_deps}
	ESPAsyncUDP
build_flags = -Desp8266_1mb_ota="esp8266_1mb_ota"
framework = arduino
board = esp8285
board_build.ldscript = eagle.flash.1m64.ld
platform = espressif8266 @4.0.1
monitor_filters = esp8266_exception_decoder
upload_speed = 921600
monitor_speed = 115200
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp8285_1mb_ota_fromitems.build_src_filter}

[env:esp8266_2mb]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp8266_2mb_fromitems.lib_deps}
	ESPAsyncUDP
build_flags = -Desp8266_2mb="esp8266_2mb"
framework = arduino
board = d1_wroom_02
board_build.ldscript = eagle.flash.2m1m.ld
platform = espressif8266 @4.2.0
monitor_filters = esp8266_exception_decoder
upload_speed = 921600
monitor_speed = 115200
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp8266_2mb_fromitems.build_src_filter}

[env:esp8266_2mb_ota]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp8266_2mb_ota_fromitems.lib_deps}
	ESPAsyncUDP
build_flags = -Desp8266_2mb_ota="esp8266_2mb_ota"
framework = arduino
board = d1_wroom_02
board_build.ldscript = eagle.flash.2m256.ld
platform = espressif8266 @4.2.0
monitor_filters = esp8266_exception_decoder
upload_speed = 921600
monitor_speed = 115200
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp8266_2mb_ota_fromitems.build_src_filter}

[env:esp8285_1mb]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp8285_1mb_fromitems.lib_deps}
	ESPAsyncUDP
build_flags = -Desp8266_1mb="esp8266_1mb"
framework = arduino
board = esp8285
board_build.ldscript = eagle.flash.1m256.ld
platform = espressif8266 @4.0.1
monitor_filters = esp8266_exception_decoder
upload_speed = 921600
monitor_speed = 115200
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp8285_1mb_fromitems.build_src_filter}

[env:esp8266_4mb]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp8266_4mb_fromitems.lib_deps}
	ESPAsyncUDP
build_flags = -Desp8266_4mb="esp8266_4mb"
framework = arduino
board = nodemcuv2
board_build.ldscript = eagle.flash.4m1m.ld
platform = espressif8266 @4.0.1
monitor_filters = esp8266_exception_decoder
upload_speed = 921600
monitor_speed = 115200
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp8266_4mb_fromitems.build_src_filter}

[env:esp8266_16mb]
extra_scripts = pre:tools/patch8266_16m.py
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp8266_16mb_fromitems.lib_deps}
	ESPAsyncUDP
build_flags = -Desp8266_16mb="esp8266_16mb"
framework = arduino
board = nodemcuv2
platform = espressif8266 @4.0.1
board_build.ldscript = eagle.flash.16m14m.ld
monitor_filters = esp8266_exception_decoder
upload_speed = 921600
monitor_speed = 115200
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp8266_16mb_fromitems.build_src_filter}

[env:esp32_4mb]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp32_4mb_fromitems.lib_deps}
build_flags = -Desp32_4mb="esp32_4mb"
framework = arduino
board = esp32dev
platform = espressif32 @5.1.1
monitor_filters = esp32_exception_decoder
upload_speed = 921600
monitor_speed = 115200
debug_tool = esp-prog
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp32_4mb_fromitems.build_src_filter}

[env:esp32cam_4mb]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp32cam_4mb_fromitems.lib_deps}
build_flags = 
	-Desp32cam_4mb="esp32cam_4mb"
	-DBOARD_HAS_PSRAM
	-mfix-esp32-psram-cache-issue
framework = arduino
board = esp32cam
platform = espressif32 @5.1.1
monitor_filters = esp32_exception_decoder
upload_speed = 921600
monitor_speed = 115200
debug_tool = esp-prog
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp32cam_4mb_fromitems.build_src_filter}

[env:esp32s2_4mb]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp32s2_4mb_fromitems.lib_deps}
build_flags = 
	-Desp32s2_4mb="esp32s2_4mb"
	-DARDUINO_USB_CDC_ON_BOOT=1
	-DARDUINO_USB_MODE=0
framework = arduino
board = lolin_s2_mini
platform = espressif32 @6.3.1
monitor_filters = esp32_exception_decoder
upload_speed = 921600
monitor_speed = 115200
debug_tool = esp-prog
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp32s2_4mb_fromitems.build_src_filter}

[env:esp32_16mb]
lib_deps = 
	${common_env_data.lib_deps_external}
	${env:esp32_16mb_fromitems.lib_deps}
build_flags = -Desp32_16mb="esp32_16mb"
framework = arduino
board = esp32dev
platform = espressif32 @5.1.1
monitor_filters = esp32_exception_decoder
upload_port = COM11
upload_speed = 921600
monitor_speed = 115200
debug_tool = esp-prog
board_build.partitions = tools/large_spiffs_16MB.csv
board_upload.flash_size = 16MB
board_build.filesystem = littlefs
build_src_filter = 
	+<*.cpp>
	+<classes/*.cpp>
	+<utils/*.cpp>
	+<modules/*.cpp>
	${env:esp32_16mb_fromitems.build_src_filter}

[env:esp8266_1mb_ota_fromitems]
lib_deps = 
	adafruit/Adafruit BME280 Library
	adafruit/Adafruit BMP280 Library
	https://github.com/milesburton/Arduino-Temperature-Control-Library
	https://github.com/tremaru/iarduino_RTC
	robtillaart/SHT2x@^0.1.1
	WEMOS SHT3x@1.0.0
	plerup/EspSoftwareSerial
	adafruit/Adafruit MCP23017 Arduino Library@^2.1.0
	adafruit/Adafruit BusIO @ ^1.13.2
	adafruit/Adafruit BusIO @ ^1.13.2
	https://github.com/robotclass/RobotClass_LiquidCrystal_I2C
	marcoschwartz/LiquidCrystal_I2C@^1.1.4
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/sensors/Acs712>
	+<modules/sensors/AnalogAdc>
	+<modules/sensors/Bme280>
	+<modules/sensors/Bmp280>
	+<modules/sensors/Ds18b20>
	+<modules/sensors/Impulse>
	+<modules/sensors/Pzem004t>
	+<modules/sensors/RTC>
	+<modules/sensors/Sht20>
	+<modules/sensors/Sht30>
	+<modules/sensors/Sonar>
	+<modules/sensors/UART>
	+<modules/exec/ButtonIn>
	+<modules/exec/ButtonOut>
	+<modules/exec/Mcp23017>
	+<modules/exec/Multitouch>
	+<modules/exec/Pcf8574>
	+<modules/exec/Pwm8266>
	+<modules/exec/TelegramLT>
	+<modules/display/Lcd2004>

[env:esp8266_1mb_fromitems]
lib_deps = 
	adafruit/Adafruit BME280 Library
	adafruit/Adafruit BMP280 Library
	https://github.com/milesburton/Arduino-Temperature-Control-Library
	https://github.com/tremaru/iarduino_RTC
	robtillaart/SHT2x@^0.1.1
	WEMOS SHT3x@1.0.0
	plerup/EspSoftwareSerial
	gyverlibs/EncButton @ ^2.0
	adafruit/Adafruit MCP23017 Arduino Library@^2.1.0
	adafruit/Adafruit BusIO @ ^1.13.2
	adafruit/Adafruit BusIO @ ^1.13.2
	https://github.com/robotclass/RobotClass_LiquidCrystal_I2C
	marcoschwartz/LiquidCrystal_I2C@^1.1.4
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/sensors/A02Distance>
	+<modules/sensors/Acs712>
	+<modules/sensors/AnalogAdc>
	+<modules/sensors/Bme280>
	+<modules/sensors/Bmp280>
	+<modules/sensors/Ds18b20>
	+<modules/sensors/Impulse>
	+<modules/sensors/Ntc>
	+<modules/sensors/Pzem004t>
	+<modules/sensors/RTC>
	+<modules/sensors/Sht20>
	+<modules/sensors/Sht30>
	+<modules/sensors/Sonar>
	+<modules/sensors/UART>
	+<modules/exec/ButtonIn>
	+<modules/exec/ButtonOut>
	+<modules/exec/Buzzer>
	+<modules/exec/Enconder>
	+<modules/exec/Mcp23017>
	+<modules/exec/Multitouch>
	+<modules/exec/Pcf8574>
	+<modules/exec/Pwm8266>
	+<modules/exec/TelegramLT>
	+<modules/display/Lcd2004>

[env:esp8266_2mb_fromitems]
lib_deps = 
	plerup/EspSoftwareSerial
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/sensors/Pzem004t>
	+<modules/sensors/UART>
	+<modules/exec/TelegramLT>

[env:esp8266_2mb_ota_fromitems]
lib_deps = 
	adafruit/Adafruit BME280 Library
	plerup/EspSoftwareSerial
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/sensors/Bme280>
	+<modules/sensors/Pzem004t>
	+<modules/sensors/UART>
	+<modules/exec/TelegramLT>

[env:esp8285_1mb_ota_fromitems]
lib_deps = 
	milesburton/DallasTemperature@^3.9.1
	adafruit/Adafruit MCP23017 Arduino Library@^2.1.0
	adafruit/Adafruit BusIO @ ^1.13.2
	adafruit/Adafruit BusIO @ ^1.13.2
	marcoschwartz/LiquidCrystal_I2C@^1.1.4
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VButton>
	+<modules/sensors/Ds18b20>
	+<modules/sensors/Sonar>
	+<modules/exec/ButtonIn>
	+<modules/exec/ButtonOut>
	+<modules/exec/Mcp23017>
	+<modules/exec/Multitouch>
	+<modules/exec/Pcf8574>
	+<modules/exec/Pwm8266>
	+<modules/exec/TelegramLT>
	+<modules/display/Lcd2004>

[env:esp8285_1mb_fromitems]
lib_deps = 
	adafruit/Adafruit BME280 Library
	adafruit/Adafruit BMP280 Library
	https://github.com/milesburton/Arduino-Temperature-Control-Library
	https://github.com/tremaru/iarduino_RTC
	robtillaart/SHT2x@^0.1.1
	WEMOS SHT3x@1.0.0
	plerup/EspSoftwareSerial
	gyverlibs/EncButton @ ^2.0
	adafruit/Adafruit MCP23017 Arduino Library@^2.1.0
	adafruit/Adafruit BusIO @ ^1.13.2
	adafruit/Adafruit BusIO @ ^1.13.2
	https://github.com/robotclass/RobotClass_LiquidCrystal_I2C
	marcoschwartz/LiquidCrystal_I2C@^1.1.4
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/sensors/A02Distance>
	+<modules/sensors/Acs712>
	+<modules/sensors/AnalogAdc>
	+<modules/sensors/Bme280>
	+<modules/sensors/Bmp280>
	+<modules/sensors/Ds18b20>
	+<modules/sensors/Impulse>
	+<modules/sensors/Ntc>
	+<modules/sensors/Pzem004t>
	+<modules/sensors/RTC>
	+<modules/sensors/Sht20>
	+<modules/sensors/Sht30>
	+<modules/sensors/Sonar>
	+<modules/sensors/UART>
	+<modules/exec/ButtonIn>
	+<modules/exec/ButtonOut>
	+<modules/exec/Buzzer>
	+<modules/exec/Enconder>
	+<modules/exec/Mcp23017>
	+<modules/exec/Multitouch>
	+<modules/exec/Pcf8574>
	+<modules/exec/Pwm8266>
	+<modules/exec/TelegramLT>
	+<modules/display/Lcd2004>

[env:esp8266_4mb_fromitems]
lib_deps = 
	https://github.com/enjoyneering/AHTxx.git
	adafruit/Adafruit BME280 Library
	adafruit/Adafruit BMP280 Library
	beegee-tokyo/DHT sensor library for ESPx
	https://github.com/milesburton/Arduino-Temperature-Control-Library
	https://github.com/tremaru/iarduino_RTC
	robtillaart/SHT2x@^0.1.1
	WEMOS SHT3x@1.0.0
	plerup/EspSoftwareSerial
	gyverlibs/EncButton @ ^2.0
	adafruit/Adafruit MCP23017 Arduino Library@^2.1.0
	adafruit/Adafruit BusIO @ ^1.13.2
	dfrobot/DFRobotDFPlayerMini @ ^1.0.5
	adafruit/Adafruit BusIO @ ^1.13.2
	https://github.com/robotclass/RobotClass_LiquidCrystal_I2C
	marcoschwartz/LiquidCrystal_I2C@^1.1.4
	https://github.com/stblassitude/Adafruit_SSD1306_Wemos_OLED
	https://github.com/adafruit/Adafruit-GFX-Library
	https://github.com/maxint-rd/TM16xx
	adafruit/Adafruit GFX Library @ ^1.11.5
	adafruit/Adafruit BusIO @ ^1.13.2
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/sensors/A02Distance>
	+<modules/sensors/Acs712>
	+<modules/sensors/AhtXX>
	+<modules/sensors/AnalogAdc>
	+<modules/sensors/Bme280>
	+<modules/sensors/Bmp280>
	+<modules/sensors/Dht1122>
	+<modules/sensors/Ds18b20>
	+<modules/sensors/Impulse>
	+<modules/sensors/Pzem004t>
	+<modules/sensors/RTC>
	+<modules/sensors/S8>
	+<modules/sensors/Sht20>
	+<modules/sensors/Sht30>
	+<modules/sensors/Sonar>
	+<modules/sensors/UART>
	+<modules/exec/ButtonIn>
	+<modules/exec/ButtonOut>
	+<modules/exec/Buzzer>
	+<modules/exec/Enconder>
	+<modules/exec/IoTServo>
	+<modules/exec/Mcp23017>
	+<modules/exec/Mp3>
	+<modules/exec/Multitouch>
	+<modules/exec/Pcf8574>
	+<modules/exec/Pwm8266>
	+<modules/exec/TelegramLT>
	+<modules/display/Lcd2004>
	+<modules/display/Oled64>
	+<modules/display/TM16XX>

[env:esp32_4mb_fromitems]
lib_deps = 
	https://github.com/enjoyneering/AHTxx.git
	adafruit/Adafruit BME280 Library
	adafruit/Adafruit BMP280 Library
	beegee-tokyo/DHT sensor library for ESPx
	https://github.com/milesburton/Arduino-Temperature-Control-Library
	https://github.com/tremaru/iarduino_RTC
	robtillaart/SHT2x@^0.1.1
	WEMOS SHT3x@1.0.0
	plerup/EspSoftwareSerial
	gyverlibs/EncButton @ ^2.0
	https://github.com/RoboticsBrno/ServoESP32#v1.0.3
	adafruit/Adafruit MCP23017 Arduino Library@^2.1.0
	adafruit/Adafruit BusIO @ ^1.13.2
	dfrobot/DFRobotDFPlayerMini @ ^1.0.5
	adafruit/Adafruit BusIO @ ^1.13.2
	https://github.com/robotclass/RobotClass_LiquidCrystal_I2C
	marcoschwartz/LiquidCrystal_I2C@^1.1.4
	https://github.com/stblassitude/Adafruit_SSD1306_Wemos_OLED
	https://github.com/adafruit/Adafruit-GFX-Library
	https://github.com/maxint-rd/TM16xx
	adafruit/Adafruit GFX Library @ ^1.11.5
	adafruit/Adafruit BusIO @ ^1.13.2
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/sensors/Acs712>
	+<modules/sensors/AhtXX>
	+<modules/sensors/AnalogAdc>
	+<modules/sensors/Bme280>
	+<modules/sensors/Bmp280>
	+<modules/sensors/Dht1122>
	+<modules/sensors/Ds18b20>
	+<modules/sensors/Impulse>
	+<modules/sensors/Pzem004t>
	+<modules/sensors/RTC>
	+<modules/sensors/S8>
	+<modules/sensors/Sht20>
	+<modules/sensors/Sht30>
	+<modules/sensors/Sonar>
	+<modules/sensors/UART>
	+<modules/exec/ButtonIn>
	+<modules/exec/ButtonOut>
	+<modules/exec/Buzzer>
	+<modules/exec/Enconder>
	+<modules/exec/IoTServo>
	+<modules/exec/Mcp23017>
	+<modules/exec/Mp3>
	+<modules/exec/Multitouch>
	+<modules/exec/Pcf8574>
	+<modules/exec/Pwm32>
	+<modules/exec/TelegramLT>
	+<modules/display/Lcd2004>
	+<modules/display/Oled64>
	+<modules/display/Smi2_m>
	+<modules/display/TM16XX>

[env:esp32cam_4mb_fromitems]
lib_deps = 
	espressif/esp32-camera @ ^2.0.0
	gyverlibs/FastBot
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/exec/EspCam>
	+<modules/exec/Telegram_v2>

[env:esp32s2_4mb_fromitems]
lib_deps = 
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/sensors/Ina219>
	+<modules/exec/Ftp>
	+<modules/exec/TelegramLT>

[env:esp8266_16mb_fromitems]
lib_deps = 
	gyverlibs/EncButton @ ^2.0
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VariableColor>
	+<modules/virtual/VButton>
	+<modules/exec/ButtonIn>
	+<modules/exec/ButtonOut>
	+<modules/exec/Enconder>
	+<modules/exec/TelegramLT>

[env:esp32_16mb_fromitems]
lib_deps = 
build_src_filter = 
	+<modules/virtual/Cron>
	+<modules/virtual/Loging>
	+<modules/virtual/LogingDaily>
	+<modules/virtual/Timer>
	+<modules/virtual/Variable>
	+<modules/virtual/VButton>
	+<modules/exec/ButtonOut>
	+<modules/exec/TelegramLT>

