Hi,
I have configured esp32-s3.
My config is as follows:
substitutions:
device_name: viessmann
device_description: "Viessmann Optolink"
update_interval_global: 60s
update_interval_short: 15s
update_interval_long: 600s
esphome:
name: '${device_name}'
friendly_name: Viessmann
project:
name: esphome.viessmann
version: "1.0"
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
flash_size: 16MB
# Enable logging
logger:
hardware_uart: UART0
baud_rate: 0
level: debug
# Enable Home Assistant API
api:
encryption:
key: "xxx"
ota:
- platform: esphome
password: "xxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Viessmann Fallback Hotspot"
password: "xxx"
captive_portal:
dashboard_import:
package_import_url: github://esphome/firmware/esphome-web/esp32s3.yaml@main
import_full_config: true
# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
authorizer: none
# To have a "next url" for improv serial
web_server:
esp32_ble_tracker:
scan_parameters:
interval: 1100ms
window: 1100ms
active: true
bluetooth_proxy:
active: true
external_components:
- source: github://pr#4453
components: [ optolink ]
optolink:
protocol: KW
# device_info: Device Info
# state: Component state
rx_pin: 44
tx_pin: 43
button:
- platform: restart
name: "Restart"
text_sensor:
- platform: version
hide_timestamp: true
name: "ESPHome Version"
- platform: wifi_info
ip_address:
name: "IP Address"
icon: mdi:wifi
ssid:
name: "Connected SSID"
icon: mdi:wifi-strength-2
- platform: optolink
type: DEVICE_INFO
name: Device Info
update_interval: 969s
- platform: optolink
type: STATE_INFO
name: Component state
update_interval: 459s
- platform: optolink
name: Current Operating Mode A1
address: 0x2500
bytes: 2
update_interval: 128s
type: MAP
filters:
- map:
- "2 -> off" # when in standby or dhw modes
- "258 -> reduced" # when in reduced (night) or forcedReduced modes or in Eco preset
- "514 -> comfort" # when in day heating or in Comfort preset
- "770 -> normal" # when in forcedNormal type
- platform: optolink
name: Current Operating Mode M2
address: 0x3500
bytes: 2
update_interval: 130s
type: MAP
filters:
- map:
- "2 -> off"
- "258 -> reduced"
- "514 -> comfort"
- "770 -> normal"
# - platform: optolink
# name: Error history 1
# address: 0x7590
# bytes: 9
# type: RAW
# above disabled for last two errors configured with mapping to error description
# errors : 0:7507, 1:7510, 2:7519, 3:7522, 4:752B, 5:7534, 6:753D, 7:7546, 8:754F, 9:7558
- platform: optolink
name: Error code 1
address: 0x7507
bytes: 1
update_interval: 591s
icon: mdi:note-text-outline
type: MAP
filters:
- map:
- "0 -> regular operation"
- "15 -> 0 F : Przeprowadzić konserwację. Po konserwacji ustawić kodowanie 24:0"
- "16 -> 1 0 : Zwarcie czujnika temperatury zewnętrznej"
- "231 -> E 7 : Usterka palnika"
- "232 -> E 8 : Usterka palnika"
- "238 -> E E : Blokada palnika"
- platform: optolink
name: Error code 2
address: 0x7510
bytes: 1
update_interval: 589s
icon: mdi:note-text-outline
type: MAP
filters:
- map:
- "0 -> regular operation"
- "15 -> 0 F : Przeprowadzić konserwację. Po konserwacji ustawić kodowanie 24:0"
- "16 -> 1 0 : Zwarcie czujnika temperatury zewnętrznej"
- "231 -> E 7 : Usterka palnika"
- "232 -> E 8 : Usterka palnika"
- "238 -> E E : Blokada palnika"
# - platform: optolink
# name: Error code 3
# address: 0x7519
# bytes: 1
# update_interval: 587s
# icon: mdi:note-text-outline
# filters:
# - map:
# - "0 -> regular operation"
# - "15 -> 0 F : Przeprowadzić konserwację. Po konserwacji ustawić kodowanie 24:0"
# - "16 -> 1 0 : Zwarcie czujnika temperatury zewnętrznej"
# - "231 -> E 7 : Usterka palnika"
# - "232 -> E 8 : Usterka palnika"
# - "238 -> E E : Blokada palnika"
binary_sensor:
- platform: optolink
name: Burner
address: 0x55D3
update_interval: 52s
device_class: heat
- platform: optolink
name: DHW Charging
address: 0x650A
update_interval: 50s
device_class: heat
# - platform: optolink
# name: Storage Charging Pump
# address: 0x6513
# update_interval: 52s
# device_class: power
- platform: optolink
name: Circulation Pump
address: 0x6515
update_interval: 54s
device_class: power
- platform: optolink
name: Heating circuit pump A1M1
address: 0x2906
update_interval: 56s
device_class: power
- platform: optolink
name: Heating circuit pump M2
address: 0x3906
update_interval: 64s
device_class: power
- platform: optolink
name: Frost protection
address: 0x27A4
update_interval: 593s
device_class: cold
number:
# - platform: optolink
# name: Time limit party and operating mode switching
# address: 0x27F2
# bytes: 1
# min_value: 0
# max_value: 100
# step: 1
# type: box
# update_interval: 595s
- platform: optolink
name: Room Temperature Setpoint
unit_of_measurement: °C
address: 0x2306
bytes: 1
min_value: 18
max_value: 27
step: 1
icon: "mdi:home-thermometer"
device_class: temperature
update_interval: 315s
- platform: optolink
name: Reduced Room Temperature Setpoint
unit_of_measurement: °C
address: 0x2307
bytes: 1
min_value: 10
max_value: 20
step: 1
icon: "mdi:home-thermometer"
device_class: temperature
update_interval: 597s
- platform: optolink
name: Party Temperature Setpoint
unit_of_measurement: °C
address: 0x2308
bytes: 1
min_value: 18
max_value: 27
step: 1
icon: "mdi:home-thermometer"
device_class: temperature
update_interval: 599s
- platform: optolink
name: Floor Temperature Setpoint
unit_of_measurement: °C
address: 0x3306
bytes: 1
min_value: 18
max_value: 27
step: 1
icon: "mdi:home-thermometer"
device_class: temperature
update_interval: 280s
- platform: optolink
name: Reduced Floor Temperature Setpoint
unit_of_measurement: °C
address: 0x3307
bytes: 1
min_value: 10
max_value: 20
step: 1
icon: "mdi:home-thermometer"
device_class: temperature
update_interval: 591s
- platform: optolink
name: Party Floor Temperature Setpoint
unit_of_measurement: °C
address: 0x3308
bytes: 1
min_value: 18
max_value: 27
step: 1
icon: "mdi:home-thermometer"
device_class: temperature
update_interval: 593s
- platform: optolink
name: Heating curve level
address: 0x27D4
bytes: 1
min_value: 0
max_value: 10
step: 1
mode: box
update_interval: 601s
- platform: optolink
name: Heating curve slope
address: 0x27D3
bytes: 1
min_value: 0
max_value: 3
step: 0.1
mode: box
div_ratio: 10
update_interval: 603s
- platform: optolink
name: Floor Heating curve level
address: 0x37D4
bytes: 1
min_value: 0
max_value: 10
step: 1
mode: box
update_interval: ${update_interval_long}
- platform: optolink
name: Floor Heating curve slope
address: 0x37D3
bytes: 1
min_value: 0
max_value: 3
step: 0.1
mode: box
div_ratio: 10
update_interval: 607s
- platform: optolink
name: DHW Temperature Setpoint
unit_of_measurement: °C
address: 0x6300
bytes: 1
min_value: 30
max_value: 60
step: 1
icon: "mdi:water-boiler"
device_class: temperature
update_interval: 605s
sensor:
- platform: wifi_signal
name: "WiFi Signal"
id: '${device_name}_wifi_signal'
update_interval: ${update_interval_global}
- platform: optolink
type: QUEUE_SIZE
name: Optolink Queue Size
icon: mdi:queue-first-in-last-out
entity_category: diagnostic
update_interval: 5s
- platform: optolink
name: Target flow temperature A1M1
address: 0x2544
bytes: 2
unit_of_measurement: °C
device_class: temperature
div_ratio: 10
accuracy_decimals: 1
update_interval: 330s
state_class: measurement
force_update: true
- platform: optolink
name: Target flow temperature M2
address: 0x3544
bytes: 2
unit_of_measurement: °C
device_class: temperature
div_ratio: 10
accuracy_decimals: 1
update_interval: 332s
state_class: measurement
force_update: true
# Enabled for test
- platform: optolink
name: Return temperature
address: 0x0816
bytes: 2
div_ratio: 1
filters:
multiply: 0.1
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
update_interval: 62s
state_class: measurement
force_update: true
- platform: optolink
name: Flow temperature M2
address: 0x3900
bytes: 2
div_ratio: 1
filters:
multiply: 0.1
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
update_interval: 48s
state_class: measurement
force_update: true
# Enabled for test
- platform: optolink
name: Exhaust temperature
address: 0x0808
bytes: 2
div_ratio: 1
filters:
multiply: 0.1
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
update_interval: 68s
state_class: measurement
force_update: true
- platform: optolink
name: Storage temperature
address: 0x0812
bytes: 2
div_ratio: 1
filters:
multiply: 0.1
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
update_interval: 175s
state_class: measurement
force_update: true
- platform: optolink
name: Outside Temperature
address: 0x0800
#address: 0x5527
bytes: 2
unit_of_measurement: °C
device_class: temperature
div_ratio: 10
accuracy_decimals: 1
update_interval: 611s
state_class: measurement
force_update: true
- platform: optolink
name: Boiler Temperature
address: 0x0802
bytes: 2
div_ratio: 10
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
update_interval: 28s
state_class: measurement
force_update: true
- platform: optolink
name: Room temperature
address: 0x0896
bytes: 2
div_ratio: 1
unit_of_measurement: °C
device_class: temperature
accuracy_decimals: 1
filters:
multiply: 0.1
update_interval: 607s
state_class: measurement
force_update: true
- platform: optolink
name: Operating Hours
address: 0x08A7
bytes: 4
device_class: duration
unit_of_measurement: h
state_class: total_increasing
icon: mdi:counter
update_interval: 909s
filters:
- lambda: return x / 3600;
accuracy_decimals: 1
force_update: true
- platform: optolink
name: Burner Starts
address: 0x088A
bytes: 4
update_interval: 911s
state_class: total_increasing
icon: mdi:counter
force_update: true
- platform: optolink
name: Burner Performance
address: 0xA38F
bytes: 1
filters:
multiply: 0.5
update_interval: ${update_interval_short}
unit_of_measurement: "%"
state_class: measurement
icon: mdi:percent
force_update: true
select:
- platform: optolink
name: Operation mode
address: 0x2323
bytes: 1
map:
- "0 -> standby"
- "1 -> dhw"
- "2 -> dhwAndHeating"
- "3 -> forcedReduced"
- "4 -> forcedNormal"
update_interval: 68s
- platform: optolink
name: Operation mode M2
address: 0x3323
bytes: 1
map:
- "0 -> standby"
- "1 -> dhw"
- "2 -> dhwAndHeating"
- "3 -> forcedReduced"
- "4 -> forcedNormal"
update_interval: 123s
- platform: template
name: "Preset"
id: preset
update_interval: 10s
options:
- "off"
- "eco"
- "comfort"
set_action:
- lambda: |-
if (x == "off") {
id(economy_mode).turn_off();
id(party_mode).turn_off();
} else if (x == "eco"){
id(economy_mode).turn_on();
id(party_mode).turn_off();
} else if (x == "comfort"){
id(economy_mode).turn_off();
id(party_mode).turn_on();
}
lambda: !lambda |-
if (not(id(economy_mode).state) and not(id(party_mode).state)) {
return (std::string) "off";
} else if (id(economy_mode).state) {
return (std::string) "eco";
} else if (id(party_mode).state) {
return (std::string) "comfort";
} else {
return (std::string) "off";
}
- platform: template
name: "Preset M2"
id: preset_m2
update_interval: 10s
options:
- "off"
- "eco"
- "comfort"
set_action:
- lambda: |-
if (x == "off") {
id(economy_mode_m2).turn_off();
id(party_mode_m2).turn_off();
} else if (x == "eco"){
id(economy_mode_m2).turn_on();
id(party_mode_m2).turn_off();
} else if (x == "comfort"){
id(economy_mode_m2).turn_off();
id(party_mode_m2).turn_on();
}
lambda: !lambda |-
if (not(id(economy_mode_m2).state) and not(id(party_mode_m2).state)) {
return (std::string) "off";
} else if (id(economy_mode_m2).state) {
return (std::string) "eco";
} else if (id(party_mode_m2).state) {
return (std::string) "comfort";
} else {
return (std::string) "off";
}
switch:
- platform: optolink
name: Economy mode
id: economy_mode
address: 0x2302
icon: mdi:sprout-outline
update_interval: 123s
- platform: optolink
name: Party mode
id: party_mode
address: 0x2303
icon: mdi:glass-cocktail
update_interval: 72s
- platform: optolink
name: Economy mode M2
id: economy_mode_m2
address: 0x3302
icon: mdi:sprout-outline
update_interval: 303s
- platform: optolink
name: Party mode M2
id: party_mode_m2
address: 0x3303
icon: mdi:glass-cocktail
update_interval: 307s
I’m not so sure about leaving BLE enabled but I don’t think it will make any harm?
Portal works as well:
Other thing is numbering of rx, tx pins. As per:
I set:
rx_pin: 44
tx_pin: 43
Is it correct?
But main question is: does optolink software contain any presets and may change settings of viessmann heater upon connecting this device?