periodic push
This commit is contained in:
95
esphome/plant-sensor-1.yaml
Executable file
95
esphome/plant-sensor-1.yaml
Executable file
@@ -0,0 +1,95 @@
|
||||
substitutions:
|
||||
device_name: "plant_sensor1"
|
||||
friendly_name: "plant sensor 1"
|
||||
comment: "esp32, plant"
|
||||
location: "tuin"
|
||||
api_password: !secret plant_sensor1_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
gateway: !secret ip_gateway
|
||||
subnet: !secret ip_subnet
|
||||
ip: !secret plant_sensor1
|
||||
#project specific params
|
||||
project_version: '1.0'
|
||||
update_interval: 30min
|
||||
loglevel: DEBUG
|
||||
moisture_min: '2.82'
|
||||
moisture_max: '1.39'
|
||||
conductivity_min: '0.075'
|
||||
conductivity_max: '0.25'
|
||||
# Uncomment run_duration and sleep_duration if you want to use deepsleep
|
||||
# set how long to stay awake - NOT less then 10sec
|
||||
run_duration: 11s
|
||||
# set how long to sleep in minutes
|
||||
sleep_duration: 10min
|
||||
|
||||
pin_power: GPIO4
|
||||
pin_sda: GPIO25
|
||||
pin_scl: GPIO26
|
||||
pin_wake: GPIO35
|
||||
pin_vbatt: GPIO33
|
||||
pin_fertilizer: GPIO34
|
||||
pin_soil: GPIO32
|
||||
|
||||
esphome:
|
||||
name: '${device_name}'
|
||||
comment: '${comment}'
|
||||
on_boot:
|
||||
priority: 240
|
||||
then:
|
||||
- wait_until:
|
||||
condition:
|
||||
wifi.connected:
|
||||
timeout: 10s
|
||||
on_shutdown:
|
||||
then:
|
||||
- switch.turn_off: spower
|
||||
|
||||
esp32:
|
||||
board: lolin_d32
|
||||
|
||||
packages:
|
||||
connection: !include common/wifi.yaml
|
||||
i2c: !include interfaces/i2c_a.yaml
|
||||
logger: !include templates/nologger.yaml
|
||||
bluetooth: !include common/bluetooth.yaml
|
||||
deepsleep: !include common/deepsleep.yaml
|
||||
#sensors
|
||||
plantsensors: !include sensors/plantsensors.yaml
|
||||
bme280: !include sensors/bme280.yaml
|
||||
battery: !include sensors/battery.yaml
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
|
||||
button:
|
||||
- platform: restart
|
||||
name: 'Restart - ${device_name}'
|
||||
|
||||
switch:
|
||||
# Power Switch
|
||||
- platform: gpio
|
||||
name: '${device_name} Sensor Power switch'
|
||||
pin:
|
||||
number: 4
|
||||
mode: INPUT_PULLUP
|
||||
id: spower
|
||||
restore_mode: ALWAYS_ON
|
||||
internal: true
|
||||
setup_priority: 1000
|
||||
|
||||
|
||||
|
||||
# packages:
|
||||
# text_sensors: !include common/text_sensors.yaml
|
||||
# dht: !include common/dht.yaml
|
||||
# plantsensors: !include common/plantsensors.yaml
|
||||
# waterpump: !include common/waterpump.yaml
|
||||
# bluetooth: !include common/bluetooth.yaml
|
||||
# Battery only works for 12 hours with deepsleep!
|
||||
# bme280: !include common/bme280.yaml
|
||||
# deepsleep: !include common/deepsleep.yaml
|
||||
# battery: !include common/battery.yaml
|
||||
|
||||
|
||||
Reference in New Issue
Block a user