plants esp
This commit is contained in:
		
							
								
								
									
										112
									
								
								plants.yaml
									
									
									
									
									
								
							
							
						
						
									
										112
									
								
								plants.yaml
									
									
									
									
									
								
							@@ -25,42 +25,53 @@ wifi:
 | 
				
			|||||||
  password: !secret wifi_password
 | 
					  password: !secret wifi_password
 | 
				
			||||||
  manual_ip:
 | 
					  manual_ip:
 | 
				
			||||||
    static_ip: 192.168.1.55
 | 
					    static_ip: 192.168.1.55
 | 
				
			||||||
    gateway: 192.168.0.1
 | 
					    gateway: 192.168.1.254
 | 
				
			||||||
    subnet: 255.255.255.0
 | 
					    subnet: 255.255.255.0
 | 
				
			||||||
 | 
					    dns1: 9.9.9.9
 | 
				
			||||||
 | 
					    dns2: 149.112.112.112
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Enable fallback hotspot (captive portal) in case wifi connection fails
 | 
					  # Enable fallback hotspot (captive portal) in case wifi connection fails
 | 
				
			||||||
  ap:
 | 
					  ap:
 | 
				
			||||||
    ssid: "Esp32S3N16R8 Fallback Hotspot"
 | 
					    ssid: "Esp32S3N16R8 Fallback Hotspot"
 | 
				
			||||||
    password: "v41VUZA7A1VA"
 | 
					    password: "v41VUZA7A1VA"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# light:
 | 
					mqtt:
 | 
				
			||||||
  # - platform: status_led
 | 
					  broker: mqtt.hadow.fr
 | 
				
			||||||
    # name: "Switch state"
 | 
					  port: 18832
 | 
				
			||||||
    # pin: GPIO2
 | 
					  username: fire
 | 
				
			||||||
    # restore_mode: ALWAYS_OFF
 | 
					  password: !secret mqtt_password
 | 
				
			||||||
 | 
					  topic_prefix: "esp_plants"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
switch:
 | 
					i2c:
 | 
				
			||||||
  - platform: gpio
 | 
					  - id: bus_i2c_ph_probe
 | 
				
			||||||
    pin: GPIO15
 | 
					    scl: 17
 | 
				
			||||||
    inverted: true
 | 
					    sda: 16
 | 
				
			||||||
    name: "light pump"
 | 
					    scan: true
 | 
				
			||||||
  - platform: gpio
 | 
					  - id: bus_i2c_air_sensor
 | 
				
			||||||
    pin: GPIO17
 | 
					    scl: 21
 | 
				
			||||||
    inverted: true
 | 
					    sda: 20
 | 
				
			||||||
    name: "heavy pump"
 | 
					    scan: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# temperature probe
 | 
					# temperature probe
 | 
				
			||||||
one_wire:
 | 
					one_wire:
 | 
				
			||||||
  - platform: gpio
 | 
					  - platform: gpio
 | 
				
			||||||
    pin: GPIO16
 | 
					    pin: GPIO6
 | 
				
			||||||
    id: probe1
 | 
					    id: probe1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# # ATH20+BMP280
 | 
					switch:
 | 
				
			||||||
# i2c:
 | 
					  - platform: gpio
 | 
				
			||||||
#   sda: 17
 | 
					    pin: GPIO35
 | 
				
			||||||
#   scl: 18
 | 
					    inverted: true
 | 
				
			||||||
#   scan: true
 | 
					    name: "relay 1"
 | 
				
			||||||
#   id: probe_ath_bmp_1
 | 
					  - platform: gpio
 | 
				
			||||||
 | 
					    pin: GPIO36
 | 
				
			||||||
 | 
					    inverted: true
 | 
				
			||||||
 | 
					    name: "relay 2"
 | 
				
			||||||
 | 
					  - platform: gpio
 | 
				
			||||||
 | 
					    pin: GPIO37
 | 
				
			||||||
 | 
					    inverted: true
 | 
				
			||||||
 | 
					    name: "relay 3"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sensor:
 | 
					sensor:
 | 
				
			||||||
  - platform: dallas_temp
 | 
					  - platform: dallas_temp
 | 
				
			||||||
@@ -68,29 +79,52 @@ sensor:
 | 
				
			|||||||
    name: "temperature"
 | 
					    name: "temperature"
 | 
				
			||||||
    update_interval: 30s
 | 
					    update_interval: 30s
 | 
				
			||||||
  - platform: adc
 | 
					  - platform: adc
 | 
				
			||||||
    pin: GPIO6
 | 
					    pin: GPIO5
 | 
				
			||||||
    name: "soil moisture sensor, digital"
 | 
					    name: "soil moisture sensor, digital"
 | 
				
			||||||
    update_interval: 30s
 | 
					    update_interval: 30s
 | 
				
			||||||
    attenuation: auto
 | 
					    attenuation: auto
 | 
				
			||||||
  - platform: adc
 | 
					  - platform: adc
 | 
				
			||||||
    pin: GPIO7
 | 
					    pin: GPIO4
 | 
				
			||||||
    name: "soil moisture sensor, analog"
 | 
					    name: "soil moisture sensor, analog"
 | 
				
			||||||
    update_interval: 30s
 | 
					    update_interval: 30s
 | 
				
			||||||
    attenuation: auto
 | 
					    attenuation: auto
 | 
				
			||||||
  # - platform: bmp280_i2c
 | 
					  - platform: aht10
 | 
				
			||||||
  #   i2c_id: probe_ath_bmp_1
 | 
					    variant: AHT20
 | 
				
			||||||
  #   update_interval: 60s
 | 
					    i2c_id: bus_i2c_air_sensor
 | 
				
			||||||
  #   temperature:
 | 
					    temperature:
 | 
				
			||||||
  #     name: "BMP temp"
 | 
					      name: "AHT21 Temperature"
 | 
				
			||||||
  #     oversampling: 2x
 | 
					      id: aht21_temperature
 | 
				
			||||||
  #   pressure:
 | 
					    humidity:
 | 
				
			||||||
  #     name: "BMP Pressure"
 | 
					      name: "AHT21 Humidity"
 | 
				
			||||||
  # - platform: aht10
 | 
					      id: aht21_humidity
 | 
				
			||||||
  #   i2c_id: probe_ath_bmp_1
 | 
					    address: 0x38
 | 
				
			||||||
  #   update_interval: 60s
 | 
					    update_interval: 30s
 | 
				
			||||||
  #   temperature:
 | 
					  - platform: ens160_i2c
 | 
				
			||||||
  #     name: "AHT20 temp"
 | 
					    i2c_id: bus_i2c_air_sensor
 | 
				
			||||||
  #     id: aht20_temp
 | 
					    eco2:
 | 
				
			||||||
  #     accuracy_decimals: 1
 | 
					      name: "ENS160 eCO2"
 | 
				
			||||||
 | 
					    tvoc:
 | 
				
			||||||
 | 
					      name: "ENS160 Total Volatile Organic Compounds"
 | 
				
			||||||
 | 
					    aqi:
 | 
				
			||||||
 | 
					      id: ens160_air_quality_index
 | 
				
			||||||
 | 
					      name: "ENS160 Air Quality Index"
 | 
				
			||||||
 | 
					    compensation:
 | 
				
			||||||
 | 
					      temperature: aht21_temperature
 | 
				
			||||||
 | 
					      humidity: aht21_humidity
 | 
				
			||||||
 | 
					    address: 0x53
 | 
				
			||||||
 | 
					    update_interval: 30s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					text_sensor:
 | 
				
			||||||
 | 
					  - platform: template
 | 
				
			||||||
 | 
					    name: "ENS160 Air Quality Rating"
 | 
				
			||||||
 | 
					    lambda: |-
 | 
				
			||||||
 | 
					      switch ( (int) (id(ens160_air_quality_index).state) ) {
 | 
				
			||||||
 | 
					        case 1: return {"Excellent"};
 | 
				
			||||||
 | 
					        case 2: return {"Good"};
 | 
				
			||||||
 | 
					        case 3: return {"Moderate"};
 | 
				
			||||||
 | 
					        case 4: return {"Poor"};
 | 
				
			||||||
 | 
					        case 5: return {"Unhealthy"};
 | 
				
			||||||
 | 
					        default: return {"Not Available"};
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
captive_portal:
 | 
					captive_portal:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user