Smarten up your heat pump

The present article describes how I integrated a Buderus heat pump into a KNX smart home using the Buderus KM200 module. The primary goal was to read out the states of the device in order to understand when device is doing what and why. The secondary goal was to be able to switch between heating/cooling mode in order to switch the season (winter/summer) of the heating system globally.

The KM 200

The KM200 is a sort of cloud gateway for Buderus heating systems. With it you can get access to your heat pump through the Buderus mobile App MyDevice. The App can access the KM200 either throught the Buderus cloud or through the local network using an HTTP API. However, the local HTTP API is encrypted.

Decrypting the API

Searching through the Internet, fortunately many others already found out the detail about the used encryption. A good description can be found at web-km200. The steps described there need to be followed in order to deduce the encryption key.

The HTTP API exposes various paths that depend on the attached heating system, i.e. the heat pump model and its characteristics.

Here are the ones I found on mine:

{Id:/dhwCircuits/dhw1/charge Value:stop Writeable:true}
{Id:/dhwCircuits/dhw1/chargeDuration Value:60 Writeable:true}
{Id:/dhwCircuits/dhw1/currentSetpoint Value:50 Writeable:false}
{Id:/dhwCircuits/dhw1/holidayMode/activated Value: Writeable:false}
{Id:/dhwCircuits/dhw1/operationMode Value:high Writeable:true}
{Id:/dhwCircuits/dhw1/singleChargeSetpoint Value:60 Writeable:true}
{Id:/dhwCircuits/dhw1/status Value:ACTIVE Writeable:false}
{Id:/dhwCircuits/dhw1/temperatureLevels/high Value:50 Writeable:true}
{Id:/dhwCircuits/dhw1/temperatureLevels/low Value:45 Writeable:true}
{Id:/dhwCircuits/dhw1/temperatureLevels/off Value:0 Writeable:false}
{Id:/dhwCircuits/dhw1/waterFlow Value:0 Writeable:false}
{Id:/dhwCircuits/dhw1/workingTime Value:0 Writeable:false}
{Id:/gateway/DateTime Value:2024-01-20T20:26:02 Writeable:true}
{Id:/gateway/instAccess Value:off Writeable:true}
{Id:/gateway/instWriteAccess Value:off Writeable:true}
{Id:/gateway/logging/userAcceptance Value:false Writeable:true}
{Id:/gateway/update/status Value:completed Writeable:false}
{Id:/gateway/uuid Value:340100668 Writeable:false}
{Id:/gateway/versionFirmware Value:04.08.02 Writeable:false}
{Id:/gateway/versionHardware Value:iCom_Low_NSC_v1 Writeable:false}
{Id:/heatSources/CHpumpModulation Value:0 Writeable:false}
{Id:/heatSources/ChimneySweeper Value:off Writeable:false}
{Id:/heatSources/actualModulation Value:0 Writeable:false}
{Id:/heatSources/actualSupplyTemperature Value:42.1 Writeable:false}
{Id:/heatSources/applianceSupplyTemperature Value:44 Writeable:false}
{Id:/heatSources/burnerModulationSetpoint Value:0 Writeable:false}
{Id:/heatSources/delayTimer Value:<nil> Writeable:false}
{Id:/heatSources/emStatus Value:notConnected Writeable:false}
{Id:/heatSources/energyMonitoring/consumption Value:938361.9 Writeable:true}
{Id:/heatSources/energyMonitoring/correctionFactor Value:1 Writeable:true}
{Id:/heatSources/energyMonitoring/maxTankLevel Value:0 Writeable:true}
{Id:/heatSources/energyMonitoring/minTankLevel Value:0 Writeable:true}
{Id:/heatSources/energyMonitoring/startDateTime Value:2024-01-03T14:04:01 Writeable:false}
{Id:/heatSources/energyMonitoring/tankLevel Value:0 Writeable:true}
{Id:/heatSources/fanSpeed_setpoint Value:0 Writeable:false}
{Id:/heatSources/flameStatus Value:off Writeable:false}
{Id:/heatSources/hs1/actualModulation Value:0 Writeable:false}
{Id:/heatSources/hs1/flameStatus Value:off Writeable:false}
{Id:/heatSources/hs1/info Value:<nil> Writeable:false}
{Id:/heatSources/hs1/type Value:Heatpump Writeable:false}
{Id:/heatSources/info Value:<nil> Writeable:false}
{Id:/heatSources/nominalCHPower Value:24 Writeable:false}
{Id:/heatSources/nominalDHWPower Value:24 Writeable:false}
{Id:/heatSources/numberOfStarts Value:1396 Writeable:false}
{Id:/heatSources/poolTemperature Value:0 Writeable:false}
{Id:/heatSources/powerSetpoint Value:0 Writeable:false}
{Id:/heatSources/returnTemperature Value:37.5 Writeable:false}
{Id:/heatSources/supplyTemperatureSetpoint Value:45 Writeable:false}
{Id:/heatSources/workingTime/centralHeating Value:0 Writeable:false}
{Id:/heatSources/workingTime/secondBurner Value:0 Writeable:false}
{Id:/heatSources/workingTime/totalSystem Value:8.19162e+06 Writeable:false}
{Id:/heatingCircuits/hc1/actualSupplyTemperature Value:42.2 Writeable:false}
{Id:/heatingCircuits/hc1/currentRoomSetpoint Value:21 Writeable:false}
{Id:/heatingCircuits/hc1/currentSuWiMode Value:forced Writeable:false}
{Id:/heatingCircuits/hc1/holidayMode/activated Value: Writeable:false}
{Id:/heatingCircuits/hc1/manualRoomSetpoint Value:21 Writeable:true}
{Id:/heatingCircuits/hc1/operationMode Value:manual Writeable:true}
{Id:/heatingCircuits/hc1/pumpModulation Value:0 Writeable:false}
{Id:/heatingCircuits/hc1/roomtemperature Value:22.7 Writeable:false}
{Id:/heatingCircuits/hc1/status Value:ACTIVE Writeable:false}
{Id:/heatingCircuits/hc1/suWiSwitchMode Value:forced Writeable:true}
{Id:/heatingCircuits/hc1/supplyTemperatureSetpoint Value:45 Writeable:false}
{Id:/heatingCircuits/hc1/switchPrograms/A Value:<nil> Writeable:true}
{Id:/heatingCircuits/hc1/switchPrograms/B Value:<nil> Writeable:true}
{Id:/heatingCircuits/hc1/temperatureRoomSetpoint Value:21 Writeable:true}
{Id:/heatingCircuits/hc2/actualSupplyTemperature Value:31.6 Writeable:false}
{Id:/heatingCircuits/hc2/currentRoomSetpoint Value:21 Writeable:false}
{Id:/heatingCircuits/hc2/currentSuWiMode Value:forced Writeable:false}
{Id:/heatingCircuits/hc2/holidayMode/activated Value: Writeable:false}
{Id:/heatingCircuits/hc2/manualRoomSetpoint Value:21 Writeable:true}
{Id:/heatingCircuits/hc2/operationMode Value:manual Writeable:true}
{Id:/heatingCircuits/hc2/pumpModulation Value:100 Writeable:false}
{Id:/heatingCircuits/hc2/roomtemperature Value:22.7 Writeable:false}
{Id:/heatingCircuits/hc2/status Value:ACTIVE Writeable:false}
{Id:/heatingCircuits/hc2/suWiSwitchMode Value:forced Writeable:true}
{Id:/heatingCircuits/hc2/supplyTemperatureSetpoint Value:30 Writeable:false}
{Id:/heatingCircuits/hc2/switchPrograms/A Value:<nil> Writeable:true}
{Id:/heatingCircuits/hc2/switchPrograms/B Value:<nil> Writeable:true}
{Id:/heatingCircuits/hc2/temperatureRoomSetpoint Value:21 Writeable:true}
{Id:/notifications Value:<nil> Writeable:false}
{Id:/recordings/dhwCircuits/dhw1/actualTemp Value:<nil> Writeable:false}
{Id:/recordings/heatSources/total/energyMonitoring/compressor Value:<nil> Writeable:false}
{Id:/recordings/heatSources/total/energyMonitoring/consumedEnergy Value:<nil> Writeable:false}
{Id:/recordings/heatSources/total/energyMonitoring/eheater Value:<nil> Writeable:false}
{Id:/recordings/heatSources/total/energyMonitoring/outputProduced Value:<nil> Writeable:false}
{Id:/recordings/heatingCircuits/hc1/roomtemperature Value:<nil> Writeable:false}
{Id:/recordings/heatingCircuits/hc2/roomtemperature Value:<nil> Writeable:false}
{Id:/recordings/system/sensors/temperatures/outdoor_t1 Value:<nil> Writeable:false}
{Id:/system/appliance/actualSupplyTemperature Value:42.2 Writeable:false}
{Id:/system/brand Value:Buderus Writeable:false}
{Id:/system/bus Value:EMS2_0 Writeable:false}
{Id:/system/healthStatus Value:ok Writeable:false}
{Id:/system/holidayModes/hm1/assignedTo Value:<nil> Writeable:true}
{Id:/system/holidayModes/hm1/dhwMode Value:OFF Writeable:true}
{Id:/system/holidayModes/hm1/fixTemperature Value:17 Writeable:true}
{Id:/system/holidayModes/hm1/hcMode Value:FIX_TEMP Writeable:true}
{Id:/system/holidayModes/hm1/startStop Value:2017-01-01/2017-01-01 Writeable:true}
{Id:/system/holidayModes/hm2/assignedTo Value:<nil> Writeable:true}
{Id:/system/holidayModes/hm2/dhwMode Value:OFF Writeable:true}
{Id:/system/holidayModes/hm2/fixTemperature Value:17 Writeable:true}
{Id:/system/holidayModes/hm2/hcMode Value:FIX_TEMP Writeable:true}
{Id:/system/holidayModes/hm2/startStop Value:2017-01-01/2017-01-01 Writeable:true}
{Id:/system/holidayModes/hm3/assignedTo Value:<nil> Writeable:true}
{Id:/system/holidayModes/hm3/dhwMode Value:OFF Writeable:true}
{Id:/system/holidayModes/hm3/fixTemperature Value:17 Writeable:true}
{Id:/system/holidayModes/hm3/hcMode Value:FIX_TEMP Writeable:true}
{Id:/system/holidayModes/hm3/startStop Value:2017-01-01/2017-01-01 Writeable:true}
{Id:/system/holidayModes/hm4/assignedTo Value:<nil> Writeable:true}
{Id:/system/holidayModes/hm4/dhwMode Value:OFF Writeable:true}
{Id:/system/holidayModes/hm4/fixTemperature Value:17 Writeable:true}
{Id:/system/holidayModes/hm4/hcMode Value:FIX_TEMP Writeable:true}
{Id:/system/holidayModes/hm4/startStop Value:2017-01-01/2017-01-01 Writeable:true}
{Id:/system/holidayModes/hm5/assignedTo Value:<nil> Writeable:true}
{Id:/system/holidayModes/hm5/dhwMode Value:OFF Writeable:true}
{Id:/system/holidayModes/hm5/fixTemperature Value:17 Writeable:true}
{Id:/system/holidayModes/hm5/hcMode Value:FIX_TEMP Writeable:true}
{Id:/system/holidayModes/hm5/startStop Value:2017-01-01/2017-01-01 Writeable:true}
{Id:/system/info Value:<nil> Writeable:false}
{Id:/system/minOutdoorTemp Value:-10 Writeable:true}
{Id:/system/sensors/temperatures/outdoor_t1 Value:-1.5 Writeable:false}
{Id:/system/sensors/temperatures/return Value:37.6 Writeable:false}
{Id:/system/sensors/temperatures/supply_t1 Value:42.2 Writeable:false}
{Id:/system/sensors/temperatures/supply_t1_setpoint Value:45 Writeable:false}
{Id:/system/sensors/temperatures/switch Value:42.2 Writeable:false}
{Id:/system/systemType Value:NSC_ICOM_GATEWAY Writeable:false}

Accessing the API with Node-RED

Once the encryption key has been deduced it is easy to create a flow in Node-RED to access the API.

Node-RED flow for KM200

timestamp issues a timestamp every 20s to trigger the API read at a certain interval.

setup Request defines the combinations of the API paths, the KNX group address and the KNX datapoint type (DTP). This generates one request for every path.

limit 5 msg/s slows the request chain down so that at max 5 requests/s go towards the KM200.

Request KM200 issues an HTTP request towards the API

statusCode2XX checks that the returned HTTP status code is 2XX

decode payload decodes the payload in order to get the real value

KNX Device sends the value to the specified KNX group address through a connected KNX IP interface

The complete flow can be downloaded here: node-red-flow.json.

In order for the flow to work search for <KM200-IP-ADDRESS> and <ENCRYPTION-KEY> and replace them accordingly.

The flow has the following javascript dependencies:

  • mcrypt
  • buffertrim

and the following node-red module dependencies:

  • node-red-contrib-knx
  • node-red-contrib-knx-ultimate

Thurwieser Spitze

/media/pictures/2019/2019-07-24-thurwieser-spitze/s/thurwieser-4.jpg

Start: Trafoi, Hl. Drei Brunnen (1600m)

Ziel: Thurwieser Spitze (3652m)

Wegbeschreibung (kurz): Trafoi, Hl. Drei Brunnen (1600m) - Berglhütte (2188m) - Niederer Ortlerferner (2600m) - Bivacco L. Pellicioli (3230m) - Kleiner Eiskogel (3503m) - Großer Eiskogel (3530m) - Thurwieser Joch (3480m) - Thurwieser Spitze (3652m)

An einem Dienstag entscheiden wir kurzerhand, dass es Zeit für eine Hochtour …

read more

Milchstraße Penser Joch

/media/pictures/2019/2019-06-09-milchstrasse/s/milchstrasse-1.jpg

Eigentlich wollte ich in den letzten Jahren öfters die Milchstraße fotografieren, aber das Abwarten auf entsprechende Konditionen und der Zeitaufwand der Planung lassen es dann doch nicht ganz so oft zu. Generell fotografiert man die Milchstraße in Europa am besten in den Früjharsmonaten April/Mai. Dort ist das Zentrum recht …

read more

Skitour Keilbachspitze

/media/pictures/2019/2019-05-02-keilbachspitze/s/keilbachspitze-4.jpg

Start: Mühlegg, Hochlärchen (1360m)

Ziel: Keilbachspitze (3093m)

Wegbeschreibung (kurz): Mühlegg, Hochlärchen (1360m) - Platterhaus-Hütte (1716m) - Gruben (1950m) - Sandraine (2500m) - Keilbachspitze (3093m)

Für den zweiten Tag unseres Ahrntal-Reintal-Aufenthalts haben wir uns die Keilbachspitze vorgenommen - es verspricht wieder ein herrlicher Tag zu werden. Zeitig brechen wir von unserer Pension in Rein auf nach …

read more

Skitour Dreieckspitz

/media/pictures/2019/2019-05-01-dreieckspitz/s/dreieckspitz-1.jpg

Start: Rein, Knutental-Parkplatz (1700m)

Ziel: Dreieckspitz (3031m)

Wegbeschreibung (kurz): Rein, Knutental-Parkplatz (1700m) - Untere Kofleralm (2034m) - Kofler Seen (2450m) - Bärenlueg-Scharte (2848m) - Dreieckspitz (3031m) - Lacke (2780m) - Napfen Lacken (2500m) - Knuttenalm (1896m) - Knutental-Parkplatz (1700m)

Dieses jahr hat es im April noch stark geschneit, weshalb es Anfang Mai tatsächlich noch möglich ist Pulvertouren zu …

read more

Hochgall

/media/pictures/2018/2018-08-04-hochgall/s/hochgall-6.jpg

Start: Rein in Taufers, Säge (1590m)

Ziel: Hochgall (3436m)

Wegbeschreibung (kurz): Rein in Taufers, Säge (1590m) - Kasseler Hütte (2276m) - Wegpunkt (2550m) - Lacke (2560m) - Einstieg Grat (2800m) - Graues Nöckl (3084m) - Hochgall (3436m)

Der Hochgall hoch über dem Reintal stand schon lange auf meiner Liste. An einem Freitag, nach der Arbeit, mache …

read more

Skitour Ortlergruppe AVS Etschtal

/media/pictures/2018/2018-04-05-ortlergruppe/s/ortlergruppe-18.jpg

Start: Marteller Talschluss (2055m)

Ziele: Dritte (östliche) Veneziaspitze (3356m), Zufallspitze (3757m), Cevedale (3769m), Palon de la Mare (3703m), Punta San Matteo (3678m), Scharte Cima San Giacomo (3220m), Monte Pasquale (3553m)

Wegbeschreibung (kurz):

Tag 1: Marteller Talschluss (2055m) - Marteller Hütte (2610m) - Schranferner (2950m) - Dritte (östliche) Veneziaspitze (3356m) - Marteller Hütte (2610m)

Tag …

read more

Skitour Zunderspitz

/media/pictures/2018/2018-01-27-zunderspitz/s/zunderspitz-3.jpg

Start: Maiern (1395m)

Ziel: Zunderspitz (2445m)

Wegbeschreibung (kurz): Maiern Hotel Schneeberg (1395m) - Sommerweg 30 (1570m) - Mortalm (1735m) - Obere Gewingesalm (2050m) - Zunderspitz (2445m) - Abfahrt bis Untere Gewingesalm (1782m) - Aufstieg zur Oberen Gewingesalm (2050m) - Abfahrt zur Mortalm (1735m) - Maiern (1395m)

Skitourentechnisch haben wir heuer eine Traumsaison, wie schon lange nicht mehr. Nachdem …

read more

Geisler Alm

/media/pictures/2018/2018-01-05-geisler-alm/s/geisler-alm-1.jpg

Mondscheinrodeln ohne Mond? Na klar, vor allem dann, wenn im Rucksack noch die Kamera und das Stativ Platz finden ;) Die Zeit war leider etwas knapp, sodass ich nur mit einem einzigen einigermaßen guten Foto nach Hause kam. Jetzt hab ich das Samyang 12mm seit ca. 2 Monaten und bin immer …

read more

Langfenn - Goldene Stunde, Sternenhimmel

/media/pictures/2017/2017-12-16-langfenn-goldene-stunde-sternenhimmel/s/langfenn-goldene-stunde-sternenhimmel-5.jpg

Letztes Wochenende waren wir zur goldenen Stunde am Salten oberhalb von Bozen unterwegs. Eigentlich wollten wir ein paar Sonnenuntergangsfotos schießen, aber später erkannten wir, dass wir uns zufällig genau den richtigen Abend ausgesucht hatten. Laut Mondphase waren es nur mehr zwei Tage bis Neumond. Bei Neumond ist für einige Nächte …

read more