[platformio]
src_dir = .

[env]
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
build_flags = ; -DMQTT_BUFFER_SIZE=768 -D_IR_LOCALE_=en-AU
framework = arduino
platform = espressif8266
monitor_speed = 115200

[common]
lib_deps_builtin =
lib_deps_external =
  PubSubClient@>=2.8.0
  ArduinoJson@>=6.0
# Uncomment the following to enable SHT-3x support.
#  https://github.com/wemos/WEMOS_SHT3x_Arduino_Library.git

[common_esp8266]
lib_deps_external =
  ${common.lib_deps_builtin}
  ${common.lib_deps_external}
  WifiManager@>=0.14

[common_esp32]
lib_deps_external =
  ${common.lib_deps_builtin}
  ${common.lib_deps_external}
  https://github.com/tzapu/WiFiManager.git#master

[env:nodemcuv2]
board = nodemcuv2
lib_deps = ${common_esp8266.lib_deps_external}

[env:d1_mini]
board = d1_mini
lib_deps = ${common_esp8266.lib_deps_external}

[env:d1_mini_noMDNS]
board = d1_mini
build_flags =
  ${env.build_flags}
  -DMQTT_SERVER_AUTODETECT_ENABLE=false
  -DMDNS_ENABLE=false
lib_deps = ${common_esp8266.lib_deps_external}

[env:d1_mini_no_mqtt]
board = d1_mini
build_flags =
  ${env.build_flags}
  -DMQTT_ENABLE=false
lib_deps = ${common_esp8266.lib_deps_external}

[env:esp32dev]
platform = espressif32
board = esp32dev
lib_deps = ${common_esp32.lib_deps_external}

[env:esp01_1m]
board = esp01_1m
board_build.ldscript = eagle.flash.1m64.ld
lib_deps = ${common_esp8266.lib_deps_external}

; This is just to help enable swapping IRMQTTServer via OTA on platforms with
; limited flash space. It doesn't do *ANY* IR stuff. It has almost everything
; turned off except OTA over http.
; Produces a ".bin" file of ~380k.
[env:esp8266_1m_OTA_minimal]
board = esp01_1m
board_build.ldscript = eagle.flash.1m64.ld
build_flags =
  ${env.build_flags}
  -DMQTT_ENABLE=false
  -D_IR_ENABLE_DEFAULT_=false
  -DEXAMPLES_ENABLE=false
  -DMDNS_ENABLE=false
  -DUSE_DECODED_AC_SETTINGS=false
lib_deps = ${common_esp8266.lib_deps_external}
