Git Product home page Git Product logo

esp_buderus_km271's Introduction

ESP-Buderus-KM271


Current Release GitHub Release Date GitHub last commit Github All Releases GitHub watchers GitHub stars


If you like this, please push the [ Star ⭐️ ] and click on [ watch 👁 ] to stay tuned

Control your Buderus Logamatic R2107 / HS 2105 with ESP and MQTT

The information from the heater provides a better understanding of how the heater works and offers opportunities for optimization.

In combination with influxDB and Grafana you can also create useful and impressive Dashboard of your heating system.

But there is also a build in WebUI to view and control your Logamatic without any other Software.

weubui_dash (Desktop Version)

The WebUI is responsive and also offers a mobile layout.


(Mobile Version)


Table of Contents


Overview

The heart of the project is the reverse engineered Buderus interface, that is based on the 3964R Protocol.
The main code is based on the work of Michael Mayer who has set a really good base for the communication. It has been extended with the possibility not only to read values, but also to write some common values to the Logamatic.

The software has multi language support and there is already german, and english texts available. It is also possible to add more languages.

Feel free to add more languages. The texts are located in: language.h and lang.js

additional and optional Oilcounter / Oil Meter

The project includes also an additional and optional oilcounter implementation. I have installed a Braun HZ-5 Meter to measure the oil consumption.
There are different models with (HZ 5R, HZ 5DR) and without pulse output (HZ 5).
I have used the normal one without pulse output and modified it with a small reed contact - that works fine and was simple to install. If you are not interested in the Oil Meter function you can simple disable it in config.h


Hardware

Option 1 - Board from the78mole

the easiest, smartest and even cheapest option is the DIY Interface that was build by Daniel Glaser. Big thanks for his engagement in this Topic!
You can find more information here: https://github.com/the78mole/km271-wifi
You can order it here: https://www.tindie.com/products/24664/

In this case you only need this DIY interface and nothing more. It includes the RS232/TTL Adapter and also an ESP32.

KM217_mod (this is my board with the customized connector for the oil meter instead of the "USER 1" button)

Option 2 - ESP32 with original Buderus KM271

The other option is, to use the original Buderus KM271 Module that has a serial interface (RS232). In combination with a RS232 TTL Adapter (MAX3232) it can be connected to the TX/RX Port of the ESP.

Logamatic R2107 => KM271 => RS232/TTL Adapter => ESP

Example configuration:

(ESP32)GPIO17/TXD2  -> (MAX3232)TXD -> (serial cable) -> (KM271-SUBD)PIN2:RXD
(ESP32)GPIO16/RXD2 <- (MAX3232)RXD <- (serial cable) <- (KM271-SUBD)PIN3:TXD
(ESP32)GND <-> (MAX3232)GND <-> (serial cable) <-> (KM271-SUBD)PIN5:GND

km271_orig

Optional: Hardware Oil Meter

The software is also prepared to connect an Oil Meter. A well-known manufacturer of oil meters is Braun with the models HZ-5 or HZ6. These are already available with a potential-free contact.
I have used one without potential-free contact and have subsequently attached a reed contact. This was also very simple and works very reliably.

braun_hz5

Note

but this is only optional and can be used additionally to the Information´s that the software will read from the Logamatic.

Optional: OneWire Sensor

You can also configure additional OneWire Sensors (e.g. DS18B20). In the configuration you can setup one or two sensors. The Sensor value will shown on the Dashboard and will also be send by mqtt with Topic sensor and the name that you can configure. Depending on the hardware used, an additional resistor may need to be installed. Classically, the OneWire sensors are connected with a resistor of 4.7kOhm between VCC and the sensor cable and operated with 3.3V - 5V. Only the GPIO to which the sensor cable is connected is specified in the configuration. The rest is hardware-dependent wiring.

opt-sensor-dash1

(dashboard controls)

opt-sensor-config

(settings)

Note

but this is only optional and can be used additionally to the Information´s that the software will read from the Logamatic.


Getting started

Platform-IO

The software is created with Visual Studio Code and the PlatformIO-Plugin.
After installing the software you can clone the project from GitHub or you can download it as zip and open it in PlatformIO. Then adapt the upload_port and corresponding settings in platformio.ini to your USB-to-serial Adapter and upload the code to the ESP.

ESP-Flash-Tool

In the releases, you can find also the binary of the Software. If you don´t want to use PlatformIO, you can also use the buderus_km271_esp32_flash_vx.x.x.bin file and flash it directly on the ESP. This bin-file is already a merge with bootloader.bin, partitions.bin and the application.bin. You can flash this image an the ESP at address 0x00.

Windows
There are several tools available to flash binaries to the ESP.
One of them is espressif-flash-download-tool

macOS/Linux
for Mac it is hard to find a tool with a graphical UI, but you can simple use the esptool.py:

  1. open Terminal
  2. install esptool: pip install esptool
  3. optional get the install path: which esptool.py
  4. set path: export PATH="$PATH:/<path>/esptool.py" (<- change with result from 3.)
  5. goto path where the bin file is located
  6. get Device String: ls /dev/tty* | grep usb (use this in next Step for )
  7. upload: esptool.py -p <UPLOAD-PORT> write_flash 0x00 buderus_km271_esp32_flash_vx.x.x.bin

OTA-Updates

since software version 3.0, you can also update the software with the new Elegant OTA web upload.
You can find the update function in the "Tools" Tab of the WebUI.

here you can choose "Firmware" and select the buderus_km271_ota_update_vx.x.x.bin file from the release section

ota-1

But it is also possible to download the software wireless with platformio. Therefore there is a new file platformio_upload.py that you dont have to change.
You only have to change the upload_port settings in platformio.ini

There are 3 predefined Options:

  • OPTION 1: direct cable upload
  • OPTION 2: wireless OTA Update

Setup Mode

There is a "Setup Mode" available. The "Setup Mode" is activated, when you press the "reset-button" of the ESP two times within 3 Seconds. The "Setup Mode" will also activated if there is no wifi connection configured.

If the ESP goes into "Setup Mode", it will automatically create a own network access point with ssid
📶 "ESP-Buderus-KM271"
After you are connected to this network, you can open the webUI on ip-address
"http://192.168.4.1"

Configuration

Here you can setup all the configuration that fits to your heating system and your infrastructure.

  • WiFi
    enter your WiFi credentials to connect the ESP to your network

  • IP Settings
    instead of DHCP, you can configure a static IP address, Subnet, Gateway and DNS

  • Authentication
    you can activate the authentication feature and configure user and password.

  • NTP Server
    the ESP can connect to a NTP server to get the right Time information. The default Time-Zone should fit if you are located in germany. Otherwise you can change it manually

  • Date and Time
    Here you can write a new Date and Time to the Logamatic heating system. (manual or actual NTP-Server time)

  • MQTT
    here you can activate the MQTT communication and enter mandatory parameters All the parameters are mandatory!

  • Pushover
    Parameters for Pushover notifications.
    (API-Token and User-Key)
    You can also send a test message here.

  • Logamatic
    here you can select, which components of your Logamatic should be used.

  • GPIO
    Here you can configure the GPIO of your ESP-Board. You can use the options in the dropdown to get default values depending of the selected type of board.

  • Oil Meter
    here you can enable the optional hardware or virtual Oil Meter. If you use a hardware based Oil Meter, you have to configure also to regarding gpio´s. If you want to calculate the consumption based on the runtime, you have to configure the additional calculation parameters.

  • optional sensors
    Activation and configuration of optional DS18B20

  • Simulation
    Activate Simulation-Mode to generate Logamatic values for testing purposes

  • Language
    There are two languages available. Choose what you prefer. The language take effect on the webUI and also on the mqtt messages!

Note

All settings are automatically saved when changes are made

weubui-settings

Filemanager

there is also a buildin file manager to download (export), upload (imoort) and delete files. The configuration is stored in the config.json file. To backup and restore the configuration you can download and upload this file.

The drd.dat is an internal file to store information for the "double-reset-detection". Do not delete this one.

filemanager


MQTT

Note

You can set a separate language for the mqtt topics in the mqtt settings that is independent of the webUI language.

Config and Status values

The Software handles different kind of values:

config values (read only)

this are config values from the Logamatic. The values are read at startup or if you change them at the Logamatic. The payload of the values are integer or float.

Config values as single topics (see list in param.txt)

example:
Topic: esp_heizung/config/frost_protection_threshold
Payload:   -1.00 °C     (String)

status values (read only)

this values will mostly change during runtime and will automatically send if changed. The payload of the values is a String.

Status values as single topics (see list in param.txt)

example:
Topic: esp_heizung/status/hc1_ov1_automatic
Payload:   1    (integer)

additional information's (read only)

status information about WiFi:

Topic: esp_heizung/wifi = {  
    "status":"online",  
    "rssi":"-50",  
    "signal":"90",  
    "ip":"192.168.1.1",  
    "date-time":"01.01.2022 - 10:20:30"  
}

debug information:

Topic: esp_heizung/info = {  
    "logmode":true,
    "send_cmd_busy":false,
    "date-time":"01.01.2022 - 10:20:30"  
}

alarm messages (read only)

here you get the information about the last 4 Errors/Faults that are registered by the Logamatic. The payload of the values is a String.

Note

A complete List of supported values can be found in the param.txt

you can also change the mqtt topics for your needs by editing: language.h

Commands

To change the values of your Logamatic, you can use several setvalue commands from the list below. A complete Topic could be esp_heizung/setvalue/setdatetime

You can control the Logamatic with commands like this:

command:    restart ESP
topic:      {cmd/restart", cmd/restart"}
payload:    none

command:    Service interface - only for Experts - use at your own risk!!!
topic:      {cmd/service", cmd/service"}
payload:    8 hex values separated with "_" (example: 08_15_04_65_65_65_65_65)

command:    debug function - on/off
topic:      {cmd/debug", cmd/debug"}
payload:    0/1

command:    debug function - set Filter
topic:      {cmd/setdebugflt", cmd/setdebugflt"}
payload:    11 hex values separated with "_" (example: 08_15_XX_XX_XX_XX_XX_XX_XX_XX_XX)

command:    debug function - get Filter
topic:      {cmd/getdebugflt", cmd/getdebugflt"}
payload:    none (return value at message topic)

command:    set date & time of Logamatic
topic:      {"setvalue/setdatetime", setvalue/setdatetime"}
payload:    none

command:    set oilcounter to given value
topic:      {"setvalue/oilcounter", setvalue/oilcounter"}
payload:    counter value including decimals (123,45L = 1234) 

command:    heating circuit 1: operation mode 
topic:      {"setvalue/hk1_betriebsart", setvalue/hc1_opmode"}
payload:    0=night / 1=day / 2=auto  

command:    heating circuit 2: operation mode 
topic:      {"setvalue/hk2_betriebsart", setvalue/hc2_opmode"}
payload:    (0=night / 1=day / 2=auto)

command:    heating circuit 1: program
topic:      {"setvalue/hk1_programm", setvalue/hc1_program"}
payload:    (0=custom / 1=family / 2=early / 3=late / 4=AM / 5=PM / 6=noon / 7=single / 8=senior)

command:    heating circuit 2: program
topic:      {"setvalue/hk2_programm", setvalue/hc2_program"}
payload:    (0=custom / 1=family / 2=early / 3=late / 4=AM / 5=PM / 6=noon / 7=single / 8=senior)

command:    heating circuit 1: design temperature for heating curves
topic:      {"setvalue/hk1_auslegung", setvalue/hc1_interpretation"}
payload:    Resolution: 1 [°C] - Range: 30 ... 90 [°C]

command:    heating circuit 2: design temperature for heating curves
topic:      {"setvalue/hk2_auslegung", setvalue/hc2_interpretation"}
payload:    Resolution: 1 [°C] - Range: 30 ... 90 [°C]

command:    heating circuit 1: switch off threshold for reduction mode
topic:      {"setvalue/hk1_aussenhalt_ab", setvalue/hc1_switch_off_threshold"}
payload:    Resolution: 1 [°C] - Range: -20 ... +10 [°C]

command:    heating circuit 2: switch off threshold for reduction mode
topic:      {"setvalue/hk2_aussenhalt_ab", setvalue/hc2_switch_off_threshold"}
payload:    Resolution: 1 [°C] - Range: -20 ... +10 [°C]

command:    heating circuit 1: day temperature setpoint
topic:      {"setvalue/hk1_tag_soll", setvalue/hc1_day_setpoint"}
payload:    Resolution: 0.5 [°C] - Range: 10 .. 30 [°C] 

command:    heating circuit 2: day temperature setpoint
topic:      {"setvalue/hk2_tag_soll", setvalue/hc2_day_setpoint"}
payload:    Resolution: 0.5 [°C] - Range: 10 .. 30 [°C] 

command:    heating circuit 1: night temperature setpoint
topic:      {"setvalue/hk1_nacht_soll", setvalue/hc1_night_setpoint"}
payload:    Resolution: 0.5 [°C] - Range: 10 .. 30 [°C] 

command:    heating circuit 2: night temperature setpoint
topic:      {"setvalue/hk2_nacht_soll", setvalue/hc2_night_setpoint"}
payload:    Resolution: 0.5 [°C] - Range: 10 .. 30 [°C] 

command:    heating circuit 1: holiday temperature setpoint
topic:      {"setvalue/hk1_ferien_soll", setvalue/hc1_holiday_setpoint"}
payload:    Resolution: 0.5 [°C] - Range: 10 .. 30 [°C] 

command:    heating circuit 2: holiday temperature setpoint
topic:      {"setvalue/hk2_ferien_soll", setvalue/hc2_holiday_setpoint"}
payload:    Resolution: 0.5 [°C] - Range: 10 .. 30 [°C] 

command:    warm water: operation mode
topic:      {"setvalue/ww_betriebsart", setvalue/ww_opmode"}
payload:    0=night / 1=day / 2=auto

command:    heating circuit 1: summer mode threshold Temperature
topic:      {"setvalue/hk1_sommer_ab", setvalue/hc1_summer_mode_threshold"}
payload:    Resolution: 1 [°C] - Range: 9:Summer | 10°..30° | 31:Winter

command:    heating circuit 2: summer mode threshold Temperature
topic:      {"setvalue/hk2_sommer_ab", setvalue/hc2_summer_mode_threshold"}
payload:    Resolution: 1 [°C] - Range: 9:Summer | 10°..30° | 31:Winter

command:    heating circuit 1: frost mode threshold Temperature
topic:      {"setvalue/hk1_frost_ab", setvalue/hc1_frost_mode_threshold"}
payload:    Resolution: 1 [°C] - Range: -20 ... +10 [°C]

command:    heating circuit 2: frost mode threshold Temperature
topic:      {"setvalue/hk2_frost_ab", setvalue/hc2_frost_mode_threshold"}
payload:    Resolution: 1 [°C] - Range: -20 ... +10 [°C]

command:    warm water: setpoint temperature
topic:      {"setvalue/ww_soll", setvalue/ww_setpoint"}
payload:    Resolution: 1 [°C] - Range: 30 ... 60 [°C]

command:    heating circuit 1: count of days for holiday mode (Logamatic will decrement every day by one)
topic:      {"setvalue/hk1_ferien_tage", setvalue/hc1_holidays"}
payload:    count of days 0 .. 99

command:    heating circuit 2: count of days for holiday mode (Logamatic will decrement every day by one)
topic:      {"setvalue/hk1_ferien_tage", setvalue/hc1_holidays"}
payload:    count of days 0 .. 99

command:    warm water pump cycles
topic:      {"setvalue/ww_pumpen_zyklus", setvalue/ww_pump_cycles"}
payload:    Resolution: 1 [cycles/hour] - Range: 0:OFF | 1..6 | 7:ON

command:    heating circuit 1: controller intervention
topic:      {"setvalue/hk1_reglereingriff", setvalue/hc1_ctrl_intervention"}
payload:    Resolution: 1 [°C] - Range: 0 ... +10 [°C]

command:    heating circuit 2: controller intervention
topic:      {"setvalue/hk2_reglereingriff", setvalue/hc2_ctrl_intervention"}
payload:    Resolution: 1 [°C] - Range: 0 ... +10 [°C]

command:    heating circuit 1: reduction mode
topic:      {"setvalue/hk1_absenkungsart", setvalue/hc1_reduction_mode"}
payload:    Number 0..3 (Abschalt,Reduziert,Raumhalt,Aussenhalt) / {off,fixed,room,outdoors)

command:    heating circuit 2: reduction mode
topic:      {"setvalue/hk2_absenkungsart", setvalue/hc2_reduction_mode"}
payload:    Number 0..3 (Abschalt,Reduziert,Raumhalt,Aussenhalt) / {off,fixed,room,outdoors)

Home Assistant

MQTT discovery for Home Assistant makes it easy to get all values in Home Assistant. The Logamatic values will automatically visible as mqtt device in Home Assistant. The config values and the status values are displayed. Some config values can also be changed as in the WebUI.

see also the official documentation: https://www.home-assistant.io/integrations/mqtt/#discovery-messages

mqtt_ha1 mqtt_ha2

In the mqtt settings you can activate the discovery function and also set the mqtt discovery topic and the device name for Home Assistant
mqtt_ha1


Optional Messaging

in addition to mqtt there are more options for notification.

Pushover

In addition there is also a custom notification as Pushover client. Depending on the parameter "Filter", you can define what kind of messages you want to receive. In the settings you can find all necessary parameters to setup the client.

Each application, service, or utility that sends notifications through Pushover's API needs to have its own API token which uniquely identifies all of the API requests that it makes. API tokens are free and can be registered through Pushover website.

WebUI-Logger

There is also a log function with which you can record various messages depending on the filter and display them via the WebUI. This can be useful for your own debugging and also for the further development of the software.

Telnet

In addition to the WebUI and MQTT, there is also a Telnet interface to communicate with the ESP. The interface offers several commands to read out information and send commands. An overview of the commands can be called up using the "help" command. To connect, a simple Telnet connection can be started via the corresponding IP address of the ESP.

Example:

> telnet 192.168.178.135


Optional Components

node-red

I´m writing all information's that are transmitted over MQTT into a influxDB Database.
In my case I'm using node-red to receive the MQTT messages and to write it into the influxDB.
Everything runs in Docker on my Synology NAS.
But there are a lot of other possibilities - use the one that fits you best.

node-red

If you are interested in my flows, you can use this export file: node-red.json

grafana

To visualize the information's, I'm using grafana that gets the data out of the influxDB.
For me this gets me more possibilities to analyze the behavior of the heating system compared to a static dashboard.

Here are some impressions of what I did with all the information's that comes out of the Logamatic:

grafana1 grafana2 grafana3

If you are interested my dashboard, you can use this export file: grafana.json


❗️ use at own risk ❗️

feel free to use and adopt to your needs!

If you have something to improve, let us all know about you ideas!

❓ If you have a question, use the Discussions => https://github.com/dewenni/ESP_Buderus_KM271/discussions
🐞 If there is a issue or bug, use the Issues => https://github.com/dewenni/ESP_Buderus_KM271/issues

esp_buderus_km271's People

Contributors

bee-eater avatar christian-heusel avatar dewenni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp_buderus_km271's Issues

unknown messages from Type 0x00h (config values)

At the moment I get still this unknown config messages (Typ: 0x00) after a restart of the Programm:

<0:DataType> <1:Offset> <2..7:payload>

00_07_65_00_05_05_2d_01
00_23_65_65_65_65_65_65
00_2a_28_0a_0a_11_65_65
00_3f_65_00_05_05_2d_01
00_5b_65_65_65_65_65_65
00_62_28_0a_0a_11_65_65
00_77_65_65_65_65_65_01
00_8c_65_65_65_65_65_65
00_af_0f_0f_08_07_07_08
00_b6_0f_0f_64_05_01_04

If you have any ideas what's this messages are about, please let me know.

Webinterface bzw. WLAN Conntection

Hallo !
Ich habe gestern die V3.3.1 ausprobiert. Ist lange her, dass ich das Board via Interface geflasht habe. Flashvorgang hat funktioniert, WLAN Daten via Handy eingegeben. Speichern -> nix. Also kein Webinterface. Nochmal.. das Gleiche. Erase all hilft auch nicht. Nach etlichen Versuchen habe ich das Board eingebaut und siehe da. WLAN steht und Webinterface ist erreichbar. Kann man das evtl auch im ausgebauten Zustand anzeigen, damit man den erfolgreichen Flashvorgang überprüfen kann?

Noch etwas: Man kann bei der GPIO Zuweisung die Board Rev einstellen. Nach dem Speichern sieht man jedoch nicht mehr was man eingestellt hat. Kann das jeweils Eingestellte im Drop-Down erhalten bleiben?
Das sind beides keine wirklichen Fehler. Nur Vorschläge.

P.S: Heute Morgen war der ESP nicht mehr erreichbar. Da half nur Neustart. Werde es weiter beobachten. Mit der 3.2.4 hatte ich seit dem Release keine Probleme.

Consumption as value

Hi!
Thanks for the great firmware. I use it with the78mole board.
Is it possible to integrate the calculation of the oil consumption direct into the firmware and populate it via mqtt?

I use this calculation:
(Einschaltdauer_in_h * Verbrauch_KG_h * kg_in_l_umrechnungsfaktor)*100)/100
Verbrauch_KG_h = 1.9
kg_in_l_umrechnungsfaktor = 1.197

I think the same calcualtion is applicable for gas with other values :)

Thanks

Jens

MQTT Topics and translation

Hi,

I'm new to mqtt so maybe I'm wrong but I don't think so ;)

It's a design error to make 'Topics' labels dependent on the LANG.

They should remain as stable as possible. And short.
This is low level communication. Far far from the GUI level / Human interface !

Each translation 'fix' will blow any setup , up to inside a database where a Topic label can be used as a column name.
If someone add a new LANG, it's setup is kaput.

Each 's_mqtt_cmds' 's_cfg_topics' 's_stat_topics' 's_error_topics' etc should be limited to English (most common low denominator).

unknown messages from Type 0x01h (Timer?)

At the moment I get still this unknown messages (Typ: 0x01) after a restart of the Programm:

<0:DataType> <1:Offset> <2..7:payload>

01_d2_78_0a_05_37_4b_00
01_d9_28_0a_02_ff_ff_ff
01_e0_fb_00_65_65_65_65

I think this are also some timer configurations.
My implementation ends with 0x01cb for "HC2_Timer14"

The "01e0:1" is known for a Time offset. In that case the offset is index3=00.
The question is what index2=fb means?

01_e0_fb_00_65_65_65_65

If you have any ideas what's this messages are about, please let me know.

compiler warning

I tend to pay attention to compiler warnings. Under Arduino IDE, some are fatal (error). I don't know the setting with PlatformIO

Can you try a build without any warnings ?

Anyway, here is a list of 'fixes' required for Arduino IDE.

apparently not enough size here:
km271_3.31/basics.cpp
@@ -251,7 +251,7 @@
-  static char ret_str[4];
+  static char ret_str[5];
  snprintf(ret_str, sizeof(ret_str), "%i", value);
  return ret_str;
}



Nearly all the memset on structures are problematic
https://stackoverflow.com/questions/66368061/error-clearing-an-object-of-non-trivial-type-with-memset
+++ km271_3.31/config.cpp
@@ -85,8 +85,21 @@
void configInitValue(){

-    memset(&config, 0, sizeof(config));
+    memset((void*)&config, 0, sizeof(config));



Here, tmpMessage is 'Unused' when no debug. Declaration should be moved inside the ifdef
Other vars are really unused.

+++ km271_3.31/km271.cpp
@@ -254,9 +254,8 @@
-  char            tmpMessage[300]={'\0'};
-  char            errorMsg[300]={'\0'};
-  double          oil_consumption;

  #ifdef DEBUG_ON 
+    char            tmpMessage[300]={'\0'};
    if (kmregister != 0x0400 && kmregister != 0x882e && kmregister != 0x882f){
      if ( config.debug.enable && compareHexValues(config.debug.filter, data) ){ 



Another problematic memset
@@ -1380,7 +1396,7 @@

  // initialize structs
  memset(&kmStatus, 0, sizeof(s_km271_status));
-  memset(&kmConfigStr, 0, sizeof(s_km271_config_str));
+  //memset(&kmConfigStr, 0, sizeof(s_km271_config_str));
  memset(&kmConfigNum, 0, sizeof(s_km271_config_num));
  return RET_OK;  
}

Another problematic memset
@@ -2111,7 +2127,8 @@
-    strncpy(timerInfo, "--", sizeof(timerInfo));
+    //strncpy(timerInfo, "--", sizeof(timerInfo));
+    strcpy(timerInfo, "--");
  }
}


Some warnings that this buffer is too small!
+++ km271_3.31/km271.h
@@ -114,7 +115,7 @@
-#define CFG_MAX_CHAR_TIMER 128
+#define CFG_MAX_CHAR_TIMER 322 /*128*/

Compiler complaint about data format 
+++ km271_3.31/oilmeter.cpp
@@ -55,7 +55,7 @@   
-  snprintf(tmpMsg, sizeof(tmpMsg), "oilcounter was set to: %i", data.oilcounter);
+  snprintf(tmpMsg, sizeof(tmpMsg), "oilcounter was set to: %ld", data.oilcounter);

@@ -88,7 +88,7 @@
-  snprintf(tmpMsg, sizeof(tmpMsg), "oilcounter was set to: %i", data.oilcounter);
+  snprintf(tmpMsg, sizeof(tmpMsg), "oilcounter was set to: %ld", data.oilcounter);
}



Sometime I don't understand the problem.
+++ km271_3.31/webTools.cpp
@@ -195,7 +195,7 @@
 * @return  none
 * *******************************************************************/
void deleteFile(fs::FS &fs, const String& path) {
-  Serial.printf("Deleting file: %s\r\n", path);
+  Serial.printf("Deleting file: %s\r\n", (char*)&path);


And sometimes, memset is the correct choice ;)
+++ km271_3.31/webUI.cpp
@@ -49,7 +49,8 @@
-  snprintf(elementBuffer, sizeof(elementBuffer), "");
+  //snprintf(elementBuffer, sizeof(elementBuffer), 0);
+  memset(elementBuffer, 0, sizeof(elementBuffer));

@@ -830,9 +831,12 @@
  /*-------------------------------------------------------------------------
  // initialize structs
  -------------------------------------------------------------------------*/
-  memset(&kmStatusCpy, 0, sizeof(s_km271_status));
-  memset(&kmConfigNumCpy, 0, sizeof(s_km271_config_num));
-  memset(&kmConfigStrCpy, 0, sizeof(s_km271_config_str));
+  //memset(&kmStatusCpy, 0, sizeof(s_km271_status));
+  //memset(&kmConfigNumCpy, 0, sizeof(s_km271_config_num));
+  //memset(&kmConfigStrCpy, 0, sizeof(s_km271_config_str));

Lot of extra http blah blah

I think there is a lot of useless 'refresh' or 'updates' between the browser and the ESP32 Webserver. Maybe this can explain weird ' response delay' I sometimes see with the log buffer > 5KB.

That is capture of the exchange on just opening the dashboard and doing nothing. Seeing GET /getOTAProgress is unexpected. Is it possible to refresh only the active TAB ?

tcpdump -n host 10.0.0.44

16:43:33.653495 IP 10.0.0.2.47754 > 10.0.0.44.80: Flags [S], seq 954427014, win 64240, options [mss 1460,sackOK,TS val 2746111969 ecr 0,nop,wscale 7], length 0
16:43:33.703667 IP 10.0.0.44.80 > 10.0.0.2.47754: Flags [S.], seq 704469228, ack 954427015, win 5744, options [mss 1436], length 0
16:43:33.703764 IP 10.0.0.2.47754 > 10.0.0.44.80: Flags [.], ack 1, win 64240, length 0
16:43:33.704039 IP 10.0.0.2.47754 > 10.0.0.44.80: Flags [P.], seq 1:364, ack 1, win 64240, length 363: HTTP: GET /getOTAProgress HTTP/1.1
16:43:33.708752 IP 10.0.0.44.80 > 10.0.0.2.47754: Flags [P.], seq 1:126, ack 364, win 5381, length 125: HTTP: HTTP/1.1 200 OK
16:43:33.708837 IP 10.0.0.2.47754 > 10.0.0.44.80: Flags [.], ack 126, win 64115, length 0
16:43:33.709260 IP 10.0.0.2.47754 > 10.0.0.44.80: Flags [F.], seq 364, ack 126, win 64115, length 0
16:43:33.710869 IP 10.0.0.44.80 > 10.0.0.2.47754: Flags [F.], seq 126, ack 365, win 5380, length 0
16:43:33.710942 IP 10.0.0.2.47754 > 10.0.0.44.80: Flags [.], ack 127, win 64114, length 0
16:43:34.657908 IP 10.0.0.2.46608 > 10.0.0.44.80: Flags [S], seq 2329069684, win 64240, options [mss 1460,sackOK,TS val 2746112973 ecr 0,nop,wscale 7], length 0
16:43:34.727474 IP 10.0.0.44.80 > 10.0.0.2.46608: Flags [S.], seq 791292743, ack 2329069685, win 5744, options [mss 1436], length 0
16:43:34.727569 IP 10.0.0.2.46608 > 10.0.0.44.80: Flags [.], ack 1, win 64240, length 0
16:43:34.727915 IP 10.0.0.2.46608 > 10.0.0.44.80: Flags [P.], seq 1:364, ack 1, win 64240, length 363: HTTP: GET /getOTAProgress HTTP/1.1
16:43:34.731769 IP 10.0.0.44.80 > 10.0.0.2.46608: Flags [P.], seq 1:126, ack 364, win 5381, length 125: HTTP: HTTP/1.1 200 OK
16:43:34.731853 IP 10.0.0.2.46608 > 10.0.0.44.80: Flags [.], ack 126, win 64115, length 0
16:43:34.732442 IP 10.0.0.2.46608 > 10.0.0.44.80: Flags [F.], seq 364, ack 126, win 64115, length 0
16:43:34.733976 IP 10.0.0.44.80 > 10.0.0.2.46608: Flags [F.], seq 126, ack 365, win 5380, length 0
16:43:34.734030 IP 10.0.0.2.46608 > 10.0.0.44.80: Flags [.], ack 127, win 64114, length 0
16:43:35.657474 IP 10.0.0.2.46610 > 10.0.0.44.80: Flags [S], seq 1428191170, win 64240, options [mss 1460,sackOK,TS val 2746113973 ecr 0,nop,wscale 7], length 0
16:43:35.738825 IP 10.0.0.44.80 > 10.0.0.2.43770: Flags [P.], seq 528455:528581, ack 2684, win 4508, length 126: HTTP
16:43:35.740278 IP 10.0.0.44.80 > 10.0.0.2.46610: Flags [S.], seq 3996612020, ack 1428191171, win 5744, options [mss 1436], length 0
16:43:35.740352 IP 10.0.0.2.46610 > 10.0.0.44.80: Flags [.], ack 1, win 64240, length 0
16:43:35.740613 IP 10.0.0.2.46610 > 10.0.0.44.80: Flags [P.], seq 1:364, ack 1, win 64240, length 363: HTTP: GET /getOTAProgress HTTP/1.1
16:43:35.742437 IP 10.0.0.2.43770 > 10.0.0.44.80: Flags [P.], seq 2684:2696, ack 528581, win 65535, length 12: HTTP
16:43:35.745153 IP 10.0.0.44.80 > 10.0.0.2.46610: Flags [P.], seq 1:126, ack 364, win 5381, length 125: HTTP: HTTP/1.1 200 OK
16:43:35.745207 IP 10.0.0.2.46610 > 10.0.0.44.80: Flags [.], ack 126, win 64115, length 0
16:43:35.745647 IP 10.0.0.2.46610 > 10.0.0.44.80: Flags [F.], seq 364, ack 126, win 64115, length 0
16:43:35.748665 IP 10.0.0.44.80 > 10.0.0.2.43770: Flags [P.], seq 528581:529550, ack 2696, win 4496, length 969: HTTP
16:43:35.752020 IP 10.0.0.44.80 > 10.0.0.2.46610: Flags [F.], seq 126, ack 365, win 5380, length 0

option to use additional 1-wire sensors

Thanks for your work sven, i am using your software on one of daniels boards, great stuff!
Previously i was simply cutting power to the whole boiler, and monitored temperatures via DS18B20 sensors. I would really like to retire that setup, but i would like to keep those additional temperature sensors (especially on flow and return, since this enables me to see the difference (Spreizung)). Would it be possible to support DS18B20 sensors on one of the free GPIO ports with your software?

unknown messages from Type 0x91h (???)

At the moment I get still this unknown messages (Typ: 0x91) after a restart of the Programm:

<0:DataType> <1:Offset> <2..7:payload>

91_42_00_00_65_65_65_65
91_43_20_00_65_65_65_65
91_44_6e_00_65_65_65_65
91_45_00_00_65_65_65_65
91_46_ff_00_65_65_65_65
91_47_00_00_65_65_65_65
91_48_00_00_65_65_65_65
91_49_00_00_65_65_65_65
91_4a_00_00_65_65_65_65
91_4b_00_00_65_65_65_65
91_4c_00_00_65_65_65_65
91_4d_00_00_65_65_65_65

It seems that only few of them has some informations inside, but if you have any ideas what's this messages are about, please let me know.

Restarts trotz 1000 uF, aber Hotspot, static IP

Hallo, tolles Projekt, Respekt und Dank (an HW und FW)!
Hab seit ein paar Tagen endlich ein KM271-pcb 0.0.6 in Betrieb (ohne Bauteile gekauft, als es keine gab).
Einstellungen im Hotspot-UI 192..., danach unter statischer IP 172... im Web-UI erreichbar.
Soll per MQTT , NodeRed, InfluxDB, Grafana (bin hier aber nicht festgelegt).
Aber zu MQTT-Tests komme ich meist nicht, da immer mal wieder nicht mehr unter 172... erreichbar. Nach 'Speichern und Neustart' ohne Änderungen wieder unter 192.. erreichbar. Aber auch nach Trennen der Spannungsversorgung meist direkt im gespeicherten 172... Hmm, komisch. Spannungen 5,0..5,1 V und 3,30 V, perfekt. Mit Oszilloskop allerdings etwas schlechter: 5 V haben mehrere 100 mV bei jeder LED (Blinken sichtbar) aber gefühlt auch jeder Rechenvorgang im ESP (schnellere Wechsel): Menü-Tab-Wechsel usw. Die 3V3-Regelung filtert das meiste hiervon, nur deutlich kürzere und kleinere Einbrüche, sieht eigentlich ok aus. C7 gegen 1000 uF (low-ESR) getauscht, besser. Nach ein paar Minuten, spätestens ein paar Stunden kommt aber doch wieder ein Wechsel zu 192... Klar kann man jetzt im Netzteil weiter optimieren (3V3 mehr, Buderus 2107-Netzteil ist ja Trafo und dann sieht's aus wie Längsregler, den Elko mal checken usw.).

Frage:
Weshalb startet der der ESP in den Safe 192... und nicht wieder in den 172... ? Kann man hier was optimieren. Kenne mich hier nicht so aus, Hat man da überhaupt ne Chance zwischen Brownout zu unterscheiden? Nach längerer Spannungstrennung startet er ja auch wieder normal (172..).

Feste IP / static IP:
Wäre es möglich das Menu hierfür nachzupflegen? Habe hier nur statische IPs und die Fritzbox 7490 (FW aktuell) hat ein Problem mit dem Verbindungsaufbau: die MAC-Adresse der IP zuzuweisen klappt fast wie gewohnt (etwas umständlicher), aber bleibt "bis zur nächsten Anfrage" inaktiv: kein Ping, nicht erreichbar. Erst nach DHCP-Server mit nur der gewünschten einen IP und dessen ersten Anfrage klappt dann alles wie gewünscht (wahrscheinlich nur sicher bis Ablauf der DHCP-Leasetime). Aber die Abbrüche sind ja häufig, also muß der DHCP-Server für diese IP leider anbleiben, damit der Reconnect klappt. Andere ESP-Projekte haben oft neben DHCP auch die static-IP Option, die Verbindung zurFritzbox klappt da deutlich einfacher und ohne DHCP (Tasmota, ESP-CAM, 8266, 32, aber auch Raspi usw.).
Bin hier neu, wie kann ich mich einbringen? Messen? Netzteil weiter untersuchen? FW? (mag mich eingentlich nicht aus dem Fenster lehnen, ob ich da zeitlich Erwartungen erfüllen kann. Versuch's aber gern).
Lieben Gruß aus dem Sauerland...

Kann es sein, das der Ölzähler noch nicht funktioniert?

Kann es sein, das der Ölzähler noch nicht funktioniert?

Habe in den Einstellungen auf "virtuell" stehen. Verbrauch und Öldichte eingestellt. In den Daten die per mqtt kommen steht auch ein Oelverbrauch_Gesamt_berechnet.

In der WEBUI auf dem Dashboard bei Ölzähler sind immer zwei Striche. Steht dort nur etwas wenn ein richtiger Ölzähler angeschlossen ist?

Originally posted by @Kenaschon in #22 (comment)

Compilation error: `error: 'result' was not declared in this scope`

There currently is an error when building this project for the esp32:

Compiling .pio/build/esp32/lib560/AsyncMqttClient/AsyncMqttClient/Packets/Out/PubAck.cpp.o
Compiling .pio/build/esp32/lib560/AsyncMqttClient/AsyncMqttClient/Packets/Out/Publish.cpp.o
Compiling .pio/build/esp32/lib560/AsyncMqttClient/AsyncMqttClient/Packets/Out/Subscribe.cpp.o
.pio/libdeps/esp32/ESPUI/src/ESPUI.cpp: In function 'String heapInfo(const __FlashStringHelper*)':
.pio/libdeps/esp32/ESPUI/src/ESPUI.cpp:58:5: error: 'result' was not declared in this scope
     result += ESP.getFreeHeap();
     ^~~~~~

I think this problem was already reported in s00500/ESPUI#243 and is fixed by s00500/ESPUI@f8fbcf8, so it should be solvable by a dependency bump 👍🏻

Probleme mit v.3.2.4

Nach Update auf v3.2.4 mit KM271-Wifi v0..0.6 lässt sich nicht mehr auf das Webinterface zugreifen.
Pingen lässt sich sich das ganze jedoch noch.

Nach zurücksetzen der Einstellungen lässt sich das Board wieder konfigurieren. Sobald jedoch die GPIO Zuweisung gespeichert wird treten die Probleme wieder auf.

ESP was frozen - reason MQTT queue jam?

Question:

My ESP was frozen after my MQTT broker was crashed, I don't know why. I had to turn it off and on.

Is there an MQTT queue where the values were collected that have not yet been sent?

I made this observation: my MQTT broker was unavailable for 30 minutes.
During this time the ESP32 was frozen. After the MQTT broker came back, the ESP32 still could not be operated.
Was that coincidence? Does a broker error mess up the ESP? If so, is there a way to stabilize the ESP?

Originally posted by @kalleick in #29

Some English translations to fix.

Plural ?

const char* BURNER_TEMP[MAX_LANG] = {"Kessel-Vorlauf", "Boiler Temperatures"};

& L51 L52. It is the instantaneous value, not a graph.

Hot-Water => Hot Water

const char* INFO_WWTEMP[MAX_LANG] = {"Solltemperatur für Warmwasser", "Setpoint for Hot-Water"};

"Oil-Meter" everywhere else !

const char* OIL_HARDWARE[MAX_LANG] = {"Ölzähler Hardware", "Oilmeter Hardware"};

&L122

config mssages as retain => messages

const char* MQTT_CFG_RET[MAX_LANG] = {"Config Nachrichten als retain", "config mssages as retain"};

Auhtentification => Authentication

const char* ACCESSS[MAX_LANG] = {"Zugangskontrolle", "Auhtentification"};

HC2 not Hc1

"no communication to hc1-remote control",

& L634 L639

Telegram => Datagram ? https://en.wikipedia.org/wiki/Datagram

unknown messages from Type 0x80h, 0x81h, 0x88h, 0x89h

At the moment I get still this unknown config messages (Typ: 0x00) after a restart of the Programm:

<0:DataType> <1:Offset> <2..7:payload>

Heating Circuit 1

80_0a_00_00_65_65_65_65
80_0b_00_00_65_65_65_65
80_0f_00_00_65_65_65_65
80_10_00_00_65_65_65_65
80_11_00_00_65_65_65_65

Heating Circuit 2

81_1c_00_00_65_65_65_65
81_1d_00_00_65_65_65_65
81_21_00_00_65_65_65_65
81_22_00_00_65_65_65_65
81_23_00_00_65_65_65_65

Ground placed boiler

88_34_00_00_65_65_65_65
88_35_00_00_65_65_65_65
88_39_00_00_65_65_65_65
88_3a_00_00_65_65_65_65
88_3b_00_00_65_65_65_65

???

89_41_00_00_65_65_65_65

It seems that all this messages has no informations.

But if you have any ideas what's this messages are about, please let me know.

OpenHab Channel configuration

Hi Sven, excellent work!

I use OpenHab as my smart home system. I created a simple parser that translates your params.txt file to a YAML file that can be used to configure MQTT things and their channels in OpenHab.

If you think it would be helpful, I would be happy to contribute this parser and the YAML file to your repo.

Regards,
Thomas

hu values

Discussed in #26

Originally posted by kalleick May 6, 2023
I implemented option 2 (with original KM271) and ESP32.
I get the setting values in the dashboard (e.g. automatic operating mode, burner on/off), but all temperature values are marked with "hu".
So the communication seems to work in principle.

But why am I not getting any readings?

Does it take a long time to see values or is there a defect?

2023-05-06 13_05_27-Buderus Logamatic

See log from webserver

To help debug or enhance the thing, it would be a good idea have a circular buffer in ram (20-100Ko?) where messages are logged (with a time stamp).

Then the content of the buffer is served from the webserber.

http://192.168.1.44/log

and you simply get the buffer. No fancy css needed. Just text.

Also return a "404" to conform to basic http protocol.

FRequest: MQTT: Make config values retained

Hi,

could you add a (switchable) option in settings to retain MQTT config messages?
Config messages are only sent on boot of the module or when changed so these messages should be retained on the mqtt broker.

Regards

Dirk

Mischer-Werte springen

Heizkreis-Mischer

Ich sehe über MQTT in Operhab sehr komische Sprünge in en Mischerwerten.
Der Mischer selber springt physisch nicht so wild.
Wie muss man die Mischerwerte interpretieren oder liegt hier ein Fehler vor?

Grüße
-Marco

Alarm message configurable

Hi Sven,

with my oil heater control 2105 there are no useful output of alarm messages. Can you please implement a config option to disable the trasmit of any alarm messages? So that in config. h is a option like this:
#define ALARM_MESSAGES

Acutally the mssages flooding my mqtt Broker ;-)

Thanks!

Möglichkeit den Configwert Reglereingriff Raumtemp auch bei MQTT setzen zu können

Hi vllt könntest du noch folgendes Implementieren:

Kommando um den Reglereingriff der Raumtemperatur einstellen zu können

die Codefolge wäre für HK1; (b"\x07\x15" + Temp + b"\x65\x65\x65\x65\x65")

bzw für HK2; (b"\x08\x15" + Temp + b"\x65\x65\x65\x65\x65")

bzw generell vllt, das in einer art expertenmodus du ein Expert Publish mit (bwispielsweise Hex string mit 16 Stellen entsprichen den 8 Bytes eines Kommandotelegramms, damit wäre auch "ausprobieren" möglich und den als KOmmandojob an die L2107 schickst

Gruss, Mike

Day/Night in Automatic mode

Hi!
Sorry for the question but how can I see that the heating system is in the Day (Tag) or Night (Nacht) mode when it is running in the normal Automatic mode?

Many thanks!

Translation mistakes

Great new release 3, thanks for the good work !

I just tried it on a spare ESP32 (before flashing it on the boiler) and noticed a few untranslated items.

In language.h :
Line 66: Sommer instead of Summer
Line 68: Space missing between Design and Temperature
Line 100: Benutzer instead of User
Line 108: Sprache instead of Language
Line 181: Days instead of Hours
Line 564: "Warmwasser bleibt kalt" instead of "Warm Water remains cold"

On the webpage, in the "Control" bookmark, "hc1_operation_mode" is in German despite English chosen as language

Improve documentation for upload via cable

I wanted to upload the built binary to the esp via cable and modified the config something like this:

diff --git a/platformio.ini b/platformio.ini
index c644e94..830576d 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -25,7 +25,7 @@ extra_scripts =
 ; ----------------------------------------------------------------
 ; OPTION 1: direct cable upload
 ; ----------------------------------------------------------------
-;upload_port = /dev/cu.usbserial-0258166D
+upload_port = /dev/cu.usbserial-0258166D
 ;upload_port = /dev/cu.usbserial-0001

 ; ----------------------------------------------------------------
@@ -42,8 +42,8 @@ extra_scripts =
 ; ----------------------------------------------------------------


-upload_protocol = custom
-upload_url = http://192.168.178.40:8080/update   ; Conneted to Router
+; upload_protocol = custom
+; upload_url = http://192.168.178.40:8080/update   ; Conneted to Router

but then got the following error:

Using manually specified: /dev/cu.usbserial-0258166D
Uploading .pio/build/esp32/firmware.bin
*** [upload] InvalidProjectConfError : Invalid '/home/chris/Documents/shared_projects/ESP_Buderus_KM271/platformio.ini' (project configuration file): 'No option 'upload_url' in section: 'env:esp32''
Traceback (most recent call last):
  File "/usr/lib/python3.11/configparser.py", line 805, in get
    value = d[option]
            ~^^^^^^^^
  File "/usr/lib/python3.11/collections/__init__.py", line 1004, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/collections/__init__.py", line 996, in __missing__
    raise KeyError(key)
KeyError: 'upload_url'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/platformio/project/config.py", line 348, in get
    value = self.getraw(section, option, default)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/platformio/project/config.py", line 275, in getraw
    default if default != MISSING else self._parser.get(section, option)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/configparser.py", line 808, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'upload_url' in section: 'env:esp32'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Action.py", line 1310, in execute
    result = self.execfunction(target=target, source=rsources, env=env)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/Documents/shared_projects/ESP_Buderus_KM271/platformio_upload.py", line 29, in on_upload
    upload_url = env.GetProjectOption('upload_url')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242, in __call__
    return self.method(*nargs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/platformio/builder/tools/pioproject.py", line 28, in GetProjectOption
    return env.GetProjectConfig().get("env:" + env["PIOENV"], option, default)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/platformio/project/config.py", line 350, in get
    raise exception.InvalidProjectConfError(self.path, str(exc))
platformio.project.exception.InvalidProjectConfError: Invalid '/home/chris/Documents/shared_projects/ESP_Buderus_KM271/platformio.ini' (project configuration file): 'No option 'upload_url' in section: 'env:esp32''

maybe extra_scripts = ... should also be moved to option3 or the script should become a nullop when upload_url is not specified?

Control logamatic 2107 modes

Hello Sven,
First of all, thank you very much for your cool project. I've been using Daniel's adapter with your software since December and logging via MQTT and iobroker works great. Now I wanted to try to optimise the heating a bit and try out the settings from your WebGUI. The settings are also stored in the Logamatic and displayed in the IOBroker, but the Logamatic does not switch to the other mode. Do you have any idea what could be the reason for this?
I tested this with "Sommer_Ab" and the HK2 operating modes. When I press the "Summer/Winter" button on the Logamatic itself, the previously set values also take over. Somehow it looks as if the Logamatic is saving the values, but is not yet actively switching.

image

image

Bet regards,
Matthias

ArduinoJson warning

Not blocking the build of the final binary, but not working ;)

As you know , I'm (still) with Arduino IDE 1.8.
The library manager says "ArduinoJSON 7.0.3" is available.

When I select it, repeated warning is issued:

/Arduino/km271_3.31/config.cpp:152:28: warning: 'DynamicJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations]

Result is webserver unable to get any data and displaying only "Connected".

Need to use arduino_json 6.12.5

Franck

Node-Red / InfluxDB / Grafana

Hello,

you have done great work here! The WebUI is extremely helpful.

Could you also please share your configuration for Node-Red / InfluxDB / Grafana?

Thank you!

Unstable after 1.1.0

Hi!
I tried to update from 0.0.1 to 1.3.4 but it seems that the wifi is very unstable and the board stops responding. I have a lot of ping losses and changing values no longer works.
After flashing back to 0.0.1 everything is fine. I tried to find the version that works and the last version that has no lags is 1.1.0.

Restarts trotz 1000 uF, aber Hotspot, static IP

[...] kleines Problemchen mit der Spannungsversorgung [...]
Hallo, tolles Projekt, Respekt und Dank (an HW und FW)!
Hab seit ein paar Tagen endlich ein KM271-pcb 0.0.6 in Betrieb (ohne Bauteile gekauft, als es keine gab).
Einstellungen im Hotspot-UI 192..., danach unter statischer IP 172... im Web-UI erreichbar.
Soll per MQTT , NodeRed, InfluxDB, Grafana (bin hier aber nicht festgelegt).
Aber zu MQTT-Tests komme ich meist nicht, da immer mal wieder nicht mehr unter 172... erreichbar. Nach 'Speichern und Neustart' ohne Änderungen wieder unter 192.. erreichbar. Aber auch nach Trennen der Spannungsversorgung meist direkt im gespeicherten 172... Hmm, komisch. Spannungen 5,0..5,1 V und 3,30 V, perfekt. Mit Oszilloskop allerdings etwas schlechter: 5 V haben mehrere 100 mV bei jeder LED (Blinken sichtbar) aber gefühlt auch jeder Rechenvorgang im ESP (schnellere Wechsel): Menü-Tab-Wechsel usw. Die 3V3-Regelung filtert das meiste hiervon, nur deutlich kürzere und kleinere Einbrüche, sieht eigentlich ok aus. C7 gegen 1000 uF (low-ESR) getauscht, besser. Nach ein paar Minuten, spätestens ein paar Stunden kommt aber doch wieder ein Wechsel zu 192... Klar kann man jetzt im Netzteil weiter optimieren (3V3 mehr, Buderus 2107-Netzteil ist ja Trafo und dann sieht's aus wie Längsregler, den Elko mal checken usw.).

Frage:
Weshalb startet der der ESP in den Safe 192... und nicht wieder in den 172... ? Kann man hier was optimieren. Kenne mich hier nicht so aus, Hat man da überhaupt ne Chance zwischen Brownout zu unterscheiden? Nach längerer Spannungstrennung startet er ja auch wieder normal (172..).

Feste IP / static IP:
Wäre es möglich das Menu hierfür nachzupflegen? Habe hier nur statische IPs und die Fritzbox 7490 (FW aktuell) hat ein Problem mit dem Verbindungsaufbau: die MAC-Adresse der IP zuzuweisen klappt fast wie gewohnt (etwas umständlicher), aber bleibt "bis zur nächsten Anfrage" inaktiv: kein Ping, nicht erreichbar. Erst nach DHCP-Server mit nur der gewünschten einen IP und dessen ersten Anfrage klappt dann alles wie gewünscht (wahrscheinlich nur sicher bis Ablauf der DHCP-Leasetime). Aber die Abbrüche sind ja häufig, also muß der DHCP-Server für diese IP leider anbleiben, damit der Reconnect klappt. Andere ESP-Projekte haben oft neben DHCP auch die static-IP Option, die Verbindung zurFritzbox klappt da deutlich einfacher und ohne DHCP (Tasmota, ESP-CAM, 8266, 32, aber auch Raspi usw.).
Bin hier neu, wie kann ich mich einbringen? Messen? Netzteil weiter untersuchen? FW? (mag mich eingentlich nicht aus dem Fenster lehnen, ob ich da zeitlich Erwartungen erfüllen kann. Versuch's aber gern).
Lieben Gruß aus dem Sauerland...

Originally posted by @dewenni in #18 (reply in thread)

ESP32 mit LAN Anschluß ?

Hallo zusammen,

gibt es eine Möglichkeit, das alles auch per Lan-Kabel zu realisieren?

Ich habe die 3.3.1 drauf. Leider verliert sie immer noch regelmäßig die Wlan Verbindung. Trotz Wlan-Repeater im Keller.

Gibt keinen ESP32 mit Lan Anschluß auf dem man die Software aufspielen kann?

Grüße
Manfred

v4.0.0 Ölzähler und Pushover

2024-04-05 19_57_57-ESP-Buderus-KM271
Hallo Sven,

erst mal einen großen Dank und Lob für die neue Version.

Eben installiert und mir sind noch zwei Dinge aufgefallen:

a) der Ölzähler (ich hatte den virtuellen genutzt) ist plötzlich bei 0.0 und der alte Wert fehlt. Dauert es noch, bis der Wert kommt?
Werte für Verbrauch Kg/h (1,5) und Öl-Dichte KG/L (0,8) sind hinterlegt, hat er übernommen:
"oilmeter": {
"use_hardware_meter": false,
"use_virtual_meter": true,
"consumption_kg_h": 1.549999952,
"oil_density_kg_l": 0.839999974
},
Per MQTT bekomme ich die korrekten Daten: Oelverbrauch_Gesamt_berechnet: 42091.1
b) Pushover ist großartig. Hab es auf Alarme und Info eingestellt und nach Neustart hat er mir diesen per Pushnachricht gemeldet. Super. Allerdings bekomme ich bei einer Testnachricht nichts gemeldet.

Vielen Dank
Patrick

mqtt kurzzeitig 0 Werte bei Änderung HK1_Auslegung

Hallo,

wenn ich die HK1_Auslegung ändere, erhalte ich über mqtt ein message: restarted! und danach erst mal 0 Werte. Kann man das unterdrücken?

2023-12-01_21:43:34 MQTT2_ESP_Buderus_KM271 message: restarted!
2023-12-01_21:43:41 MQTT2_ESP_Buderus_KM271 ww_temp: 0
2023-12-01_21:43:41 MQTT2_ESP_Buderus_KM271 boiler_temp: 0
2023-12-01_21:43:41 MQTT2_ESP_Buderus_KM271 pump: 0
2023-12-01_21:43:46 MQTT2_ESP_Buderus_KM271 WW_Temperatur: 57 °C
2023-12-01_21:43:46 MQTT2_ESP_Buderus_KM271 WW_Betriebsart: Automatik

2105 LANG

On the 2107, 5 languages are defined: DE,FR,IT,NL,PL

On the 2105, there is much more and sadly, not in the 2107 order

DE,
AMERICAN,
ENGLISH,
FR,
NL,
IT,
Espagnol,
Magyar,
and a lot of other from Turkey to Russia

Aufschalttemperatur wird falsch gelesen

Hi,

Bei der IBN ist mir noch etwas aufgefallen. Zu dem Wunsch, die Aufschalttemperatur ändern zu können (siehe vorheriges Issue) fiel mir auf, das die Aufschalttemperatur schon falsch gelesen wird.

Im MQTT steht der Wert "AUS", definitiv eingestellt ist bei mir 2 Grad (Kontroliert an der Logamatik selber und nochmal mit der testweise rückgebauten KM271 und meinem alten Pi unter python

die Aufschalttemperatur findet sich in dem Telegramm: (vllt auch direkt im HK2 gucken)

HK1:
00 15 Aufschalttemp xx xx xx xx xx xx xx

HK2
00 4D AUfschalttemp2 xx xx xx xx xx xx xx

Wenn ich C nicht ganz verlernt habe, hast du da im KM271 ccp an der Stelle einen TIppfehler

case 0x0015: if (config.km271.use_hc1) { kmConfigNum.hc1_switch_on_temperature = data[2+4]; snprintf(kmConfigStr.hc1_switch_on_temperature, sizeof(kmConfigStr.hc1_switch_on_temperature), "%s", cfgArray.SWITCH_ON_TEMP[config.lang][limit(0, kmConfigNum.hc1_switch_on_temperature, 10)]); mqttPublish(addCfgTopic(cfgTopic.HC1_SWITCH_ON_TEMP[config.lang]), kmConfigStr.hc1_switch_on_temperature, config.mqtt.config_retain); // "CFG_HK1_Aufschalttemperatur" => "0015:0,a"

Der Offset ist da 2+0 und nicht 2+4, wie es im Quelltext steht. der HK2 müsste übrigens richtig sein, da steht nur data [2]

Gruss Michael

KM271 (mit FM244 Solar - aber nicht relevant) - Web frontend funktioniert nicht

Hi,
wahrscheinlich bin ich der einzige, der die KM271 wifi v0.0.7 mit dem FM244 Solar Modul verwendet, weil die Karten eigentlich im gleichen Steckplatz sitzen.
Ich habe hierzu ein "Breakout" Stecker mit Kabel angelötet und die Karte extern angesteckt.

Es sind zusätzlich noch zwei Heizkreise installiert und ein einstufiger Brenner.

Ich habe folgenden Effekt: Kurz nach dem Starten wird die Oberfläche mit einigen Werten angezeigt (allerdings nicht im ersten Tab), aber auf dem 2. und 3. Tab. Dann refesht die Seite und es werden nur noch Werte als Text angezeigt und die Oberfläche nicht mehr richtig "gerendert". In dem Bereich, wo Einzelwerte stehen sollten ist ein ganzer String mit aneinandergefügten Werten sichtbar. Dann erscheint nur noch die Kopfzeile: Buderus Logamatic Connected

Leider ist die Heizung 100km entfernt und ich habe am Freitag nur die Karte installiert, so dass ich nicht vor Ort gehen kann und einen Reset oder ähnliches oder eine neue Firmware auspielen. Am 16.12. wäre ich vsl. wieder vor Ort.

Ich hatte mal die FM244 herausgezogen, was mit einem Fehler im Display quitiert wurde, aber nicht an dem Verhalten händerte.
Leider bin ich nicht auf die Idee gekommen das Solarmodul in der Konfig auszuschalten und dann zu testen. Das kann ich aber das nächste mal machen.

Per MQTT bekomme ich einige Werte von der Karte, aber nicht alle, die im Param.txt hinterlegt sind. Kann das auch damit zusammenhängen?

Kannst Du mal schauen, ob Du den Fehler nachvollziehen kannst (mit den wenigen Informationen und ohne FM244).

Grüße
Marco

Controlling the Circulation pump

Hi, seems like a really nice project!

I have KM271-like adapter and RPI with fhem connected to it.
Wiring it to an ESP32 should be easy going. Would love to try that.

I don't know, if you already saw the fhem implementation for the KM271?
There's an option to control the circulation pump for warm water. As far as I could read from your docs, this is not yet implemented.

https://fhem.de/commandref_modular.html#KM271

ww_zirkulation [count]
count pumping phases for hot water circulation per hour
count must be between 0 and 7 with special meaning for

    0: no circulation at all
    7: circulation is always on

Version 3.2.4 startet nicht (loop)

Hallo,

ich habe das KM271 Board von Daniel Version 0.0.7

Bei Daniel liegen die "dewenni" Versionen 3.2.3 und 3.2.4 mit dabei. 3.2.3 scheint zu laufen und startet (das WLAN wird angezeigt).

3.2.4 startet nicht sondern loopt mit folgenden Meldungen:

doubleResetDetected
Saving config file...
Saving config file OK
LittleFS Status: 1
[    36][E][vfs_api.cpp:105] open(): /littlefs/config.json does not exist, no permits for creation
Failed to read file, using default configuration and start wifi-AP

Brownout detector was triggered

ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964

Die selben Fehlermeldungen kommen auch, wenn ich das 3.2.4 bin File nehme das mir von der IDE erzeugt wird ...

Das KM271 Board ist im Moment über einen CP2102 per USB an den Computer angeschlossen, ich benutze das esptool.exe um die Software aufzuspielen.

Irgendeine Idee? Mache ich was falsch? In der IDE finde ich keine config.json ...

Danke + Gruss

Stefan

Activating MQTT will result in Accesspoint Mode

Hi!
I updated my board from Daniel from 2.2 to 3.2.1. Everything works except MQTT. I used the same credentials that I used for 2.2 und I can see in my ioBroker installation that the boards connects via MQTT but then it reboots and stays in Accesspoint Mode.

mqtt.0 2023-06-16 11:15:58.011 info Client [ESP-Buderus-KM271] connection closed: timeout
mqtt.0 2023-06-16 11:15:19.306 info Client [ESP-Buderus-KM271] publishOnSubscribe send all known states
mqtt.0 2023-06-16 11:15:19.285 info Client [ESP-Buderus-KM271] publishOnSubscribe send all known states
mqtt.0 2023-06-16 11:15:19.106 info Client [ESP-Buderus-KM271] subscribes on "esp_heizung_2/setvalue/#" with regex /^mqtt.0.esp_heizung_2.setvalue..*/
mqtt.0 2023-06-16 11:15:19.106 info Client [ESP-Buderus-KM271] subscribes on "esp_heizung_2/setvalue/#" with regex /^esp_heizung_2.setvalue..*/
mqtt.0 2023-06-16 11:15:19.085 info Client [ESP-Buderus-KM271] subscribes on "esp_heizung_2/cmd/#" with regex /^mqtt.0.esp_heizung_2.cmd..*/
mqtt.0 2023-06-16 11:15:19.085 info Client [ESP-Buderus-KM271] subscribes on "esp_heizung_2/cmd/#" with regex /^esp_heizung_2.cmd..*/
mqtt.0 2023-06-16 11:15:19.024 info Client [ESP-Buderus-KM271]

I compiled the firmware by myself und updated it again via OTA with your version.

Thanks!

Passwort / Adminaccount

Hallo,
erst einmal vielen Dank für diese gute Arbeit!

Ich hätte gerne (vielleicht auch andere) ein Passwort als Schutz von Veränderung (Parameter/Heizung/ect.) .
Oder einen "Admin" der diese Konfig überhaupt anzeigen lässt.

Vielen Dank !

HK2_Heizsystem zeigt Heizkörper obwohl an der Logamatic auf Fussboden gestellt

HK2_Heizsystem zeigt bei mir Heizkörper an obwohl der Heizkreis auf Fussboden eingestellt ist.

Screenshot 2023-07-05 173502

Weiterhin wollte ich mal nachfragen ob es möglich wäre über deine Firmware die Hysteresis (Standardwert wohl 5°C) zu ändern. Dies geht laut meinem Heizungsbauer wohl nur über die Software ECOcare von Buderus, welche jedoch nicht mehr verfügbar ist.

Vielen Dank für deine Tolle Arbeit!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.