; 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

# Flash upload with platformio run -t upload --environment sensorespx

[platformio]
#For Config upload comment in data_dir line and flash with platformio run -t uploadfs --environment sensorespx
#data_dir=data_sensoresp1

#data_dir=data_sensoresp3
data_dir=data_sensoresp4

#Arbeitszimmer
[env:sensoresp1]
platform = espressif8266
board = d1_mini
framework = arduino

monitor_port = /dev/ttyUSB0
monitor_speed = 115200

build_flags =
    -D SENSOR_DHT22
    -D DHTPIN=D7
    -D dataDHT22_temperature_minchange=0.2
    -D dataDHT22_humidity_minchange=1.0

    -D SENSOR_BMP180
    -D dataBMP180_temperature_minchange=0.2
    -D dataBMP180_pressure_minchange=0.1

    -D SENSOR_PIR
    -D PIRPIN=D6
    -D dataPIR_readdelay=100
    -D dataPIR_senddelaymax=1000*60*10

    -D SENSOR_LDR
    -D SENSOR_LDR_CALIB1
    -D LDR_PIN=A0
    -D dataLDR_minchange=10.0
    -D dataLDR_readdelay=1000*2
    -D dataBH1750_senddelaymax=1000*60*1


lib_deps = 
    Adafruit BMP085 Library@1.1.0
    DHT sensor library@1.3.10
    Homie@3.0.0


#Wohnzimmer
[env:sensoresp3]
platform = espressif8266
board = d1_mini
framework = arduino

monitor_port = /dev/ttyUSB0
monitor_speed = 115200

build_flags =
    -D SENSOR_DHT22
    -D DHTPIN=D7
    -D dataDHT22_temperature_minchange=0.1
    -D dataDHT22_humidity_minchange=1.0

    -D SENSOR_PIR
    -D PIRPIN=D6
    -D dataPIR_readdelay=100
    -D dataPIR_senddelaymax=1000*60*10

    -D SENSOR_BH1750
    -D dataBH1750_minchange=10.0
    -D dataBH1750_senddelaymax=1000*60*2

lib_deps = 
    adafruit/DHT sensor library@1.3.10
    BH1750@1.1.4
    Homie@3.0.0


#Schlafzimmer
[env:sensoresp4]
platform = espressif8266
board = d1_mini
framework = arduino

monitor_port = /dev/ttyUSB0
monitor_speed = 115200

build_flags =
    -D SENSOR_DHT22
    -D DHTPIN=D7
    -D dataDHT22_temperature_minchange=0.1
    -D dataDHT22_humidity_minchange=1.0

    -D SENSOR_PIR
    -D PIRPIN=D0
    -D dataPIR_readdelay=100
    -D dataPIR_senddelaymax=1000*60*10

    -D SENSOR_BH1750
    -D dataBH1750_minchange=10.0
    -D dataBH1750_senddelaymax=1000*60*2

    -D SENSOR_MHZ19
    -D MHZ19_SERIAL_RX=D5
    -D MHZ19_SERIAL_TX=D6
    -D dataMHZ19_minchange=10
    -D dataMHZ19_readdelay=10*1000

lib_deps =
    adafruit/DHT sensor library@1.3.10
    BH1750@1.1.4
    MHZ19@0.0.1
    EspSoftwareSerial@6.8.1
    Homie@3.0.0