From 7bf455670f03899c85117415188e7e97bda6fbfb Mon Sep 17 00:00:00 2001 From: djorgensen Date: Tue, 8 Jul 2025 13:41:07 -0600 Subject: [PATCH] Add snaketesting.json --- snaketesting.json | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 snaketesting.json diff --git a/snaketesting.json b/snaketesting.json new file mode 100644 index 0000000..6882836 --- /dev/null +++ b/snaketesting.json @@ -0,0 +1,101 @@ +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 \ No newline at end of file