Goal:
I want to turn a KNX switch on/off based on EVCC charger as heatpump, based on excess energy. KNX switch allows Heatpump for pool to work if target temp != actual temp.
Plan:
EVCC publishes on topic evcc/loadpoints/2/Freigabe_WP_Teich = true which is command_topic of switch.freigabe_waermepumpe_teich_mqtt = true if sufficient excess Energy is available at home.
This change triggers an automation Automation_Freigabe_Waermepumpe_Teich_EIN
Automation turns on switch.freigabe_waermepumpe_teich_knx
Heatpump is allowed to heat and warm water in pool based on PV Energy
Workings:
MQTT Mosquitto Plugin running
EVCC connected and pub to MQTT Broker. Confirmed on EVCC and used in HA as badge
MQTT Switch exists as HA Entity switch.freigabe_waermepumpe_teich_mqtt
KNX Switch integrated as HA Entity switch.freigabe_waermepumpe_teich_knx
KNX HA Entity changes/updates bidirectionally correctly send on/received from KNX bus
KNX Switch Config:
switch:
#KNX Switches
#UG Technik
- address: "3/7/11"
name: Freigabe Waermepumpe Teich KNX
state_address: "3/7/21"
Issues:
- EVCC seems not to be able to subscribe to MQTT topic. Changes made to switch are published to broker - visible in MQTT Explorer:
MQTT based switch config - tried via value_template, state_on/off and payload_on/off:
switch:
- name: "Freigabe Waermepumpe Teich MQTT"
unique_id: freigabe_waermepumpe_teich_mqtt
command_topic: "evcc/loadpoints/2/Freigabe_WP_Teich"
state_topic: "evcc/loadpoints/2/Freigabe_WP_Teich_Status"
payload_on: "true"
payload_off: "false"
# state_on: "true"
# state_off: "false"
optimistic: false
qos: 0
retain: true
# value_template: "{{ True | typeof }}"
- EVCC changes are not published to MQTT Topic in Broker. Log Entries Trace on MQTT from EVCC when making changes:
[mqtt ] TRACE 2025/04/15 12:15:58 send evcc/loadpoints/1/chargePower: '0'
[mqtt ] TRACE 2025/04/15 12:16:05 send evcc/loadpoints/2/batteryBoost: 'false'
[mqtt ] TRACE 2025/04/15 12:16:05 send evcc/loadpoints/2/mode: 'now'
[mqtt ] TRACE 2025/04/15 12:16:05 send evcc/updated: '1744712165'
[mqtt ] TRACE 2025/04/15 12:16:06 send evcc/loadpoints/2/batteryBoost: 'false'
[mqtt ] TRACE 2025/04/15 12:16:06 send evcc/loadpoints/2/mode: 'off'
[mqtt ] TRACE 2025/04/15 12:16:06 send evcc/updated: '1744712166
- Automation does not work. Changing state manually on MQTT Switch, does not lead to a state change in KNX switch.
alias: Automation_Freigabe_Waermepumpe_Teich_EIN
description: ""
triggers:
- trigger: state
entity_id:
- switch.freigabe_waermepumpe_teich_mqtt
from: "false"
to: "true"
conditions: []
actions:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.freigabe_waermepumpe_teich_knx
mode: single
Setup:
EVCC 203.1 running on RaspiPi5 as service
HA running on RaspiPi4B booting from SSD Drive (Core 2025.4.2; Supervisor 2025.04.0; Operating System 15.1)
MQTT Mosquitto integration running on HA