Buderus KM50 KM100 KM200
Hi,
with this flow it is possible to read data from the Buderus gas heater equipped with KM100. YOu need to install mycrypt and buffertrim also. (sudo npm install mycrypt).
[{"id":"1d164b764e2f04e4","type":"tab","label":"Buderus KM","disabled":false,"info":""},{"id":"b0628dc81b4b44f9","type":"inject","z":"1d164b764e2f04e4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":120,"y":260,"wires":[["3c8a7c3538748ad7"]]},{"id":"3c8a7c3538748ad7","type":"function","z":"1d164b764e2f04e4","name":"setup Request (change IP)","func":"function myFunction(item, index) {\n msg.url= domain+item;\n node.send([msg]);\n}\n\nmsg.headers = {};\nmsg.headers['User-Agent'] = 'TeleHeater/2.2.3';\ndomain = 'http://192.168.1.1';\nlist = `/dhwCircuits/dhw1\n/dhwCircuits/dhw1/actualTemp\n/dhwCircuits/dhw1/charge\n/dhwCircuits/dhw1/chargeDuration\n/dhwCircuits/dhw1/cpStartph\n/dhwCircuits/dhw1/currentSetpoint\n/dhwCircuits/dhw1/operationMode\n/dhwCircuits/dhw1/singleChargeSetpoint\n/dhwCircuits/dhw1/status\n/dhwCircuits/dhw1/switchPrograms\n/dhwCircuits/dhw1/tdMode\n/dhwCircuits/dhw1/tdsetPoint\n/dhwCircuits/dhw1/temperatureLevels\n/dhwCircuits/dhw1/temperatureLevels/high\n/dhwCircuits/dhw1/temperatureLevels/off\n/dhwCircuits/dhw1/waterFlow\n/dhwCircuits/dhw1/workingTime\n/gateway/boschSHPassword\n/gateway/DateTime\n/gateway/firmware\n/gateway/haiPassword\n/gateway/instAccess\n/gateway/instPassword\n/gateway/instWriteAccess\n/gateway/knxPassword\n/gateway/portalPassword\n/gateway/update\n/gateway/userpassword\n/gateway/uuid\n/gateway/version\n/gateway/versionFirmware\n/gateway/versionHardware\n/heatingCircuits\n/heatingCircuits/hc1\n/heatingCircuits/hc1/activeSwitchProgram\n/heatingCircuits/hc1/actualSupplyTemperature\n/heatingCircuits/hc1/controlType\n/heatingCircuits/hc1/currentOpModeInfo\n/heatingCircuits/hc1/currentRoomSetpoint\n/heatingCircuits/hc1/designTemp\n/heatingCircuits/hc1/fastHeatupFactor\n/heatingCircuits/hc1/heatCurveMax\n/heatingCircuits/hc1/heatCurveMin\n/heatingCircuits/hc1/manualRoomSetpoint\n/heatingCircuits/hc1/nextSetpoint\n/heatingCircuits/hc1/operationMode\n/heatingCircuits/hc1/pumpModulation\n/heatingCircuits/hc1/roomInfluence\n/heatingCircuits/hc1/roomtemperature\n/heatingCircuits/hc1/roomTempOffset\n/heatingCircuits/hc1/setpointOptimization\n/heatingCircuits/hc1/solarInfluence\n/heatingCircuits/hc1/status\n/heatingCircuits/hc1/suWiSwitchMode\n/heatingCircuits/hc1/suWiThreshold\n/heatingCircuits/hc1/switchPrograms\n/heatingCircuits/hc1/switchPrograms/A\n/heatingCircuits/hc1/switchPrograms/B\n/heatingCircuits/hc1/temperatureLevels\n/heatingCircuits/hc1/temperatureLevels/comfort2\n/heatingCircuits/hc1/temperatureLevels/eco\n/heatingCircuits/hc1/temperatureRoomSetpoint\n/heatingCircuits/hc1/temporaryRoomSetpoint\n/heatingCircuits/hc1/timeToNextSetpoint\n/heatSources\n/heatSources/actualCHPower\n/heatSources/actualDHWPower\n/heatSources/actualModulation\n/heatSources/actualPower\n/heatSources/actualSupplyTemperature\n/heatSources/applianceSupplyTemperature\n/heatSources/burnerModulationSetpoint\n/heatSources/burnerPowerSetpoint\n/heatSources/ChimneySweeper\n/heatSources/CHpumpModulation\n/heatSources/flameCurrent\n/heatSources/flameStatus\n/heatSources/gasAirPressure\n/heatSources/hs1\n/heatSources/hs1/actualCHPower\n/heatSources/hs1/actualDHWPower\n/heatSources/hs1/actualModulation\n/heatSources/hs1/actualPower\n/heatSources/hs1/CHpumpModulation\n/heatSources/hs1/energyReservoir\n/heatSources/hs1/flameStatus\n/heatSources/hs1/fuel\n/heatSources/hs1/fuel/caloricValue\n/heatSources/hs1/fuel/density\n/heatSources/hs1/fuelConsmptCorrFactor\n/heatSources/hs1/info\n/heatSources/hs1/nominalCHPower\n/heatSources/hs1/nominalDHWPower\n/heatSources/hs1/nominalFuelConsumption\n/heatSources/hs1/numberOfStarts\n/heatSources/hs1/reservoirAlert\n/heatSources/hs1/supplyTemperatureSetpoint\n/heatSources/hs1/type\n/heatSources/info\n/heatSources/nominalCHPower\n/heatSources/nominalDHWPower\n/heatSources/numberOfStarts\n/heatSources/powerSetpoint\n/heatSources/returnTemperature\n/heatSources/supplyTemperatureSetpoint\n/heatSources/systemPressure\n/heatSources/workingTime\n/heatSources/workingTime/centralHeating\n/heatSources/workingTime/secondBurner\n/heatSources/workingTime/totalSystem\n/notifications\n/recordings\n/recordings/heatingCircuits\n/recordings/heatingCircuits/hc1\n/recordings/heatingCircuits/hc1/roomtemperature\n/recordings/heatSources\n/recordings/heatSources/actualCHPower\n/recordings/heatSources/actualDHWPower\n/recordings/heatSources/actualPower\n/recordings/heatSources/hs1\n/recordings/heatSources/hs1/actualPower\n/recordings/system\n/recordings/system/heatSources\n/recordings/system/heatSources/hs1\n/recordings/system/heatSources/hs1/actualPower\n/recordings/system/sensors\n/recordings/system/sensors/temperatures\n/recordings/system/sensors/temperatures/outdoor_t1\n/solarCircuits\n/solarCircuits/sc1/collectorTemperature\n/solarCircuits/sc1/pumpModulation\n/solarCircuits/sc1/solarYield\n/solarCircuits/sc1/status\n/system\n/system/appliance\n/system/appliance/actualPower\n/system/appliance/actualSupplyTemperature\n/system/appliance/ChimneySweeper\n/system/appliance/CHpumpModulation\n/system/appliance/flameCurrent\n/system/appliance/gasAirPressure\n/system/appliance/nominalBurnerLoad\n/system/appliance/numberOfStarts\n/system/appliance/powerSetpoint\n/system/appliance/systemPressure\n/system/appliance/workingTime\n/system/appliance/workingTime/centralHeating\n/system/appliance/workingTime/secondBurner\n/system/appliance/workingTime/totalSystem\n/system/brand\n/system/bus\n/system/healthStatus\n/system/heatSources\n/system/heatSources/hs1\n/system/heatSources/hs1/actualModulation\n/system/heatSources/hs1/actualPower\n/system/heatSources/hs1/energyReservoir\n/system/heatSources/hs1/fuel\n/system/heatSources/hs1/fuel/caloricValue\n/system/heatSources/hs1/fuel/density\n/system/heatSources/hs1/fuelConsmptCorrFactor\n/system/heatSources/hs1/nominalFuelConsumption\n/system/heatSources/hs1/reservoirAlert\n/system/holidayModes\n/system/holidayModes/hm1\n/system/holidayModes/hm1/assignedTo\n/system/holidayModes/hm1/delete\n/system/holidayModes/hm1/dhwMode\n/system/holidayModes/hm1/hcMode\n/system/holidayModes/hm1/startStop\n/system/holidayModes/hm2\n/system/holidayModes/hm2/assignedTo\n/system/holidayModes/hm2/delete\n/system/holidayModes/hm2/dhwMode\n/system/holidayModes/hm2/hcMode\n/system/holidayModes/hm2/startStop\n/system/holidayModes/hm3\n/system/holidayModes/hm3/assignedTo\n/system/holidayModes/hm3/delete\n/system/holidayModes/hm3/dhwMode\n/system/holidayModes/hm3/hcMode\n/system/holidayModes/hm3/startStop\n/system/holidayModes/hm4\n/system/holidayModes/hm4/assignedTo\n/system/holidayModes/hm4/delete\n/system/holidayModes/hm4/dhwMode\n/system/holidayModes/hm4/hcMode\n/system/holidayModes/hm4/startStop\n/system/holidayModes/hm5\n/system/holidayModes/hm5/assignedTo\n/system/holidayModes/hm5/delete\n/system/holidayModes/hm5/dhwMode\n/system/holidayModes/hm5/hcMode\n/system/holidayModes/hm5/startStop\n/system/info\n/system/minOutdoorTemp\n/system/sensors\n/system/sensors/temperatures\n/system/sensors/temperatures/chimney\n/system/sensors/temperatures/hotWater_t1\n/system/sensors/temperatures/hotWater_t2\n/system/sensors/temperatures/outdoor_t1\n/system/sensors/temperatures/return\n/system/sensors/temperatures/supply_t1\n/system/sensors/temperatures/supply_t1_setpoint\n/system/sensors/temperatures/switch\n/system/systemType\n/heatSources/energyMonitoring/consumption`;\n\nkm_topics = list.split(/\\r\\n|(?!\\r\\n)[\\n-\\r\\x85\\u2028\\u2029]/);\nkm_topics.forEach(myFunction);","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":260,"wires":[["148f495164330e45"]]},{"id":"5e128123be8c0169","type":"http request","z":"1d164b764e2f04e4","name":"Request KM200","method":"GET","ret":"bin","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":840,"y":260,"wires":[["c8d054b2c96f1e9e","ce4c476fb34058f3"]]},{"id":"19f519f1bbae670e","type":"debug","z":"1d164b764e2f04e4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1530,"y":220,"wires":[]},{"id":"40f04fe84c546962","type":"function","z":"1d164b764e2f04e4","name":"decode payload (change key)","func":"//Includes\nvar mcrypt = global.get('mcrypt');\nvar buffertrim = global.get('buffertrim');\n\n//Set up decryption\nvar MCrypt = mcrypt.MCrypt;\n//Get Key from https://ssl-account.com/km200.andreashahn.info\nvar key = '--InsertYourKeyhere--';\nvar key32 = new Buffer(key, 'hex');\nvar desEcb = new MCrypt('rijndael-128', 'ecb');\ndesEcb.open(key32);\n\n//decrypt the payload\nmsg.payload = msg.payload.slice(2).toString(); //Remove x0a x0d from Payload\nvar bodyBuffer = Buffer.from(msg.payload, 'base64');\nvar dataBuffer = buffertrim.trimEnd(desEcb.decrypt(bodyBuffer, 'base64'));\nvar result = JSON.parse(dataBuffer.toString());\n\n//return values\nvar newmsg = {};\nnewmsg.payload = result;\nreturn newmsg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1290,"y":260,"wires":[["19f519f1bbae670e","750b66b10c113ad6","c0c7e21f76f0ddff"]]},{"id":"ba1517c06be7f586","type":"debug","z":"1d164b764e2f04e4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1730,"y":260,"wires":[]},{"id":"148f495164330e45","type":"delay","z":"1d164b764e2f04e4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"5","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":620,"y":260,"wires":[["5e128123be8c0169","7fb78228bb644247"]]},{"id":"c8d054b2c96f1e9e","type":"debug","z":"1d164b764e2f04e4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1010,"y":200,"wires":[]},{"id":"750b66b10c113ad6","type":"template","z":"1d164b764e2f04e4","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.id}}: {{payload.value}} {{payload.unitOfMeasure}}","output":"str","x":1540,"y":260,"wires":[["ba1517c06be7f586"]]},{"id":"c0c7e21f76f0ddff","type":"function","z":"1d164b764e2f04e4","name":"Insert","func":"if (msg.payload.value == 'off'){ msg.payload.value = 0 }\nif (msg.payload.value == 'on' ){ msg.payload.value = 1 }\n\nif (msg.payload.type == 'stringValue'){msg.payload.value = '\\''+ msg.payload.value + '\\''}\n\n\nnewmsg = {};\nnewmsg.topic = 'INSERT INTO T_HEATING_TEST (TIME, SOURCE, VALUE, UNIT) VALUES ( CURRENT_TIMESTAMP, \\''+ msg.payload.id +'\\', ' + msg.payload.value + ', \\'' + msg.payload.unitOfMeasure + '\\');';\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1530,"y":320,"wires":[["bcf2507a19b0c18c"]]},{"id":"bcf2507a19b0c18c","type":"debug","z":"1d164b764e2f04e4","name":"Your DB","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1720,"y":320,"wires":[]},{"id":"7fb78228bb644247","type":"debug","z":"1d164b764e2f04e4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":200,"wires":[]},{"id":"ce4c476fb34058f3","type":"switch","z":"1d164b764e2f04e4","name":"statusCode 2XX","property":"statusCode","propertyType":"msg","rules":[{"t":"btwn","v":"200","vt":"num","v2":"299","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1040,"y":260,"wires":[["40f04fe84c546962"]]}]