{"id":206,"date":"2023-04-19T22:49:14","date_gmt":"2023-04-19T20:49:14","guid":{"rendered":"https:\/\/gilbert.busana.lu\/?p=206"},"modified":"2025-03-10T10:10:03","modified_gmt":"2025-03-10T09:10:03","slug":"integrating-a-buderus-boiler-into-openhab","status":"publish","type":"post","link":"https:\/\/www.homeserver.lu\/?p=206","title":{"rendered":"Integrating a Buderus boiler into openHAB"},"content":{"rendered":"\n<p>In search to connect our Buderus boiler (heating, warm water system, hot water solar panels) to <a href=\"http:\/\/www.openhab.org\" target=\"_blank\" rel=\"noreferrer noopener\">openHAB<\/a>, I stumbled over an <a rel=\"noreferrer noopener\" href=\"https:\/\/bbqkees-electronics.nl\/product-category\/ems\/gateway\/\" target=\"_blank\">EMS gateway<\/a> developed by a dutch engineer. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Installing the EMS gateway<\/h2>\n\n\n\n<p>I ordered the Wifi edition and connected it via the mini-jack cable to the boiler system. The boiler system also delivers power to the gateway over this cable.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"571\" src=\"https:\/\/gilbert.busana.lu\/wp-content\/uploads\/2023\/04\/EMS-ESP-1024x571.png\" alt=\"\" class=\"wp-image-209\" srcset=\"https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/EMS-ESP-1024x571.png 1024w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/EMS-ESP-300x167.png 300w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/EMS-ESP-768x428.png 768w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/EMS-ESP-1536x857.png 1536w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/EMS-ESP-624x348.png 624w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/EMS-ESP.png 1832w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">EMS gateway dashboard<\/figcaption><\/figure>\n\n\n\n<p>The connection to the WIFI network was straight forward (chapter 8.1 of the <a href=\"https:\/\/bbqkees-electronics.nl\/wp-content\/uploads\/documents\/manuals\/User-manual-EMS-Gateway.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">manual<\/a>) and the gateway automatically detected all the devices connected to our boiler. It immediately started displaying live data from the boiler.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Setting up an MQTT broker<\/h2>\n\n\n\n<p>We will use <a rel=\"noreferrer noopener\" href=\"http:\/\/www.steves-internet-guide.com\/mqtt-works\/\" target=\"_blank\">MQTT<\/a>  to send the boiler data to the openHAB system: the EMS gateway will send the boiler data to the MQTT broker which relays it onto the network. openHAB then needs to listen to this telegrams and interpret them.<\/p>\n\n\n\n<p>Installing Mosquitto in an ubuntu VM was straight forward:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt-get install mosquitto mosquitto-clients<\/code><\/pre><\/div>\n\n\n\n<p>If you run the MQTT broker behind a firewall, it might not be necessary to force authentication. Entering the <em>IP address<\/em> and <em>port<\/em> of the MQTT broker in the gateway was straight forward. Do not forget to define a <em>base<\/em>, a kind of a channel on which MQTT will broadcast your telegrams. I chose <em>ems-esp<\/em>. The gateway then immediately began sending the boiler data to the broker.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. prepare openHAB to receive and treat the incoming data<\/h2>\n\n\n\n<p>3a: Go to openHAB&#8217;s <em>administration<\/em> <em>settings<\/em>, <em>Add-ons: Bindings<\/em> and install the <em><a href=\"https:\/\/www.openhab.org\/addons\/bindings\/mqtt\/\" target=\"_blank\" rel=\"noreferrer noopener\">MQTT binding<\/a><\/em>.<\/p>\n\n\n\n<p>3b. Go to openHAB&#8217;s<em> administration settings<\/em>, <em>Add-ons: Other Add-ons<\/em>, <em>Transformation Add-ons <\/em>and install the<a href=\"https:\/\/www.openhab.org\/addons\/transformations\/jsonpath\/\" target=\"_blank\" rel=\"noreferrer noopener\"> <em>JSONPATH Transformation<\/em><\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Configure openHAB to receive the MQTT telegrams<\/h2>\n\n\n\n<p>4a.1: From this step on, you can either add a &#8220;<a href=\"https:\/\/www.openhab.org\/addons\/bindings\/mqtt.homeassistant\/\" target=\"_blank\" rel=\"noreferrer noopener\">HomeAssistant MQTT Component<\/a>&#8221; which auto-detects all EMS things. In order for this to work, you need to activate the &#8220;<em>MQTT Discovery (Home Assistant, Domoticz)<\/em>&#8221; in the <em>MQTT settings<\/em> in the EMS gateway.<\/p>\n\n\n\n<p>4a.2: I decided to go the manual way to have full control over the things and items to add to openHAB.<br>You need to add an <em>MQTT Broker bridge<\/em>. Go to the <em>things<\/em> tab and add a thing based on the <em>MQTT binding<\/em>. Select <em>MQTT Broker<\/em>. Enter the <em>IP address<\/em> of the MQTT broker. Save.<\/p>\n\n\n\n<p>4b. Then add a <em>Generic MQTT Thing<\/em>. I linked it to the above created bridge. To have a better overview, I created a generic thing for the boiler, one for the warm water and one for the solar data.<\/p>\n\n\n\n<p>4c: Now you have to add the data points that you want to import into openHAB as items. If you don&#8217;t know which data points are available, use an MQTT Explorer to get a better insight into your data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"694\" src=\"https:\/\/gilbert.busana.lu\/wp-content\/uploads\/2023\/04\/MQTT-Explorer-public-1-1024x694.png\" alt=\"\" class=\"wp-image-223\" srcset=\"https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/MQTT-Explorer-public-1-1024x694.png 1024w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/MQTT-Explorer-public-1-300x203.png 300w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/MQTT-Explorer-public-1-768x520.png 768w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/MQTT-Explorer-public-1-1536x1041.png 1536w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/MQTT-Explorer-public-1-624x423.png 624w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/MQTT-Explorer-public-1.png 2025w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">MQTT Explorer showing warm water telegrams<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"963\" height=\"570\" src=\"https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/ems-esp-3.7.1-1.png\" alt=\"\" class=\"wp-image-1209\" srcset=\"https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/ems-esp-3.7.1-1.png 963w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/ems-esp-3.7.1-1-300x178.png 300w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/ems-esp-3.7.1-1-768x455.png 768w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/ems-esp-3.7.1-1-624x369.png 624w\" sizes=\"auto, (max-width: 963px) 100vw, 963px\" \/><figcaption class=\"wp-element-caption\">MQTT Explorer showing warm water telegrams (EMS-ESP version 3.7.1)<\/figcaption><\/figure>\n\n\n\n<p>4d: For each data point, you need to define a channel in openHAB. Open the <em>MQTT generic<\/em> <em>thing<\/em> that you created, click on the <em>channel tab<\/em>, and click <em>add channel<\/em>. Add the <em>channel identifier<\/em>, the <em>label<\/em> and select the corresponding <em>channel type<\/em>. In our example, we select <em>Number Value<\/em>, as we want to catch a temperature value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"1024\" src=\"https:\/\/gilbert.busana.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-1-664x1024.png\" alt=\"\" class=\"wp-image-226\" srcset=\"https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-1-664x1024.png 664w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-1-194x300.png 194w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-1-768x1185.png 768w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-1-995x1536.png 995w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-1-1327x2048.png 1327w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-1-624x963.png 624w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-1.png 1440w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><figcaption class=\"wp-element-caption\">First step creating the channel<\/figcaption><\/figure>\n\n\n\n<p>The <em>MQTT State Topic<\/em>&#8216;s first part is the <em>base<\/em> that you defined in the MQTT broker settings in the EMS gateway. In our case:<em> ems-esp<\/em>. The second part of the <a href=\"http:\/\/www.steves-internet-guide.com\/understanding-mqtt-topics\/\" target=\"_blank\" rel=\"noreferrer noopener\">topic<\/a> gives more details about the object you want to catch. Your MQTT explorer will help you determine which information telegrams are available.<\/p>\n\n\n\n<p>In order to precise which value of the current object you want to import, you have to click the <em>Show advanced<\/em> check box.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"1024\" src=\"https:\/\/gilbert.busana.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-information-593x1024.png\" alt=\"\" class=\"wp-image-233\" srcset=\"https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-information-593x1024.png 593w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-information-174x300.png 174w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-information-768x1327.png 768w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-information-889x1536.png 889w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-information-1185x2048.png 1185w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-information-624x1078.png 624w, https:\/\/www.homeserver.lu\/wp-content\/uploads\/2023\/04\/openHAB-add-channel-information.png 1440w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><figcaption class=\"wp-element-caption\">Second step to precise the value you want to catch<\/figcaption><\/figure>\n\n\n\n<p>As the object information is received in <a href=\"https:\/\/en.wikipedia.org\/wiki\/JSON\" target=\"_blank\" rel=\"noreferrer noopener\">JSON<\/a> format, you have to use <a href=\"https:\/\/www.openhab.org\/addons\/transformations\/jsonpath\/\" target=\"_blank\" rel=\"noreferrer noopener\">JSONPATH<\/a> <a href=\"https:\/\/www.openhab.org\/addons\/transformations\/jsonpath\/\" target=\"_blank\" rel=\"noreferrer noopener\">Transformation<\/a> to catch the exact value that you need (do not forget to install the JSONPATH tranformation, see 3b above). In our case, enter <em>JSONPATH:$.curflowtemp<\/em> under <em>Transformation Values: Incoming Value transformations.<\/em> This will extract the value for the <em>current flow temperature<\/em> object in the <em>ems-esp\/boiler_data <\/em>telegram. As this is a temperature, you can add the <em>Unit of Measurement<\/em> if you want. In our case it is in Celsius degrees, so we add <em>\u00b0C<\/em> here.<br>Click <em>CREATE<\/em> if you have entered all the necessary information.<\/p>\n\n\n\n<p>Note: Since EMS-ESP <a href=\"https:\/\/docs.emsesp.org\/Version-Release-History\/\" data-type=\"link\" data-id=\"https:\/\/docs.emsesp.org\/Version-Release-History\/\" target=\"_blank\" rel=\"noreferrer noopener\">firmware version 3.6.5<\/a>, the data structure has partially changed. The <em>boiler_data_ww<\/em> does not stipulate <em>WW<\/em> anymore, but it adds a nested folder called <em>DHW<\/em>. Adapt the JSONPATH like this: JSONPATH:$.dhw.<em>flowtempoffset<\/em> .<\/p>\n\n\n\n<p>Now you have to link the channel to an item (click: <em>Add link to Item<\/em>). This is standard openHAB procedure. As soon as you save the item that you created\/linked, the value will show up!<\/p>\n\n\n\n<p>You have to repeat the step 4d for each data point you want to import.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In search to connect our Buderus boiler (heating, warm water system, hot water solar panels) to openHAB, I stumbled over an EMS gateway developed by a dutch engineer. 1. Installing the EMS gateway I ordered the Wifi edition and connected it via the mini-jack cable to the boiler system. The boiler system also delivers power [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22,5,21,7],"tags":[],"class_list":["post-206","post","type-post","status-publish","format-standard","hentry","category-ems_bus","category-iot","category-mqtt","category-openhab"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=206"}],"version-history":[{"count":57,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/206\/revisions"}],"predecessor-version":[{"id":1213,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/206\/revisions\/1213"}],"wp:attachment":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}