esp32-vivariumcontrol/snaketesting.json
2025-07-08 13:41:07 -06:00

101 lines
1.9 KiB
JSON

esphome:
name: snaketesting
friendly_name: snaketesting
comment: "Automated environmenal control for snake housing"
area: "Living Room"
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
captive_portal:
web_server:
port: 80
version: 3
ota: false
switch:
- platform: gpio
pin: GPIO13
inverted: true
id: relay4
name: "Pump"
icon: "mdi:water-pump"
on_turn_on:
- delay: 5000ms
- switch.turn_off: relay4
switch:
- platform: gpio
pin: GPIO12
inverted: true
id: relay3
name: "Heat 1"
icon: "mdi:heating-coil"
time:
- platform: sntp
id: sntp_time
timezone: America/Edmonton
on_time:
- cron: '0 5 10 * * *'
then:
- switch.toggle: relay4
spi:
miso_pin: GPIO19
clk_pin: GPIO5
sensor:
- platform: max6675
id: snaketemp1
name: "Snake Temperature"
unit_of_measurement: "°C"
device_class: "temperature"
state_class: "measurement"
cs_pin: GPIO23
update_interval: 30s
#on_value_range:
# - below: 31.6
# then:
# - switch.turn_on: relay3
# - above: 33.3
# then:
# - switch.turn_off: relay3
climate:
- platform: pid
name: "PID Climate Controller 1"
sensor: snaketemp1
default_target_temperature: 33°C
heat_output: relay3pwm
control_parameters:
kp: 0.0
ki: 0.0
kd: 0.0
output_averaging_samples: 5 # smooth the output over 5 samples
derivative_averaging_samples: 5 # smooth the derivative value over 10 samples
deadband_parameters:
threshold_high: 1.5°C
threshold_low: -1.5°C
output:
- platform: slow_pwm
pin: GPIO12
id: relay3pwm
period: 60s
button:
- platform: template
name: "PID Climate Autotune"
on_press:
- climate.pid.autotune: pid_climate