Skip to content

Commit

Permalink
v118
Browse files Browse the repository at this point in the history
## v118:
* Add adc_zero_calibration : depend on board an motor
* change BEMF max value to 1.5V
* change webserver version to 3
* add webserver grouping
* logs : dallas.temp.sensor: ERROR
* add blue status led
  • Loading branch information
nliaudat authored Dec 3, 2024
1 parent 4833877 commit 0389464
Show file tree
Hide file tree
Showing 15 changed files with 273 additions and 123 deletions.
9 changes: 4 additions & 5 deletions board_esp32-C3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ substitutions:
adc_bemf_2_pin: GPIO1
adc_bemf_3_pin: GPIO3
adc_bemf_4_pin: GPIO4
# adc_zero_calibration: "0.0"
onewire_pin: GPIO6

esp32:
Expand All @@ -41,8 +42,8 @@ esp32:
sdkconfig_options:
CONFIG_COMPILER_OPTIMIZATION_SIZE: y
# Advanced tweaking options for ESP32-C3
advanced:
ignore_efuse_mac_crc: false
# advanced:
# ignore_efuse_mac_crc: false

preferences:
flash_write_interval: 60min
Expand All @@ -54,12 +55,10 @@ ota:
safe_mode:



# https://git.sudo.is/ben/infra/src/branch/main/roles/hass-esphome/files/packages/boards/esp32c3supermini.yaml
light:
- platform: status_led
name: "${name} Status LED"
id: esp_status_led
id: heating_controller_status_led
icon: "mdi:alarm-light"
pin:
number: GPIO8
Expand Down
20 changes: 19 additions & 1 deletion board_esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ esphome:
project:
name: "nliaudat.floor-heating-controller"
version: "${revision}.dev"
###### only for ESP32-C3 boot loop fix
# platformio_options:
# board_build.f_flash: 40000000L
# board_build.flash_mode: dio
# board_build.flash_size: 4MB

substitutions:
#board and compilation
board: az-delivery-devkit-v4 #nodemcu-32s #esp-wrover-kit
board: az-delivery-devkit-v4 #nodemcu-32s #esp-wrover-kit nodemcu-32s #
framework: esp-idf #arduino

#Pin definition
Expand All @@ -24,15 +29,20 @@ substitutions:
adc_bemf_2_pin: GPIO39
adc_bemf_3_pin: GPIO34
adc_bemf_4_pin: GPIO35
# adc_zero_calibration: "-0.075"
onewire_pin: GPIO23


esp32:
board: ${board} #nodemcu-32s
framework:
type: ${framework} #esp-idf #arduino
version: recommended #latest
sdkconfig_options:
CONFIG_COMPILER_OPTIMIZATION_SIZE: y
# Advanced tweaking options for ESP32-C3
# advanced:
# ignore_efuse_mac_crc: false

preferences:
flash_write_interval: 60min
Expand All @@ -43,3 +53,11 @@ ota:

safe_mode:

light:
- platform: status_led
name: "${name} Status LED"
id: heating_controller_status_led
icon: "mdi:alarm-light"
restore_mode: ALWAYS_OFF
pin: GPIO02

7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# change log
## v118:
* Add adc_zero_calibration : depend on board an motor
* change BEMF max value to 1.5V
* change webserver version to 3
* add webserver grouping
* logs : dallas.temp.sensor: ERROR
* add blue status led
## v117:
* Add ESP32C3 board support (esp32-c3-devkitm-1)
* Add board Pin definition in board_xx.yaml
Expand Down
35 changes: 28 additions & 7 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
substitutions:
name: floor-heating-controller
friendly_name: "Floor heating"
revision: "1.117"
revision: "1.118"

#time
TZ: "Europe/Zurich" #timezone
Expand All @@ -20,10 +20,34 @@ substitutions:
# valve_maintenance_interval: "7days"
onboot_valve_calibration_delay: "1min"

dallasaddress_input: "0xb300000084aa6128"
dallasaddress_output: "0xeb0000008492ad28"

adc_zero_calibration: "-0.075" #typical : -0.075 for esp32 devkit, 0.005 for esp32-c3. + motor specific inpedance


web_server:
port: 80
#version: 3
version: 3
sorting_groups:
- id: sorting_group_climate
name: "Climate"
sorting_weight: 1
- id: sorting_group_sensors
name: "Sensors"
sorting_weight: 2
- id: sorting_group_actions
name: "Actions"
sorting_weight: 3
- id: sorting_group_covers
name: "Manual covers"
sorting_weight: 40
- id: sorting_group_BEMF
name: "Debug : BEMF"
sorting_weight: 50
- id: sorting_group_inputs
name: "Debug : inputs"
sorting_weight: 60
log: true
local: false #true in case of no internet

Expand All @@ -43,7 +67,7 @@ packages:
# id: wc #bad
# frendly_name: wc #bad
# temperature_sensor: corridor_temperature_sensor
# default_target_temperature: "21 °C"
# default_target_temperature_low: "21 °C"
# pid_kp: "0.06"
# pid_ki: "0.00011"
# pid_kd: "4.0"
Expand Down Expand Up @@ -445,8 +469,5 @@ packages:
sensor_adc: !include sensor_adc.yaml
sensor_temperature: !include sensor_temperature.yaml
sensor_others: !include sensor_others.yaml
# onwire: !include onewire.yaml



onwire: !include onewire.yaml #only for boards >= rev 61

25 changes: 22 additions & 3 deletions heating_channel_PID.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ climate:
visual:
min_temperature: ${visual_min_temperature}
max_temperature: ${visual_max_temperature}
temperature_step: ${visual_temperature_step}
temperature_step: ${visual_temperature_step}
# web_server:
# sorting_group_id: sorting_group_climate



Expand Down Expand Up @@ -69,17 +71,21 @@ cover:
max_duration : 65s
#assumed_state: true
id: CH${channel_number}_cover
web_server:
sorting_group_id: sorting_group_covers

number:
- platform: template
name: "bemf_trigger_${channel_number}"
optimistic: true
min_value: 0.005
max_value: 150.00
max_value: 1.50
step: 0.005
restore_value: true
initial_value: ${bemf_trigger_initial_value}
id: bemf_trigger_${channel_number}
web_server:
sorting_group_id: sorting_group_inputs

- platform: template
name: "Kp_ch${channel_number}"
Expand Down Expand Up @@ -205,7 +211,8 @@ binary_sensor:
id(CH${channel_number}_cover).position = 0.0; //0.0 = 0% = CLOSED
id(CH${channel_number}_cover).publish_state();
}
web_server:
sorting_group_id: sorting_group_BEMF


switch:
Expand Down Expand Up @@ -235,6 +242,8 @@ switch:
id: CH${channel_number}_IB_pin
#interlock: CH${channel_number}_IA_pin #interlock: *interlock_group_CH1
restore_mode: always off
web_server:
sorting_group_id: sorting_group_actions

# - platform: template
# name: "Run ${frendly_name} check"
Expand All @@ -258,28 +267,38 @@ button:
ki: 0.0
kd: 0.0
- climate.pid.autotune: PID_CH${channel_number}
web_server:
sorting_group_id: sorting_group_actions

###https://esphome.io/components/climate/pid.html?highlight=pid#pid-sensor
sensor:
- platform: pid
name: "PID ${frendly_name} RESULT"
id: PID_CH${channel_number}_result
type: RESULT
web_server:
sorting_group_id: sorting_group_sensors

- platform: pid
name: "PID ${frendly_name} KP"
id: PID_CH${channel_number}_kp
type: KP
web_server:
sorting_group_id: sorting_group_sensors

- platform: pid
name: "PID ${frendly_name} KI"
id: PID_CH${channel_number}_ki
type: KI
web_server:
sorting_group_id: sorting_group_sensors

- platform: pid
name: "PID ${frendly_name} KD"
id: PID_CH${channel_number}_kd
type: KD
web_server:
sorting_group_id: sorting_group_sensors

# sensor:
# - platform: template
Expand Down
15 changes: 12 additions & 3 deletions heating_channel_linear.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ climate:
min_temperature: ${visual_min_temperature}
max_temperature: ${visual_max_temperature}
temperature_step: ${visual_temperature_step}
web_server:
sorting_group_id: sorting_group_climate

########### cover
cover:
Expand All @@ -59,17 +61,21 @@ cover:
max_duration : 65s
#assumed_state: true
id: CH${channel_number}_cover
web_server:
sorting_group_id: sorting_group_covers

number:
- platform: template
name: "bemf_trigger_${channel_number}"
optimistic: true
min_value: 0.005
max_value: 150.00
max_value: 1.5
step: 0.005
restore_value: true
initial_value: ${bemf_trigger_initial_value}
id: bemf_trigger_${channel_number}
web_server:
sorting_group_id: sorting_group_inputs

script:
- id: calibrate_CH${channel_number}_cover
Expand Down Expand Up @@ -180,7 +186,8 @@ binary_sensor:
id(CH${channel_number}_cover).position = 0.0; //0.0 = 0% = CLOSED
id(CH${channel_number}_cover).publish_state();
}
web_server:
sorting_group_id: sorting_group_BEMF


switch:
Expand Down Expand Up @@ -214,7 +221,9 @@ switch:
- platform: template
name: "Run ${frendly_name} check"
turn_on_action:
- script.execute: TH${channel_number}_check
- script.execute: TH${channel_number}_check
web_server:
sorting_group_id: sorting_group_actions


interval:
Expand Down
12 changes: 10 additions & 2 deletions heating_channel_remote_controlled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ climate:
min_temperature: ${visual_min_temperature}
max_temperature: ${visual_max_temperature}
temperature_step: ${visual_temperature_step}
web_server:
sorting_group_id: sorting_group_climate

########### cover
cover:
Expand All @@ -58,17 +60,21 @@ cover:
max_duration : 65s
#assumed_state: true
id: CH${channel_number}_cover
web_server:
sorting_group_id: sorting_group_covers

number:
- platform: template
name: "bemf_trigger_${channel_number}"
optimistic: true
min_value: 0.005
max_value: 150.00
max_value: 1.5
step: 0.005
restore_value: true
initial_value: ${bemf_trigger_initial_value}
id: bemf_trigger_${channel_number}
web_server:
sorting_group_id: sorting_group_inputs

script:
- id: calibrate_CH${channel_number}_cover
Expand Down Expand Up @@ -121,7 +127,8 @@ binary_sensor:
id(CH${channel_number}_cover).position = 0.0; //0.0 = 0% = CLOSED
id(CH${channel_number}_cover).publish_state();
}
web_server:
sorting_group_id: sorting_group_BEMF


switch:
Expand Down Expand Up @@ -152,6 +159,7 @@ switch:
#interlock: CH${channel_number}_IA_pin #interlock: *interlock_group_CH1
restore_mode: always off


# - platform: template
# name: "Run ${frendly_name} check"
# turn_on_action:
Expand Down
Loading

0 comments on commit 0389464

Please sign in to comment.