Files
OpenMQTTGateway/platformio.ini
2020-05-07 17:28:27 -05:00

646 lines
17 KiB
INI

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = main
extra_configs =
tests/*_env.ini
*_env.ini
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ENVIRONMENT CHOICE ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Uncomment the env line corresponding to your board and modules required, ;
;you can also adapt the modules by removing the corresponding lines in the env detail ;
; if you go to the build flag section of your env you will see that some user_config.h ;
; parameters can be overwritten here, for example the gateway name. ;
; If you want to avoid the lost of your environments at each update you can put them ;
; into a separate file called prod_env.ini, it will be automatically read by pio ;
; an example (prod_env.ini.example) is available into the same folder as this file. ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;default_envs = sonoff-basic-rfr3
;default_envs = sonoff-basic
;default_envs = rfbridge
;default_envs = esp32dev-all
;default_envs = esp32dev-rf
;default_envs = esp32dev-pilight
;default_envs = esp32dev-pilight-cc1101
;default_envs = esp32dev-weatherstation
;default_envs = esp32dev-ir
;default_envs = esp32dev-ble
;default_envs = esp32-m5stick-ble
;default_envs = esp32-m5stack-ble
;default_envs = esp32-m5stick-c-ble
;default_envs = ttgo-lora32-v1
;default_envs = nodemcuv2-rf
;default_envs = nodemcuv2-rf-cc1101
;default_envs = rf-wifi-gateway
;default_envs = nodemcuv2-rf2
;default_envs = nodemcuv2-rf2-cc1101
;default_envs = nodemcuv2-pilight
;default_envs = nodemcuv2-weatherstation
;default_envs = nodemcuv2-ir
;default_envs = nodemcuv2-ble
;default_envs = nodemcuv2-all
;default_envs = uno-rf
;default_envs = uno-fastled
;default_envs = atmega-all
;default_envs = test-manual-wifi
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ENVIRONMENTS PARAMETERS ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Libraries and parameters shared accross environements ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[libraries]
arduinojson = ArduinoJson@5.13.4
arduinolog = 1technophile/Arduino-Log#d13cd80
pubsubclient = PubSubClient@2.7
rc-switch = 1technophile/rc-switch#90adb34
newremoteswitch = 1technophile/NewRemoteSwitch#8eb980e
ble = eos1d3/ESP32_BLE#9d6c1ed
irremoteesp = IRremoteESP8266@2.7.0
irremote = IRremote
lora = sandeepmistry/arduino-LoRa#f4a1d27
esppilight = ESPiLight@0.16.2
rfWeatherStation = WeatherStationDataRx@0.3.1
rfm69 = RFM69@4a6f77ad47
dht = DHT sensor library@1.3.0
unifiedsensor = Adafruit Unified Sensor@1.0.2
tsl2561 = Adafruit TSL2561@1.0.3
bme280 = SparkFun BME280@2.0.4
bmp180 = BMP180@efac46bd8d
htu21 = SparkFun HTU21D Humidity and Temperature Sensor Br@1.1.3
ina226 = jarzebski/Arduino-INA226#968a684
a6lib = 1technophile/A6lib
wifimanager = tzapu/WiFiManager#c3ff582
ethernet = Ethernet
esp8266_mdns = esp8266_mdns
wire = Wire
fastled = FastLED@3.3.2
onewire = OneWire
dallastemperature = DallasTemperature
m5stickc = M5StickC@0.2.0
m5stack = M5Stack@0.3.0
smartrc-cc1101-driver-lib = SmartRC-CC1101-Driver-Lib@2.3.5
[env]
framework = arduino
lib_deps =
${libraries.pubsubclient}
${libraries.arduinojson}
${libraries.arduinolog}
build_flags =
-w ; supress all warnings
'-DjsonPublishing=true'
'-DjsonReceiving=true'
monitor_speed = 115200
[com]
esp8266_platform = espressif8266@2.2.3
esp32_platform = espressif32@1.11.1
atmelavr_platform = atmelavr@1.13.0
[com-esp]
lib_deps =
${env.lib_deps}
${libraries.wifimanager}
build_flags =
${env.build_flags}
-DMQTT_MAX_PACKET_SIZE=1024
'-DsimpleReceiving=true'
'-DZmqttDiscovery="HADiscovery"'
'-DTRACE=1'
;'-DCORE_DEBUG_LEVEL=4'
[com-arduino]
lib_deps =
${env.lib_deps}
${libraries.ethernet}
build_flags =
${env.build_flags}
-DMQTT_MAX_PACKET_SIZE=1024
'-DsimpleReceiving=true'
'-DZmqttDiscovery="HADiscovery"'
'-DTRACE=1'
[com-arduino-low-memory]
lib_deps =
${env.lib_deps}
${libraries.ethernet}
build_flags =
${env.build_flags}
-DMQTT_MAX_PACKET_SIZE=128
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ENVIRONMENTS LIST ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;List of environments that can be build ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[env:rfbridge]
platform = ${com.esp8266_platform}
board = esp8285
lib_deps =
${com-esp.lib_deps}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewaySRFB="SRFB"'
'-DGateway_Name="OpenMQTTGateway_SRFB"'
board_build.flash_mode = dout
[env:esp32dev-all]
platform = ${com.esp32_platform}
board = esp32dev
board_build.partitions = min_spiffs.csv
lib_deps =
${com-esp.lib_deps}
${libraries.ble}
${libraries.irremoteesp}
${libraries.lora}
${libraries.rfm69}
${libraries.rc-switch}
${libraries.newremoteswitch}
${libraries.bme280}
${libraries.bmp180}
${libraries.htu21}
${libraries.unifiedsensor}
${libraries.dht}
${libraries.tsl2561}
${libraries.ina226}
${libraries.fastled}
${libraries.onewire}
${libraries.dallastemperature}
${libraries.rfWeatherStation}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DZgatewayLORA="LORA"'
'-DZgatewayRF2="RF2"'
'-DZgatewayIR="IR"'
'-DZgatewayBT="BT"'
'-DZactuatorONOFF="ONOFF"'
'-DZactuatorFASTLED="FASTLED"'
'-DZsensorINA226="INA226"'
'-DZsensorHCSR501="HCSR501"'
'-DZsensorADC="ADC"'
'-DZsensorBH1750="BH1750"'
'-DZsensorBME280="BME280"'
'-DZsensorHTU21="HTU21"'
'-DZsensorTSL2561="TSL2561"'
'-DZsensorDHT="DHT"'
'-DZsensorDS1820="DS1820"'
'-DZgatewayRFM69="RFM69"'
'-DZsensorGPIOInput="GPIOInput"'
'-DZsensorGPIOKeyCode="GPIOKeyCode"'
'-DZgatewayWeatherStation="WeatherStation"'
'-DsimplePublishing=true'
'-DGateway_Name="OpenMQTTGateway_ESP32_ALL"'
[env:esp32dev-rf]
platform = ${com.esp32_platform}
board = esp32dev
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_ESP32_RF"'
[env:esp32dev-pilight]
platform = ${com.esp32_platform}
board = esp32dev
lib_deps =
${com-esp.lib_deps}
${libraries.esppilight}
build_flags =
${com-esp.build_flags}
'-DZgatewayPilight="Pilight"'
'-DGateway_Name="OpenMQTTGateway_ESP32_Pilight"'
[env:esp32dev-pilight-cc1101]
platform = ${com.esp32_platform}
board = esp32dev
lib_deps =
${com-esp.lib_deps}
${libraries.esppilight}
${libraries.smartrc-cc1101-driver-lib}
build_flags =
${com-esp.build_flags}
'-DZgatewayPilight="Pilight"'
'-DZradioCC1101="CC1101"'
'-DGateway_Name="OpenMQTTGateway_ESP32_Pilight-CC1101"'
[env:esp32dev-weatherstation]
platform = ${com.esp32_platform}
board = esp32dev
lib_deps =
${com-esp.lib_deps}
${libraries.rfWeatherStation}
build_flags =
${com-esp.build_flags}
'-DZgatewayWeatherStation="WeatherStation"'
'-DGateway_Name="OpenMQTTGateway_ESP32_WeatherStation"'
[env:esp32dev-ir]
platform = ${com.esp32_platform}
board = esp32dev
lib_deps =
${com-esp.lib_deps}
${libraries.irremoteesp}
build_flags =
${com-esp.build_flags}
'-DZgatewayIR="IR"'
'-DGateway_Name="OpenMQTTGateway_ESP32_IR"'
[env:esp32dev-ble]
platform = ${com.esp32_platform}
board = esp32dev
board_build.partitions = min_spiffs.csv
lib_deps =
${com-esp.lib_deps}
${libraries.ble}
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DLOW_POWER_LED=2'
'-DLOW_POWER_LED_OFF=1'
'-DGateway_Name="OpenMQTTGateway_ESP32_BLE"'
[env:esp32-m5stick-ble]
platform = ${com.esp32_platform}
board = m5stack-core-esp32
board_build.partitions = min_spiffs.csv
lib_deps =
${com-esp.lib_deps}
${libraries.ble}
${libraries.irremoteesp}
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DZgatewayIR="IR"'
'-DLOW_POWER_LED=19'
'-DLOW_POWER_LED_OFF=0'
'-DTRIGGER_PIN=35'
'-DIR_EMITTER_PIN=17'
'-DGateway_Name="OpenMQTTGateway_ESP32_M5STICK_BLE_IR"'
board_upload.speed = 921600
[env:esp32-m5stack-ble]
platform = ${com.esp32_platform}
board = m5stack-core-esp32
board_build.partitions = min_spiffs.csv
lib_deps =
${com-esp.lib_deps}
${libraries.m5stack}
${libraries.ble}
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DZsensorGPIOInput="GPIOInput"'
'-DZboardM5STACK="M5Stack"'
'-DLOW_POWER_LED=15'
'-DTRIGGER_PIN=37'
'-DSLEEP_BUTTON=38'
'-DGPIOInput_PIN=39'
'-DGateway_Name="OpenMQTTGateway_ESP32_M5STACK_BLE"'
board_upload.speed = 921600
[env:esp32-m5stick-c-ble]
platform = ${com.esp32_platform}
board = m5stick-c
board_build.partitions = min_spiffs.csv
lib_deps =
${com-esp.lib_deps}
${libraries.ble}
${libraries.m5stickc}
${libraries.irremoteesp}
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DZgatewayIR="IR"'
'-DZsensorGPIOInput="GPIOInput"'
'-DZboardM5STICKC="M5StickC"'
'-DACTUATOR_ONOFF_PIN=10'
'-DGPIOInput_PIN=37'
'-DLOW_POWER_LED=10'
'-DLOW_POWER_LED_OFF=1'
'-DSLEEP_BUTTON=39'
'-DTRIGGER_PIN=39'
'-DIR_EMITTER_PIN=9'
'-DGateway_Name="OpenMQTTGateway_ESP32_M5STICK_C_BLE_IR"'
board_upload.speed = 1500000
[env:ttgo-lora32-v1]
platform = ${com.esp32_platform}
board = ttgo-lora32-v1
lib_deps =
${com-esp.lib_deps}
${libraries.lora}
build_flags =
${com-esp.build_flags}
'-DZgatewayLORA="LORA"'
'-DGateway_Name="OpenMQTTGateway_ESP32_LORA"'
[env:nodemcuv2-all]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.esppilight}
${libraries.irremoteesp}
${libraries.rfm69}
${libraries.rc-switch}
${libraries.a6lib}
${libraries.newremoteswitch}
${libraries.bme280}
${libraries.bmp180}
${libraries.htu21}
${libraries.unifiedsensor}
${libraries.dht}
${libraries.tsl2561}
${libraries.ina226}
${libraries.esp8266_mdns}
${libraries.wire}
${libraries.fastled}
${libraries.onewire}
${libraries.dallastemperature}
${libraries.rfWeatherStation}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DZgatewayRF2="RF2"'
'-DZgatewayIR="IR"'
'-DZgatewayBT="BT"'
'-DZgateway2G="2G"'
'-DZgatewayPilight="Pilight"'
'-DZactuatorONOFF="ONOFF"'
'-DZactuatorFASTLED="FASTLED"'
'-DZsensorINA226="INA226"'
'-DZsensorHCSR501="HCSR501"'
'-DZsensorHCSR04="HCSR04"'
'-DZsensorADC="ADC"'
'-DZsensorBH1750="BH1750"'
'-DZsensorBME280="BME280"'
'-DZsensorHTU21="HTU21"'
'-DZsensorTSL2561="TSL2561"'
'-DZsensorDHT="DHT"'
'-DZsensorDS1820="DS1820"'
'-DZgatewayRFM69="RFM69"'
'-DZsensorGPIOInput="GPIOInput"'
'-DZsensorGPIOKeyCode="GPIOKeyCode"'
'-DZgatewayWeatherStation="WeatherStation"'
'-DsimplePublishing=true'
'-DGateway_Name="OpenMQTTGateway_ESP8266_ALL"'
board_build.flash_mode = dout
[env:nodemcuv2-ble]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.wire}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_BLE"'
board_build.flash_mode = dout
[env:nodemcuv2-ir]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.irremoteesp}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayIR="IR"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_IR"'
board_build.flash_mode = dout
[env:nodemcuv2-rf]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF"'
board_build.flash_mode = dout
[env:nodemcuv2-rf-cc1101]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.smartrc-cc1101-driver-lib}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DZradioCC1101="CC1101"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF-CC1101"'
board_build.flash_mode = dout
[env:test-manual-wifi]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DESPWifiManualSetup=true'
'-DGateway_Name="OpenMQTTGateway_TEST_MANUAL_WIFI"'
board_build.flash_mode = dout
[env:rf-wifi-gateway]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF_WIFI_GW"'
'-DRF_RECEIVER_PIN=5'
board_build.flash_mode = dout
[env:nodemcuv2-rf2]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.newremoteswitch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF2="RF2"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF2"'
board_build.flash_mode = dout
[env:nodemcuv2-rf2-cc1101]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.newremoteswitch}
${libraries.smartrc-cc1101-driver-lib}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF2="RF2"'
'-DZradioCC1101="CC1101"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF2-CC1101"'
board_build.flash_mode = dout
[env:nodemcuv2-pilight]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.esppilight}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayPilight="Pilight"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_Pilight"'
board_build.flash_mode = dout
[env:nodemcuv2-weatherstation]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.rfWeatherStation}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayWeatherStation="WeatherStationDataRx"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF3"'
board_build.flash_mode = dout
[env:sonoff-basic]
platform = ${com.esp8266_platform}
board = esp8285
lib_deps =
${com-esp.lib_deps}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZactuatorONOFF="ONOFF"'
'-DZsensorGPIOInput="GPIOInput"'
'-DACTUATOR_ONOFF_PIN=12'
'-DGPIOInput_PIN=0'
'-DGateway_Name="OpenMQTTGateway_SONOFF_RELAY"'
board_build.flash_mode = dout
[env:sonoff-basic-rfr3]
platform = ${com.esp8266_platform}
board = esp8285
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZactuatorONOFF="ONOFF"'
'-DZsensorGPIOInput="GPIOInput"'
'-DACTUATOR_ONOFF_PIN=12'
'-DGPIOInput_PIN=0'
'-DRF_RECEIVER_PIN=4'
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_SONOFF_BASIC_RFR3"'
board_build.flash_mode = dout
[env:atmega-all]
platform = ${com.atmelavr_platform}
board = megaatmega2560
lib_deps =
${com-arduino.lib_deps}
${libraries.irremote}
${libraries.rfm69}
${libraries.rc-switch}
${libraries.newremoteswitch}
${libraries.bme280}
${libraries.bmp180}
${libraries.htu21}
${libraries.unifiedsensor}
${libraries.dht}
${libraries.tsl2561}
${libraries.a6lib}
${libraries.ina226}
${libraries.fastled}
${libraries.onewire}
${libraries.dallastemperature}
${libraries.rfWeatherStation}
build_flags =
${com-arduino.build_flags}
'-DZgatewayRF="RF"'
'-DZgatewayRF="RF315"'
'-DZgatewayRF2="RF2"'
'-DZgatewayIR="IR"'
;'-DZgatewayBT="BT"'
'-DZactuatorONOFF="ONOFF"'
'-DZactuatorFASTLED="FASTLED"'
'-DZsensorINA226="INA226"'
'-DZsensorHCSR501="HCSR501"'
'-DZsensorADC="ADC"'
'-DZsensorBH1750="BH1750"'
'-DZsensorBME280="BME280"'
'-DZsensorHTU21="HTU21"'
'-DZsensorTSL2561="TSL2561"'
'-DZsensorDHT="DHT"'
'-DZsensorDS1820="DS1820"'
'-DZgatewayRFM69="RFM69"'
'-DZgatewayWeatherStation="WeatherStation"'
'-DZsensorGPIOInput="GPIOInput"'
;'-DZsensorGPIOKeyCode="GPIOKeyCode"'
'-DZmqttDiscovery="HADiscovery"'
'-DsimplePublishing=true'
'-DGateway_Name="OpenMQTTGateway_ATMEGA_ALL"'
[env:uno-rf]
platform = ${com.atmelavr_platform}
board = uno
lib_deps =
${com-arduino.lib_deps}
${libraries.rc-switch}
build_flags =
${com-arduino-low-memory.build_flags}
'-DZgatewayRF="RF"'
'-DGateway_Name="OMG_1_RF"'
[env:uno-fastled]
platform = ${com.atmelavr_platform}
board = uno
lib_deps =
${com-arduino.lib_deps}
${libraries.fastled}
build_flags =
${com-arduino-low-memory.build_flags}
'-DGateway_Name="OMG_1_FL"'
'-DZactuatorFASTLED="FASTLED"'