Skip to content
Snippets Groups Projects
Commit 94d61488 authored by 3d's avatar 3d
Browse files

revert to 2022.10 and update popcorn

parent 03d2621a
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,26 @@
{% include "/includes/board.esp32-doit-devkit-v1.inc.yaml" %}
on_boot:
priority: 250
then:
- climate.control:
id: pid_heater
mode: "OFF"
- priority: 600
then:
- light.turn_on:
id: status_led
effect: BootUp
- display.page.show: page1
- priority: 250
then:
- light.addressable_set:
id: status_led
range_from: 0
range_to: 2
red: 0%
green: 100%
blue: 0%
- priority: -100
then:
- light.turn_off:
id: status_led
- display.page.show: page3
{% include "/includes/common.inc.yaml" %}
......@@ -37,6 +52,11 @@ climate:
kp: 0.49460
ki: 0.00487
kd: 12.56301
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°C # deadband within +/-1°C of target_temperature
threshold_low: -1°C
visual:
min_temperature: 0
max_temperature: 275
......@@ -125,12 +145,54 @@ binary_sensor:
- climate.control:
id: pid_heater
mode: "OFF"
- light.addressable_set:
id: status_led
range_from: 0
range_to: 0
red: 0%
green: 0%
blue: 0%
- light.addressable_set:
id: status_led
range_from: 1
range_to: 1
red: 0%
green: 0%
blue: 0%
- light.addressable_set:
id: status_led
range_from: 2
range_to: 2
red: 0%
green: 0%
blue: 0%
on_press:
then:
- climate.control:
id: pid_heater
mode: HEAT
target_temperature: 264
- light.addressable_set:
id: status_led
range_from: 0
range_to: 0
red: 0%
green: 0%
blue: 100%
- light.addressable_set:
id: status_led
range_from: 1
range_to: 1
red: 100%
green: 0%
blue: 0%
- light.addressable_set:
id: status_led
range_from: 2
range_to: 2
red: 0%
green: 100%
blue: 0%
font:
- file: "gfonts://Roboto"
......@@ -166,22 +228,27 @@ display:
dc_pin: GPIO16
reset_pin: GPIO17
rotation: 90°
pages:
- id: page1
lambda: |-
it.printf(160,120,id(text),TextAlign::CENTER,"Booting");
- id: page3
lambda: |-
it.printf(160,120,id(temp),TextAlign::CENTER,"%.0f°C",id(pid_heater).current_temperature);
if ((id(pid_heater).action) == 0) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: OFF");
}
else if ((id(pid_heater).action) == 3) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: HEATING");
}
else if ((id(pid_heater).action) == 4) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: IDLE");
}
else {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: ERROR %d",id(pid_heater).action);
};
it.printf(0,230,id(text),TextAlign::BOTTOM_LEFT,"Target: %.1f°C",id(pid_heater).target_temperature);
lambda: |-
it.printf(160,120,id(temp),TextAlign::CENTER,"%.0f°C",id(pid_heater).current_temperature);
if ((id(pid_heater).action) == 0) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: OFF");
}
else if ((id(pid_heater).action) == 3) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: HEATING");
}
else if ((id(pid_heater).action) == 4) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: IDLE");
}
else {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: ERROR %d",id(pid_heater).action);
};
it.printf(0,230,id(text),TextAlign::BOTTOM_LEFT,"Target: %.1f°C",id(pid_heater).target_temperature);
time:
- platform: sntp
......@@ -194,29 +261,30 @@ light:
name: "ILI9341 Display Backlight"
id: back_light
restore_mode: ALWAYS_ON
internal: True
- platform: fastled_spi
rgb_order: BRG
rgb_order: RGB
chipset: WS2801
id: status_led
clock_pin: GPIO25
data_pin: GPIO26
num_leds: 3
name: "NeoPixel Light"
internal: True
effects:
- addressable_scan:
- addressable_scan:
name: Scan Effect With Custom Values
move_interval: 500ms
scan_width: 1
- pulse:
- pulse:
name: "Fast Pulse"
transition_length: 0.5s
update_interval: 0.5s
- pulse:
name: "Slow Pulse"
# transition_length: 1s # defaults to 1s
update_interval: 2s
- addressable_color_wipe:
name: BootUp
colors:
- red: 100%
green: 0%
blue: 0%
num_leds: 3
- red: 0%
green: 0%
blue: 0%
num_leds: 3
add_led_interval: 500ms
reverse: False
text_sensor:
- platform: template
......@@ -236,4 +304,5 @@ text_sensor:
else {
return {"ERROR see Display"};
}
update_interval: 5s
\ No newline at end of file
update_interval: 5s
\ No newline at end of file
......@@ -4,7 +4,7 @@ services:
app:
image: esphome/esphome:2022.12
image: esphome/esphome:2022.10
restart: always
volumes:
- "{{ basedir }}/config/:/config"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment