From dab66ce9181888852817abe78e062e3923c75503 Mon Sep 17 00:00:00 2001 From: Susis Strolch Date: Mon, 22 Jul 2019 10:39:47 +0200 Subject: [PATCH 1/5] =?UTF-8?q?fixing=20tx=5Fmode=202=20=C2=B0=20stabilize?= =?UTF-8?q?=20emsuart=5Frx...=20=20=20We=20can=20get=20more=20than=2032=20?= =?UTF-8?q?bytes=20because=20of=20the=20trailing=20BRK.=20=20=20So=20the?= =?UTF-8?q?=20buffersize=20for=20Rx=20interrupt=20is=20(for=20safety)=20in?= =?UTF-8?q?creased=20to=2036=20bytes.=20=20=20If=20length=20exceeds=2036?= =?UTF-8?q?=20bytes=20we=20dump=20them=20to=20/dev/null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ° reintroduced the phantomBreak flag again We _must_ signal to Rx that we have a double break, otherwise we get problems in emsuart_recvTask... ° add ems_dumpBuffer which shows TxBuffer before send and RxBuffer after receive and applying phantomBreak. The dump is activated in "log j" mode and used to debug the protocol problems. ° change handling of ID bit 7 on system start we listen for telegram until we receive a valid one, larger than 5 byte. Depending on the bit7 of the source address we decide if we have a Buderus EMS or a Junkers EMS bus. This decision is used to set the variables emsIDMask (0x00 for Buderus, 0x80 for Junkers) and the emsPollAck buffer, used to send the propper acknowledge, depending on EMS type. ° move poll acknowledge function (emsuart_tx_poll) from emsuart.cpp to ems.cpp and rename to ems_pollAck ° add EMS_TX_REV_DETECT status for detecting the SourceID.7 bit and setting emsIDMask and emsPollAck buffer accordingly ° set initial emsTxStatus to EMS_TX_REV_DETECT ° add 'log j' - jabber - for more extensive debug logs --- src/ems-esp.cpp | 3 ++ src/ems.cpp | 139 +++++++++++++++++++++++++++++++++++++++--------- src/ems.h | 58 ++++++++++---------- src/emsuart.cpp | 49 +++++++++-------- src/emsuart.h | 1 - 5 files changed, 174 insertions(+), 76 deletions(-) diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index 5733a8367..3632f6644 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -1467,6 +1467,9 @@ void TelnetCommandCallback(uint8_t wc, const char * commandLine) { } else if (strcmp(second_cmd, "n") == 0) { ems_setLogging(EMS_SYS_LOGGING_NONE); ok = true; + } else if (strcmp(second_cmd, "j") == 0) { + ems_setLogging(EMS_SYS_LOGGING_NONE); + ok = true; } } diff --git a/src/ems.cpp b/src/ems.cpp index b33c6c597..6bc10ddf9 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -226,7 +226,7 @@ void ems_init() { EMS_Sys_Status.emsTxPkgs = 0; EMS_Sys_Status.emxCrcErr = 0; EMS_Sys_Status.emsRxStatus = EMS_RX_STATUS_IDLE; - EMS_Sys_Status.emsTxStatus = EMS_TX_STATUS_IDLE; + EMS_Sys_Status.emsTxStatus = EMS_TX_REV_DETECT; EMS_Sys_Status.emsRefreshed = false; EMS_Sys_Status.emsPollEnabled = false; // start up with Poll disabled EMS_Sys_Status.emsBusConnected = false; @@ -235,8 +235,9 @@ void ems_init() { EMS_Sys_Status.emsTxDisabled = false; EMS_Sys_Status.emsPollFrequency = 0; EMS_Sys_Status.txRetryCount = 0; - EMS_Sys_Status.emsReverse = false; EMS_Sys_Status.emsTxMode = 0; + EMS_Sys_Status.emsIDMask = 0x00; + EMS_Sys_Status.emsPollAck[0] = EMS_ID_ME; // thermostat EMS_Thermostat.setpoint_roomTemp = EMS_VALUE_SHORT_NOTSET; @@ -361,11 +362,12 @@ void ems_setTxMode(uint8_t mode) { // special case for Junkers. If tx_mode is 3 then set the reverse poll flag // https://github.com/proddy/EMS-ESP/issues/103#issuecomment-495945850 if (mode == 3) { - EMS_Sys_Status.emsReverse = true; + EMS_Sys_Status.emsIDMask = 0x80; myDebug_P(PSTR("Forcing emsReverse for Junkers")); } else { - EMS_Sys_Status.emsReverse = false; + EMS_Sys_Status.emsIDMask = 0x00; } + EMS_Sys_Status.emsPollAck[0] = EMS_ID_ME ^ EMS_Sys_Status.emsIDMask; } uint8_t ems_getTxMode() { @@ -453,10 +455,19 @@ void ems_setLogging(_EMS_SYS_LOGGING loglevel) { myDebug_P(PSTR("System Logging set to Solar Module only")); } else if (loglevel == EMS_SYS_LOGGING_RAW) { myDebug_P(PSTR("System Logging set to Raw mode")); + } else if (loglevel == EMS_SYS_LOGGING_JABBER) { + myDebug_P(PSTR("System Logging set to Jabber mode")); } } } +/** + * send a poll acknowledge + */ +void ems_tx_pollAck() { + emsuart_tx_buffer(&EMS_Sys_Status.emsPollAck[0], 1); +} + /** * Calculate CRC checksum using lookup table for speed * len is length of all the data in bytes (including the header & CRC byte at end) @@ -615,20 +626,26 @@ void _ems_sendTelegram() { } EMS_TxTelegram.data[EMS_TxTelegram.length - 1] = _crcCalculator(EMS_TxTelegram.data, EMS_TxTelegram.length); // add the CRC - emsuart_tx_buffer(EMS_TxTelegram.data, EMS_TxTelegram.length); // send the telegram to the UART Tx - EMS_TxQueue.shift(); // and remove from queue + _EMS_TX_STATUS _txStatus = emsuart_tx_buffer(EMS_TxTelegram.data, EMS_TxTelegram.length); // send the telegram to the UART Tx + if (EMS_TX_BRK_DETECT == _txStatus || EMS_TX_WTD_TIMEOUT == _txStatus) { + // Tx Error! + myDebug_P(PSTR("** error sending buffer: %s"),_txStatus == EMS_TX_BRK_DETECT ? + "BRK" : "WDTO"); + // EMS_Sys_Status.emsTxStatus = EMS_TX_STATUS_IDLE; + } + EMS_TxQueue.shift(); // and remove from queue return; } // create the header - EMS_TxTelegram.data[0] = (EMS_Sys_Status.emsReverse) ? EMS_ID_ME | 0x80 : EMS_ID_ME; // src + EMS_TxTelegram.data[0] = EMS_ID_ME ^ EMS_Sys_Status.emsIDMask; // src // dest if (EMS_TxTelegram.action == EMS_TX_TELEGRAM_WRITE) { EMS_TxTelegram.data[1] = EMS_TxTelegram.dest; } else { // for a READ or VALIDATE - EMS_TxTelegram.data[1] = EMS_TxTelegram.dest | 0x80; // read has 8th bit set + EMS_TxTelegram.data[1] = (EMS_TxTelegram.dest ^ 0x80 ^ EMS_Sys_Status.emsIDMask); // read has 8th bit set } // complete the rest of the header depending on EMS or EMS+ @@ -671,9 +688,17 @@ void _ems_sendTelegram() { } // send the telegram to the UART Tx - emsuart_tx_buffer(EMS_TxTelegram.data, EMS_TxTelegram.length); + _EMS_TX_STATUS _txStatus = emsuart_tx_buffer(EMS_TxTelegram.data, EMS_TxTelegram.length); // send the telegram to the UART Tx + if (EMS_TX_STATUS_OK == _txStatus || EMS_TX_STATUS_IDLE == _txStatus) + EMS_Sys_Status.emsTxStatus = EMS_TX_STATUS_WAIT; + else { + // Tx Error! + // Tx Error! + myDebug_P(PSTR("** error sending buffer: %s"),_txStatus == EMS_TX_BRK_DETECT ? + "BRK" : "WDTO"); + EMS_Sys_Status.emsTxStatus = EMS_TX_STATUS_IDLE; + } - EMS_Sys_Status.emsTxStatus = EMS_TX_STATUS_WAIT; } @@ -720,6 +745,57 @@ void _createValidate() { EMS_TxQueue.unshift(new_EMS_TxTelegram); // add back to queue making it first to be picked up next (FIFO) } +/** + * dump a UART Tx or Rx buffer to console... + */ +void ems_dumpBuffer(const char *prefix, uint8_t *telegram, uint8_t length) { + uint32_t timestamp = millis(); + static char output_str[200] = {0}; + static char buffer[16] = {0}; + + if (EMS_Sys_Status.emsLogging != EMS_SYS_LOGGING_JABBER) + return; + + // we only care about known devices + if (length) { + uint8_t dev = telegram[0] & 0x7F; + if (!((dev == 0x04)||(dev == 0x08)||(dev == 0x09)||(dev == 0x0a) + ||(dev == 0x01)||(dev == 0x0b)||(dev == 0x10))) + return; + } + + strlcpy(output_str, "(", sizeof(output_str)); + strlcat(output_str, COLOR_CYAN, sizeof(output_str)); + strlcat(output_str, _smallitoa((uint8_t)((timestamp / 3600000) % 24), buffer), sizeof(output_str)); + strlcat(output_str, ":", sizeof(output_str)); + strlcat(output_str, _smallitoa((uint8_t)((timestamp / 60000) % 60), buffer), sizeof(output_str)); + strlcat(output_str, ":", sizeof(output_str)); + strlcat(output_str, _smallitoa((uint8_t)((timestamp / 1000) % 60), buffer), sizeof(output_str)); + strlcat(output_str, ".", sizeof(output_str)); + strlcat(output_str, _smallitoa3(timestamp % 1000, buffer), sizeof(output_str)); + strlcat(output_str, COLOR_RESET, sizeof(output_str)); + strlcat(output_str, ") ", sizeof(output_str)); + + strlcat(output_str, COLOR_YELLOW, sizeof(output_str)); + strlcat(output_str, prefix, sizeof(output_str)); + + // show some EMS_Sys_Status entries + strlcat(output_str, _hextoa(EMS_Sys_Status.emsRxStatus, buffer), sizeof(output_str)); + strlcat(output_str, " ", sizeof(output_str)); + strlcat(output_str, _hextoa(EMS_Sys_Status.emsTxStatus, buffer), sizeof(output_str)); + strlcat(output_str, ": ", sizeof(output_str)); + + + // print whole buffer, don't interpret any data + for (int i = 0; i < (length); i++) { + strlcat(output_str, _hextoa(telegram[i], buffer), sizeof(output_str)); + strlcat(output_str, " ", sizeof(output_str)); + } + + strlcat(output_str, COLOR_RESET, sizeof(output_str)); + + myDebug(output_str); +} /** * Entry point triggered by an interrupt in emsuart.cpp * length is the number of all the telegram bytes up to and including the CRC at the end @@ -729,16 +805,28 @@ void _createValidate() { void ems_parseTelegram(uint8_t * telegram, uint8_t length) { static uint32_t _last_emsPollFrequency = 0; + ems_dumpBuffer("** [DEBUG MODE] ems_parseTelegram: ", telegram, length); /* * check if we just received a single byte * it could well be a Poll request from the boiler for us, which will have a value of 0x8B (0x0B | 0x80) * or either a return code like 0x01 or 0x04 from the last Write command - * Roger Wilco: we have different types here: - * EMS_ID_ME && length == 1 && EMS_TX_STATUS_IDLE && EMS_RX_STATUS_IDLE: polling request - * EMS_ID_ME && length > 1 && EMS_TX_STATUS_IDLE && EMS_RX_STATUS_IDLE: direct telegram - * (EMS_TX_SUCCESS || EMS_TX_ERROR) && EMS_TX_STATUS_WAIT: response, free the EMS bus - * - * In addition, it may happen that we where interrupted (f.e. by WIFI activity) and the + */ + + /* + * Detect the EMS bus type - Buderus or Junkers - and set emsIDMask accordingly. + * we wait for the first valid telegram and look at the SourceID. + * If Bit 7 is set we have a Buderus, otherwise a Junkers + */ + if (EMS_Sys_Status.emsTxStatus == EMS_TX_REV_DETECT) { + if ((length >= 5) && (telegram[length - 1] == _crcCalculator(telegram, length))) { + EMS_Sys_Status.emsTxStatus = EMS_TX_STATUS_IDLE; + EMS_Sys_Status.emsIDMask = telegram[0] & 0x80; + EMS_Sys_Status.emsPollAck[0] = EMS_ID_ME ^ EMS_Sys_Status.emsIDMask; + } else + return; // ignore the whole telegram Rx Telegram while in DETECT mode + } + + /* It may happen that we where interrupted (f.e. by WIFI activity) and the * buffer isn't valid anymore, so we must not answer at all... */ if (EMS_Sys_Status.emsRxStatus != EMS_RX_STATUS_IDLE) { @@ -752,8 +840,7 @@ void ems_parseTelegram(uint8_t * telegram, uint8_t length) { uint8_t value = telegram[0]; // 1st byte of data package // check first for a Poll for us - // the poll has the MSB set - seems to work on both EMS and Junkers - if ((value & 0x7F) == EMS_ID_ME) { + if ((value ^ 0x80 ^ EMS_Sys_Status.emsIDMask) == EMS_ID_ME) { EMS_Sys_Status.emsTxCapable = true; uint32_t timenow_microsecs = micros(); EMS_Sys_Status.emsPollFrequency = (timenow_microsecs - _last_emsPollFrequency); @@ -766,7 +853,7 @@ void ems_parseTelegram(uint8_t * telegram, uint8_t length) { } else { // nothing to send so just send a poll acknowledgement back if (EMS_Sys_Status.emsPollEnabled) { - emsuart_tx_poll(); + ems_tx_pollAck(); } } } else if (EMS_Sys_Status.emsTxStatus == EMS_TX_STATUS_WAIT) { @@ -774,14 +861,14 @@ void ems_parseTelegram(uint8_t * telegram, uint8_t length) { if (value == EMS_TX_SUCCESS) { EMS_Sys_Status.emsTxPkgs++; // got a success 01. Send a validate to check the value of the last write - emsuart_tx_poll(); // send a poll to free the EMS bus + ems_tx_pollAck(); // send a poll to free the EMS bus _createValidate(); // create a validate Tx request (if needed) } else if (value == EMS_TX_ERROR) { // last write failed (04), delete it from queue and dont bother to retry if (EMS_Sys_Status.emsLogging == EMS_SYS_LOGGING_VERBOSE) { myDebug_P(PSTR("** Write command failed from host")); } - emsuart_tx_poll(); // send a poll to free the EMS bus + ems_tx_pollAck(); // send a poll to free the EMS bus _removeTxQueue(); // remove from queue } } @@ -792,7 +879,7 @@ void ems_parseTelegram(uint8_t * telegram, uint8_t length) { // ignore anything that doesn't resemble a proper telegram package // minimal is 5 bytes, excluding CRC at the end if (length <= 4) { - //_debugPrintTelegram("Noisy data:", &EMS_RxTelegram COLOR_RED); + _debugPrintTelegram("Noisy data:", &EMS_RxTelegram, COLOR_RED); return; } @@ -1035,7 +1122,7 @@ void _processType(_EMS_RxTelegram * EMS_RxTelegram) { // if its an echo of ourselves from the master UBA, ignore. This should never happen mind you if (EMS_RxTelegram->src == EMS_ID_ME) { - // _debugPrintTelegram("echo:", EMS_RxTelegram, COLOR_WHITE); + _debugPrintTelegram("echo:", EMS_RxTelegram, COLOR_WHITE); return; } @@ -1143,10 +1230,9 @@ void _processType(_EMS_RxTelegram * EMS_RxTelegram) { } } - emsuart_tx_poll(); // send Acknowledgement back to free the EMS bus since we have the telegram + ems_tx_pollAck(); // send Acknowledgement back to free the EMS bus since we have the telegram } - /** * Check if hot tap water or heating is active * using a quick hack for checking the heating. Selected Flow Temp >= 70 @@ -1684,7 +1770,8 @@ void _process_Version(_EMS_RxTelegram * EMS_RxTelegram) { // check to see if its a Junkers Heatronic3, which has a different poll'ing logic if (EMS_Boiler.product_id == EMS_PRODUCTID_HEATRONICS) { - EMS_Sys_Status.emsReverse = true; + EMS_Sys_Status.emsIDMask = 0x80; + EMS_Sys_Status.emsPollAck[0] = EMS_ID_ME ^ EMS_Sys_Status.emsIDMask; } myESP.fs_saveConfig(); // save config to SPIFFS diff --git a/src/ems.h b/src/ems.h index 800577200..d06ba7f19 100644 --- a/src/ems.h +++ b/src/ems.h @@ -29,39 +29,39 @@ #define GPIO_H(mask) (GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, (mask))) #define GPIO_L(mask) (GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, (mask))) -#define RX_PULSE(pulse) \ - do { \ - GPIO_H(RX_MARK_MASK); \ - delayMicroseconds(pulse); \ - GPIO_L(RX_MARK_MASK); \ +#define RX_PULSE(pulse) \ + do { \ + GPIO_H(RX_MARK_MASK); \ + delayMicroseconds(pulse); \ + GPIO_L(RX_MARK_MASK); \ } while (0) -#define TX_PULSE(pulse) \ - do { \ - GPIO_H(TX_MARK_MASK); \ - delayMicroseconds(pulse); \ - GPIO_L(TX_MARK_MASK); \ +#define TX_PULSE(pulse) \ + do { \ + GPIO_H(TX_MARK_MASK); \ + delayMicroseconds(pulse); \ + GPIO_L(TX_MARK_MASK); \ } while (0) -#define LA_PULSE(pulse) \ - do { \ - GPIO_H(MARKERS_MASK); \ - delayMicroseconds(pulse); \ - GPIO_L(MARKERS_MASK); \ +#define LA_PULSE(pulse) \ + do { \ + GPIO_H(MARKERS_MASK); \ + delayMicroseconds(pulse); \ + GPIO_L(MARKERS_MASK); \ } while (0) -#define INIT_MARKERS(void) \ - do { \ - pinMode(RX_MARK_PIN, OUTPUT); \ - pinMode(TX_MARK_PIN, OUTPUT); \ - GPIO_L(MARKERS_MASK); \ +#define INIT_MARKERS(void) \ + do { \ + pinMode(RX_MARK_PIN, OUTPUT); \ + pinMode(TX_MARK_PIN, OUTPUT); \ + GPIO_L(MARKERS_MASK); \ } while (0) #else -#define RX_PULSE(pulse) \ +#define RX_PULSE(pulse) \ {} -#define TX_PULSE(pulse) \ +#define TX_PULSE(pulse) \ {} -#define LA_PULSE(pulse) \ +#define LA_PULSE(pulse) \ {} -#define INIT_MARKERS(void) \ +#define INIT_MARKERS(void) \ {} #define RX_MARK_MASK #define TX_MARK_MASK @@ -124,7 +124,8 @@ typedef enum { EMS_TX_STATUS_IDLE, // ready EMS_TX_STATUS_WAIT, // waiting for response from last Tx EMS_TX_WTD_TIMEOUT, // watchdog timeout during send - EMS_TX_BRK_DETECT // incoming BRK during Tx + EMS_TX_BRK_DETECT, // incoming BRK during Tx + EMS_TX_REV_DETECT // waiting to detect reverse bit } _EMS_TX_STATUS; #define EMS_TX_SUCCESS 0x01 // EMS single byte after a Tx Write indicating a success @@ -145,7 +146,8 @@ typedef enum { EMS_SYS_LOGGING_BASIC, // only basic read/write messages EMS_SYS_LOGGING_THERMOSTAT, // only telegrams sent from thermostat EMS_SYS_LOGGING_SOLARMODULE, // only telegrams sent from thermostat - EMS_SYS_LOGGING_VERBOSE // everything + EMS_SYS_LOGGING_VERBOSE, // everything + EMS_SYS_LOGGING_JABBER // lots of debug output... } _EMS_SYS_LOGGING; // status/counters since last power on @@ -164,8 +166,9 @@ typedef struct { bool emsTxCapable; // able to send via Tx bool emsTxDisabled; // true to prevent all Tx uint8_t txRetryCount; // # times the last Tx was re-sent - bool emsReverse; // if true, poll logic is reversed uint8_t emsTxMode; // handles Tx logic + uint8_t emsIDMask; // Buderus: 0x00, Junkers: 0x80 + uint8_t emsPollAck[1]; // acknowledge buffer } _EMS_Sys_Status; // The Tx send package @@ -390,6 +393,7 @@ typedef struct { } _EMS_Type; // function definitions +extern void ems_dumpBuffer(const char *prefix, uint8_t *telegram, uint8_t length); extern void ems_parseTelegram(uint8_t * telegram, uint8_t len); void ems_init(); void ems_doReadCommand(uint16_t type, uint8_t dest, bool forceRefresh = false); diff --git a/src/emsuart.cpp b/src/emsuart.cpp index a701d25c3..a0bb11411 100644 --- a/src/emsuart.cpp +++ b/src/emsuart.cpp @@ -13,6 +13,7 @@ _EMSRxBuf * pEMSRxBuf; _EMSRxBuf * paEMSRxBuf[EMS_MAXBUFFERS]; uint8_t emsRxBufIdx = 0; +uint8_t phantomBreak= 0; os_event_t recvTaskQueue[EMSUART_recvTaskQueueLen]; // our Rx queue @@ -22,7 +23,7 @@ os_event_t recvTaskQueue[EMSUART_recvTaskQueueLen]; // our Rx queue // static void emsuart_rx_intr_handler(void * para) { static uint8_t length; - static uint8_t uart_buffer[EMS_MAXBUFFERSIZE]; + static uint8_t uart_buffer[EMS_MAXBUFFERSIZE + 2]; // is a new buffer? if so init the thing for a new telegram if (EMS_Sys_Status.emsRxStatus == EMS_RX_STATUS_IDLE) { @@ -33,7 +34,9 @@ static void emsuart_rx_intr_handler(void * para) { // fill IRQ buffer, by emptying Rx FIFO if (USIS(EMSUART_UART) & ((1 << UIFF) | (1 << UITO) | (1 << UIBD))) { while ((USS(EMSUART_UART) >> USRXC) & 0xFF) { - uart_buffer[length++] = USF(EMSUART_UART); + uint8_t rx = USF(EMSUART_UART); + if (length < EMS_MAXBUFFERSIZE) + uart_buffer[length++] = rx; } // clear Rx FIFO full and Rx FIFO timeout interrupts @@ -46,8 +49,9 @@ static void emsuart_rx_intr_handler(void * para) { ETS_UART_INTR_DISABLE(); // disable all interrupts and clear them USIC(EMSUART_UART) = (1 << UIBD); // INT clear the BREAK detect interrupt - pEMSRxBuf->length = length; - os_memcpy((void *)pEMSRxBuf->buffer, (void *)&uart_buffer, length); // copy data into transfer buffer, including the BRK 0x00 at the end + pEMSRxBuf->length = (length > EMS_MAXBUFFERSIZE) ? EMS_MAXBUFFERSIZE : length; + os_memcpy((void *)pEMSRxBuf->buffer, (void *)&uart_buffer, pEMSRxBuf->length); // copy data into transfer buffer, including the BRK 0x00 at the end + length = 0; EMS_Sys_Status.emsRxStatus = EMS_RX_STATUS_IDLE; // set the status flag stating BRK has been received and we can start a new package ETS_UART_INTR_ENABLE(); // re-enable UART interrupts @@ -67,18 +71,21 @@ static void ICACHE_FLASH_ATTR emsuart_recvTask(os_event_t * events) { uint8_t length = pCurrent->length; // number of bytes including the BRK at the end pCurrent->length = 0; - // validate and transmit the EMS buffer, excluding the BRK + if (phantomBreak) { + phantomBreak = 0; + length--; // remove phantom break from Rx buffer + } + if (length == 2) { RX_PULSE(20); // it's a poll or status code, single byte and ok to send on ems_parseTelegram((uint8_t *)pCurrent->buffer, 1); - } else if ((length > 4) && (length <= EMS_MAXBUFFERSIZE + 1) && (pCurrent->buffer[length - 2] != 0x00)) { + } else if ((length > 4) && (length <= EMS_MAXBUFFERSIZE + 1)) { // ignore double BRK at the end, possibly from the Tx loopback // also telegrams with no data value RX_PULSE(40); ems_parseTelegram((uint8_t *)pCurrent->buffer, length - 1); // transmit EMS buffer, excluding the BRK } - // memset(pCurrent->buffer, 0x00, EMS_MAXBUFFERSIZE); // wipe memory just to be safe } /* @@ -122,10 +129,10 @@ void ICACHE_FLASH_ATTR emsuart_init() { // UCFFT = RX FIFO Full Threshold (7 bit) = want this to be 31 for 32 bytes of buffer (default was 127) // see https://www.espressif.com/sites/default/files/documentation/esp8266-technical_reference_en.pdf // - // change: we set UCFFT to 1 to get an immediate indicator about incoming trafffic. + // change: we set UCFFT to 1 to get an immediate indicator about incoming traffic. // Otherwise, we're only noticed by UCTOT or RxBRK! USC1(EMSUART_UART) = 0; // reset config first - USC1(EMSUART_UART) = (0x01 << UCFFT) | (0x01 << UCTOT) | (1 << UCTOE); // enable interupts + USC1(EMSUART_UART) = (0x01 << UCFFT) | (0x01 << UCTOT) | (0 << UCTOE); // enable interupts // set interrupts for triggers USIC(EMSUART_UART) = 0xFFFF; // clear all interupts @@ -133,7 +140,8 @@ void ICACHE_FLASH_ATTR emsuart_init() { // enable rx break, fifo full and timeout. // but not frame error UIFR (because they are too frequent) or overflow UIOF because our buffer is only max 32 bytes - USIE(EMSUART_UART) = (1 << UIBD) | (1 << UIFF) | (1 << UITO); + // change: we don't care about Rx Timeout - it may lead to wrong readouts + USIE(EMSUART_UART) = (1 << UIBD) | (1 << UIFF) | (0 << UITO); // set up interrupt callbacks for Rx system_os_task(emsuart_recvTask, EMSUART_recvTaskPrio, recvTaskQueue, EMSUART_recvTaskQueueLen); @@ -199,6 +207,7 @@ void ICACHE_FLASH_ATTR emsuart_tx_brk() { */ _EMS_TX_STATUS ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len) { _EMS_TX_STATUS result = EMS_TX_STATUS_OK; + ems_dumpBuffer("emsuart_tx_buffer: ", buf, len); // validate and transmit the EMS buffer, excluding the BRK if (len) { LA_PULSE(50); // temp code until we get mode 2 working without resets @@ -254,9 +263,9 @@ _EMS_TX_STATUS ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len) { // shorter busy poll... #define EMSUART_BUSY_WAIT (EMSUART_BIT_TIME / 8) -#define EMS_TX_TO_COUNT ((20 + 10000 / EMSUART_BIT_TIME) * 8) +#define EMS_TX_TO_CHARS (2 + 20) +#define EMS_TX_TO_COUNT ( (EMS_TX_TO_CHARS) * 10 * 8) uint16_t wdc = EMS_TX_TO_COUNT; - ETS_UART_INTR_DISABLE(); // disable rx interrupt // clear Rx status register @@ -272,7 +281,6 @@ _EMS_TX_STATUS ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len) { USF(EMSUART_UART) = buf[i++]; // send each Tx byte // wait for echo from busmaster GPIO_L(TX_MARK_MASK); - while (((USS(EMSUART_UART) >> USRXC) & 0xFF) == _usrxc) { delayMicroseconds(EMSUART_BUSY_WAIT); // burn CPU cycles... if (--wdc == 0) { @@ -301,11 +309,13 @@ _EMS_TX_STATUS ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len) { // wait until BRK detected... while (!(USIR(EMSUART_UART) & (1 << UIBD))) { - delayMicroseconds(EMSUART_BUSY_WAIT); + // delayMicroseconds(EMSUART_BUSY_WAIT); + delayMicroseconds(EMSUART_BIT_TIME); } USC0(EMSUART_UART) &= ~((1 << UCBRK) | (1 << UCLBE)); // disable loopback & clear USIC(EMSUART_UART) = (1 << UIBD); // clear BRK detect IRQ + phantomBreak = 1; } GPIO_L(TX_MARK_MASK); } @@ -317,13 +327,8 @@ _EMS_TX_STATUS ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len) { /* * Send the Poll (our own ID) to Tx as a single byte and end with a - */ + * *** moved to ems.cpp, renamed to ems_tx_pollAck void ICACHE_FLASH_ATTR emsuart_tx_poll() { - static uint8_t buf[1]; - if (EMS_Sys_Status.emsReverse) { - buf[0] = {EMS_ID_ME | 0x80}; - } else { - buf[0] = {EMS_ID_ME}; - } - emsuart_tx_buffer(buf, 1); + static uint8_t buf[1] = {EMS_ID_ME ^ EMS_Sys_Status.emsIDMask}; } + */ \ No newline at end of file diff --git a/src/emsuart.h b/src/emsuart.h index 0777dcfd5..3a4f9da7e 100644 --- a/src/emsuart.h +++ b/src/emsuart.h @@ -37,4 +37,3 @@ void ICACHE_FLASH_ATTR emsuart_init(); void ICACHE_FLASH_ATTR emsuart_stop(); void ICACHE_FLASH_ATTR emsuart_start(); _EMS_TX_STATUS ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len); -void ICACHE_FLASH_ATTR emsuart_tx_poll(); From e680ae6066694cf566eba3d5d7deae13c21fa379 Mon Sep 17 00:00:00 2001 From: Susis Strolch Date: Mon, 29 Jul 2019 10:00:52 +0200 Subject: [PATCH 2/5] =?UTF-8?q?=C2=B0=20fix=20compile=20time=20error=20in?= =?UTF-8?q?=20ems.cpp=20(missing=20comment)=20=C2=B0=20show=20'echo:telegr?= =?UTF-8?q?am'=20msg=20only=20in=20jabber=20mode=20=C2=B0=20fix=20wrong=20?= =?UTF-8?q?value=20when=20applying=20'log=20j'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ems-esp.cpp | 2 +- src/ems.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index 3632f6644..d3468c2e1 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -1468,7 +1468,7 @@ void TelnetCommandCallback(uint8_t wc, const char * commandLine) { ems_setLogging(EMS_SYS_LOGGING_NONE); ok = true; } else if (strcmp(second_cmd, "j") == 0) { - ems_setLogging(EMS_SYS_LOGGING_NONE); + ems_setLogging(EMS_SYS_LOGGING_JABBER); ok = true; } } diff --git a/src/ems.cpp b/src/ems.cpp index 6bc10ddf9..dbe01ac2d 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -879,7 +879,7 @@ void ems_parseTelegram(uint8_t * telegram, uint8_t length) { // ignore anything that doesn't resemble a proper telegram package // minimal is 5 bytes, excluding CRC at the end if (length <= 4) { - _debugPrintTelegram("Noisy data:", &EMS_RxTelegram, COLOR_RED); + // _debugPrintTelegram("Noisy data:", &EMS_RxTelegram, COLOR_RED); return; } @@ -1122,7 +1122,8 @@ void _processType(_EMS_RxTelegram * EMS_RxTelegram) { // if its an echo of ourselves from the master UBA, ignore. This should never happen mind you if (EMS_RxTelegram->src == EMS_ID_ME) { - _debugPrintTelegram("echo:", EMS_RxTelegram, COLOR_WHITE); + if (EMS_Sys_Status.emsLogging == EMS_SYS_LOGGING_JABBER) + _debugPrintTelegram("echo:", EMS_RxTelegram, COLOR_WHITE); return; } From a32da99618bfec331b60f78ca48e9659019e10a5 Mon Sep 17 00:00:00 2001 From: Susis Strolch Date: Mon, 29 Jul 2019 18:12:35 +0200 Subject: [PATCH 3/5] txmode2 / Junkers autodetect * reduce logs in jabber mode * disable explicit test for Junkers * add HT3 document --- HT3-Bus_Telegramme.html | 7862 +++++++++++++++++++++++++++++++++++++++ src/ems-esp.cpp | 2 + src/ems.cpp | 13 +- 3 files changed, 7873 insertions(+), 4 deletions(-) create mode 100644 HT3-Bus_Telegramme.html diff --git a/HT3-Bus_Telegramme.html b/HT3-Bus_Telegramme.html new file mode 100644 index 000000000..1a019762c --- /dev/null +++ b/HT3-Bus_Telegramme.html @@ -0,0 +1,7862 @@ + + + + + + + + + + + + + + + + + +
+

+

Übersicht

+ Telegramm Übersicht
+ ID 2
+ ID 7
+ ID 6
+ ID 190
+ ID 24
+ ID 25
+ ID 188
+ ID 27
+ ID 51
+ ID 52
+ ID 467...468
+ ID 26
+ ID 268
+ ID 296
+ ID 357...366
+ ID 367...376
+ ID 377...386
+ ID 677...684
+ ID 259
+ ID 260
+ ID 866
+ ID 868
+ ID 873
+ ID 874
+ ID 910
+ ID 913
+ ID 357_366_14_Modem
+ ID 377_387_4_Modem
+ ID 357...366_1x_Modem
+ ID 377...386_x_Modem
+ +

+
+

Tabelle 1: Telegramm Übersicht

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme







Datum:14.10.2016


Version:0.2.0







Message-IDTelegramm(hex)BeschreibungSource-Werte (hex)Bemerkung



(SO)
2SO TT 02 xySoftware-Version / Busteilnehmer88TT = <Target-/Token-Nr>
7SO 00 07 xySteuerung: EMS Token Status88
6SO 00 06 xyDatum / Zeit90 | 98Mit 14 und 17 Bytes Länge
190TT 00 BE xyErrorCode / DisplayCode von Target
TT = <Target-/Token-Nr>
24SO 00 18 xyHeizgerät: Kesseldaten88Mit 31 und 33 Bytes Länge
25SO 00 19 xyHeizgerät: Heizungsdaten88
188SO 00 BC xyHeizgerät: Hybrid (Wärmepumpe)

27SO 00 1B xySollwert Warmwasser90
51SO 00 33 xyWarmwasser: Daten von Steuerung88
52SO 00 34 xyWarmwasser: Daten von Steuerung | IPM88 | Ax (x:=0...7)Mit 22,23 und 25 Bytes Länge
467...468SO 00 FF xy 00 D3...D4Betriebsart WW-System90
26SO 08 1A xyHeizkreis: Systemwerte90
268SO 00 FF xy 00 0CHeizkreis: von IPM1/IPM2 für MischerAx (x:=0...7)
296SO 00 FF xy 00 28Heizkreis: Fehlermeldungen90
357...366SO 00 FF xy 00 65...6EHeizkreis: Bauart190
367...376SO 00 FF xy 00 6F...78Heizkreis: Temperaturniveau90 | 9x (x:=8...F)
377...386SO 00 FF xy 00 79...82Heizkreis: Bauart290
677...684SO 00 FF xy 01 A5...ACHeizkreis: Systemwerte90 | 98Cxyz-Controller (z.B. CW100)
259SO 00 FF xy 00 03Solar: Solardaten von ISM1B0
260SO 00 FF xy 00 04Solar: Solardaten von ISM2B0Mit 24 und 35 Bytes Länge
866SO 00 FF xy 02 62Solar: Solardaten von MS100B0EMS2-Bus
868SO 00 FF xy 02 64Solar: Solardaten von MS100B0EMS2-Bus
873SO 00 FF xy 02 69Solar: Solardaten von MS100B0EMS2-Bus
874SO 00 FF xy 02 6ASolar: Solardaten von MS100B0EMS2-Bus
910SO 00 FF xy 02 8ESolar: Solardaten von MS100B0EMS2-Bus
913SO 00 FF xy 02 91Solar: Solardaten von MS100B0EMS2-Bus
357_14...366_14SO TA FF 0E 00 65...6EModem-CMD: Betriebsart setzen8D | C8TA = <Target-Nr>
377_4 ...386_4SO TA FF 04 00 79...82Modem-CMD: Betriebsart setzen8D | C8TA = <Target-Nr>
357_17...366_17SO TA FF 11 00 65...6EModem-CMD: Temp-Niveau setzen8D | C8TA = <Target-Nr>
377_7 ...386_7SO TA FF 07 00 79...82Modem-CMD: Temp-Niveau setzen8D | C8TA = <Target-Nr>





1: ( Hi-Byte * 256 + Lo-Byte ) / 10
Calculation-Type: 1
2: ( Byte3 * 65536 + Byte2 * 256 + Byte1 )
Calculation-Type: 2
3: ( Byte4 * 1048576 + Byte3 * 65536 + Byte2 * 256 + Byte1 )
Calculation-Type: 3
4: ( Type 3 ) / 10
Calculation-Type: 4
5: ( Type 3 ) / 1000
Calculation-Type: 5
+ +
+

Tabelle 2: ID 2

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme



Message-ID: 2_x_0

ByteWerte (Hex)BemerkungBedeutung / IDBeispiel (Hex)

16Byte




Telegramm: Software-Version / Busteilnehmer

0SO
Source88
1TT<Token-/Target-Nr> (Geräteadr. Ungleich 0)Target18
202
2_x_002
3xy Telegramm-Offset (hier 0...9).
00
4xyErste Erkennung Busteilnehmer2_0_05F


- 00 = Variantenerkennung in Betrieb oder fehlerhaft



…..



- 5F = Heatronic III



- 64 = Schaltmodul IPM1



- 65 = Solarmodul ISM1



- 66 = Schaltmodul IPM2



- 67 = Solarmodul ISM2



- 67 = Solarmodul ISM2



- 69 = Witterungsgeführter Regler FW100



- 6A = Witterungsgeführter Regler FW200



- 6B = Raumtemperaturregler FR100



- 6C = Raumtemperaturregler FR110



- 6D = Fernbedienung FB 10



- 6E = Fernbedienung FB100



- 6F = Raumtemperaturregler FR10



…..



- BD = KM200



- BF = Raumtemperaturregler FR120



- C0 = Witterungsgefuehrter Regler FW120



…..

5xySoftware-Familie2_1_022
6xyVersion der Softwarefamilie2_2_004
7xyZweite Erkennung Busteilnehmern2_3_000
8xyKennzahl f. Grosse Änderung in HW- und SW2_4_000
9xyKennzahl f. Kleine Änderung in HW- und SW2_5_000
10xyDritte Erkennung Busteilnehmern2_6_000
11xyKennzahl f. Kleine Änderung in HW- und SW2_7_000
12xyKennzahl f. Grosse Änderung in HW- und SW2_8_000
13xyMarkenidentifizierung2_9_000


- 00 = keine Markenerkennung



- 01 = Bosch



- 02 = Junkers



- 03 = Buderus



…..

14<CRC>CRC
63
15<Ende>Ende
00
+ +
+

Tabelle 3: ID 7

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID: 7_x_y
ByteWerte (Hex)BemerkungBedeutung / ID

21Byte



EMS Token Status
0SO
Source
100
Target
207
7_x_y
3xy Telegramm-Offset (hier 0...14).
4Bit0...Bit7EMS Token Status 8: EMS Master 7_0_0 bis


- EMS Token Status 9 … 157_0_7
5Bit0...Bit7EMS Token Status 16 … 23 7_1_0 bis



7_1_7
6Bit0...Bit7Busadresse 24 vorhanden7_2_0 bis


- EMS Token Status 25 … 31 7_2_7
7Bit0...Bit7Busadresse 32:Mischerstellmotor im HK1 vorhanden7_3_0 bis


- EMS Token Status 33 … 397_3_7
8Bit0...Bit7Busadresse 40:Warmwassersystem im HK1 vorhanden7_4_0 bis


- EMS Token Status 41 … 477_4_7
9Bit0...Bit7Busadresse 48:Solarmodul vorhanden7_5_0 bis


- EMS Token Status 49 … 557_5_7
10Bit0...Bit7Busadresse 56:Fernbedienung f. HK1 vorhanden7_6_0 bis


- EMS Token Status 57 … 637_6_7
11Bit0...Bit7Busadresse 64:Temperaturfühler im HK1 vorhanden7_7_0 bis


- EMS Token Status 65 … 717_7_7
12Bit0...Bit7Status für Busadresse 72...797_8_0 bis



7_8_7
13Bit0...Bit7EMS Token Status 80 … 877_9_0 bis



7_9_7
14Bit0...Bit7EMS Token Status 88 … 957_10_0 bis



7_10_7
15Bit0...Bit7EMS Token Status 96 … 1037_11_0 bis



7_11_7
16Bit0...Bit7EMS Token Status 104 … 1117_12_0 bis



7_12_7
17Bit0...Bit7EMS Token Status 112 … 119 (Cascaded EMS)7_13_0 bis



7_13_7
18Bit0...Bit7EMS Token Status 120 … 127 (Cascaded EMS)7_14_0 bis



7_14_7
19<CRC>CRC
20<Ende>Ende Marker
+ +
+

Tabelle 4: ID 6

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme



Message-ID:6_x_y
ByteWerte (Hex)BemerkungBedeutung / ID

14Byte 17Byte




Datum/Zeit – Telegramm
090 | 9890 | 98Source :=90h oder :=98hSource
10000
Target
20606
6_x_y
3xyxy Telegramm-Offset (hier 0...6|10).
4xyxyJahr (Wert + 2000)dez.6_0_0
5xyxyMonat (01 … 12)dez.6_1_0
6xyxyStunden (00 … 23)dez.6_2_0
7xyxyTag (01 … 31)dez.6_3_0
8xyxyMinute (00 … 59)dez.6_4_0
9xyxySekunde (00 … 59)dez.6_5_0
10xyxyWochentag6_6_0



01=Montag; 02=Dienstag;... für Fxyz – Regler



00=Montag; 01=Dienstag;... für Cxyz – Regler
11Bit0...Bit7Bit0...Bit7Uhrstatus

Bit0Bit0- Sommerzeit6_7_0

Bit1Bit1- Funkempfang vorhanden6_7_1

Bit2Bit2- Funksignal vorhanden6_7_2

Bit3...Bit7Bit3...Bit7- Immer 0
12<CRC>xyToken-Adresse des aktuellen RTC-Owner6_8_0
13<Ende>xyAutomatische Sommer/Winter Umschaltung6_9_0
14
xyRTC Benutzer Kalibierungswert6_10_0
15
<CRC>

16
<Ende>

+ +
+

Tabelle 5: ID 190

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID: 190_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

11Byte



ErrorCode von Target-/Token
0TTTarget-/Token NummerSource
100- 00 = An AlleTarget
2BE
190_x_0
300Immer 0
4xyBus-Adresse des Fehlercodes190_0_0
5Hi-ByteDisplaycode190_1_0
6Lo-Byte
7Hi-ByteCause Code190_3_0
8Lo-Byte
9<CRC>CRC
10<Ende>Ende Marker
+ +
+

Tabelle 6: ID 24

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme



Message-ID:24_x_y
ByteWerte (Hex)BemerkungBedeutung / ID

31Byte 33Byte




Kessel-Telegramm: Heizgerät
08888
Source
10000
Target
21818
24_x_y
3xyxy Telegramm-Offset (hier 0...25).
4xyxyVorlauf Soll-Temperatur24_0_0
5Hi-ByteHi-ByteVorlauf Ist-Temperatur24_1_0
6Lo-ByteLo-Byte
7xyxyKessel maximale Leistung (76/84/100; 100)%24_3_0
80-1000-100Aktuelle Brennerleistung in %24_4_0
9Bit0...Bit7BitfeldBetriebsmode

Bit0Bit1- Heizungs-Mode24_5_0

Bit1Bit2- Warmwasser-Mode24_5_1

Bit2Bit3:=0- Status Servicebetrieb24_5_2

Bit3Bit4- Brennerflamme an24_5_3

Bit4Bit5:=0- Aufheizphase des Wärmeerzeugers24_5_4

Bit5Bit6:=0- Verriegelnder Fehler24_5_5

Bit6Bit7:=0- Blockierender Fehler24_5_6

Bit7Bit8:=0- Status Wartungsanforderung24_5_7
10Bit0...Bit7Bit0...Bit7Status Heizbetrieb

Bit0Bit0- Heizbetrieb im Bussystem24_6_0

Bit1Bit1- Wärmeanforderung (durch Schalter)24_6_1

Bit2Bit2- Wärmeanforderung bei Betriebsart: Frost24_6_2

Bit3Bit3- Wärmeanforderung im WW-Betrieb bei Betriebsart: Frost24_6_3

Bit4Bit4- Interne Wärmeanforderung bei WW24_6_4

Bit5Bit5- Wärmeanforderung f. WW-Erkennung im Bussystem24_6_5

Bit6Bit6- Wärmeanforderung24_6_6

Bit7Bit7- Wärmeanforderung im Testmodus24_6_7
11Bit0...Bit7Bit0...Bit7Betriebs-Status

Bit0Bit0- Brenner an (Relais-Signal erste Brennstufe)24_7_0

Bit1Bit1- Brenner an (Relais-Signal zweite Brennstufe)24_7_1

Bit2Bit2- Lüfter an (Relais-Signal f. Lüfter)24_7_2

Bit3Bit3- Zündung an (Relais-Signal f. Zündung)24_7_3

Bit4Bit4- Ölvorwärmer an (Relais-Signal f. Ölvorwärmer)24_7_4

Bit5Bit5- Heizungspumpe an (Relais-Signal f. HP)24_7_5

Bit6Bit6- 3-Wege-Ventil auf Speicherladung24_7_6

Bit7Bit7- Zirkulationspumpe an (Relais-Signal f. ZP)24_7_7
12Bit0...Bit7Bit0...Bit7Status 1

Bit0Bit0- Meldesignal Abgasklappe f. Freigabe Ölbrenner24_8_0

Bit1Bit1- Signal vom Luftdruckschalter24_8_1

Bit2Bit2- Signal vom Flüssiggasbrenner24_8_2

Bit3Bit3- Signal vom Gasdruckwächter24_8_3

Bit4Bit4- Signal vom externen Ein-/Aus-Schalter24_8_4

Bit5Bit5- Digitales Eingangssignal24_8_5

Bit6Bit6- Signal vom Sicherheitstemperaturbegrenzer (TB)24_8_6

Bit7Bit7- Signal vom Raumthermostat24_8_7
13Hi-ByteHi-ByteWW-Temperatur Speicherfühler124_9_0
14Lo-ByteLo-Byte- (0x8300 := Nicht vorhanden)
15Hi-ByteHi-ByteWW-Temperatur Speicherfühler224_11_0
16Lo-ByteLo-Byte- (0x8000 | 0x7D00 := Nicht vorhanden)
17Hi-ByteHi-ByteTemperatur Kessel-Rücklauf24_13_0
18Lo-ByteLo-Byte- (0x8000 | 0x7D00 := Nicht vorhanden)
19Hi-ByteHi-ByteIonisationsstrom24_15_0
20Lo-ByteLo-Byte
21FFFFAnlagendruck am Wärmeerzeuger24_17_0



- (FF := ungültig)
22Hi-ByteHi-ByteDisplaycode24_18_0
23Lo-ByteLo-Byte
24Hi-ByteHi-ByteCause Code24_20_0
25Lo-ByteLo-Byte
2600FFWarmwasserdurchfluss-Menge24_22_0



- (FF := ungültig)
27Bit0...Bit7Bit0...Bit7Status 2

Bit0Bit0- Status Speicherlade-Pumpe (SP)24_23_0

Bit1Bit1- Flüssiggasventil an24_23_1

Bit2Bit2- Status Gaswärmepumpe24_23_2

Bit3Bit3- Status d. Relais im Schaltmodul UM1024_23_3

Bit4Bit4- Zirkulationspumpe an (Relais-Signal f. ZP)24_23_4

Bit5Bit5- Status Brenner Relais24_23_5

Bit6Bit6- FB reservierte Bit24_23_6

Bit7Bit7- FB reservierte Bit24_23_7
28Bit0...Bit7Bit0...Bit7Status 3

Bit0Bit0- Status der Füllfunktion 24_24_0

Bit1Bit1- Status Schaltmodul UM1024_24_1

Bit2Bit2- UM10 Signal für Brenner-Blockierung24_24_2

Bit3Bit3- Brennerfreigabe durch Schaltmodul24_24_3

Bit4Bit4- Status Brenneranlauf im Schaltmodul24_24_4

Bit5Bit5- Heizbetrieb blockiert bei Heatronic III24_24_5

Bit6Bit6- STB – Test aktiv24_24_6

Bit7Bit7- Tastensperre ein24_24_7
29<CRC>Hi-ByteCRC | Hi-Byte - Ansauglufttemperaturxy | 24_25_0
30<Ende>Lo-ByteEnde | Lo-Byte - Ansauglufttemperatur
31<CRC> -– | CRC
32<Ende> –- | Ende
+ +
+

Tabelle 7: ID 25

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:25_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

33Byte



Kessel-Telegramm: Heizgerät
088
Source
100
Target
219
25_x_0
3xy Telegramm-Offset (hier 0...25).
4Hi-ByteAußentemperatur25_0_0
5Lo-Byte
6Hi-ByteMaximale Temperatur25_2_0
7Lo-Byte- 0x8000 = Sensorunterbrechung / Fühler nicht vorhanden


- 0x7FFF = Sensorkurzschluss
8Hi-ByteAbgastemperatur25_4_0
9Lo-Byte- 0x8000 = Sensorunterbrechung / Fühler nicht vorhanden


- 0x7FFF = Sensorkurzschluss
10Hi-ByteGasdruck / Luftdruck25_6_0
11Lo-Byte- 0xFFFF = Sensorunterbrechung / Fühler nicht vorhanden
12xyTaktsperre im Zweipunkt Betrieb25_8_0
13xyModulationsbereich Heizungspumpe (HP)25_9_0
14Byte 3Brennerstarts Total (für Warmwasser und Heizung)25_10_0
15Byte 2 „ ( Calculation-Type: 2 )
16Byte 1
17Byte 3Betriebsminuten Brenner Total (für Warmwasser und Heizung)25_13_0
18Byte 2 „ ( Calculation-Type: 2 )
19Byte 1
20Byte 3Betriebszeit f. Zweite Brennerstufe25_16_0
21Byte 2 „ ( Calculation-Type: 2 )
22Byte 1
23Byte 3Betriebsminuten Brenner (nur Heizung)25_19_0
24Byte 2 „ ( Calculation-Type: 2 )
25Byte 1
26Byte 3Brennerstarts (nur Heizung)25_22_0
27Byte 2 „ ( Calculation-Type: 2 )
28Byte 1
29Hi-ByteTemperatur an hydraulischer Weiche25_25_0
30Lo-Byte- 0x8000 = Sensorunterbrechung / Fühler nicht vorhanden


- 0x7FFF = Sensorkurzschluss
31<CRC>CRC
32<Ende>Ende Marker
+ +
+

Tabelle 8: ID 188

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:188_x_y
ByteWerte (Hex)BemerkungBedeutung / ID






Kessel-Telegramm: Heizgerät
088
Source
100
Target
2BC
188_x_y
3xy Telegramm-Offset (hier 0...13).
4Hi-ByteTemperatur Puffer-Speicher oben188_0_0
5Lo-Byte
6Hi-ByteTemperatur Puffer-Speicher unten188_2_0
7Lo-Byte
8Hi-ByteTemperatur Vorlauf Verflüssiger188_4_0
9Lo-Byte
10Hi-ByteTemperatur Rücklauf Verflüssiger188_6_0
11Lo-Byte
12Bit0...Bit7Betriebs-Status1

Bit0- Wärmepumpe188_8_0

Bit1
188_8_1

Bit2
188_8_2

Bit3
188_8_3

Bit4- Status Abtaumöglichkeit an W-Pumpe188_8_4

Bit5
188_8_5

Bit6
188_8_6

Bit7
188_8_7
13Bit0...Bit7Betriebs-Status2

Bit0- Abtaufunktion an W-Pumpe188_9_0

Bit1- Status Verdichter188_9_1

Bit2- Fehlerstatus Wärmepumpe188_9_2

Bit3
188_9_3

Bit4
188_9_4

Bit5
188_9_5

Bit6
188_9_6

Bit7
188_9_7
14<CRC>CRC
15<Ende>Ende
+ +
+

Tabelle 9: ID 27

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:27_0_0
ByteWerte (Hex)BemerkungBedeutung / ID

7Byte



Telegramm: Solltemperatur WW-System
090 Source
100
Target
21B
27_x_0
300Immer 00
432Sollwert Warmwasser-Temperatur27_0_0
5<CRC>CRC
6<Ende>Ende Marker
+ +
+

Tabelle 10: ID 51

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID: 51_x_y
ByteWerte (Hex)BemerkungBedeutung / ID






Kessel-Telegramm: Warmwasser
088
Source
100
Target
233
51_x_y
3xy Telegramm-Offset (hier 0...12).
4xySoll-Temperatur Warmwasser51_0_0
5xy
51_1_0
6xySoll-Temperatur Warmwasser51_2_0
7xyTemperaturhysterese bei T-Soll51_3_0
8xy
51_4_0
9xy
51_5_0
10xy
51_6_0
11xy
51_7_0
12xy
51_8_0
13xy
51_9_0
14xy
51_10_0
15xy
51_11_0
16xy
51_12_0
17<CRC>

18<Ende>

+ +
+

Tabelle 11: ID 52

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme






Message-ID: 52_x_y
ByteWerte (Hex)
BemerkungBedeutung / ID

23Byte 22Byte 25Byte





Kessel-Telegramm: Warmwasser
0888888
Source
1000000
Target
2343434
52_x_y
3xyxyxy Telegramm-Offset (hier 0...17).
4xyxyxySoll-Temperatur Warmwasser52_0_0
5Hi-ByteHi-ByteHi-ByteIst-Temperatur Warmwasser52_1_0
6Lo-ByteLo-ByteLo-Byte- 0x8000 = Sensorunterbrechung / Fühler nicht vorhanden




- 0x7FFF = Sensorkurzschluss
7Hi-ByteHi-ByteHi-ByteIst-Temperatur im Warmwasser - Speicher52_3_0
8Lo-ByteLo-ByteLo-Byte- 0x8000 = Sensorunterbrechung / Fühler nicht vorhanden




- 0x7FFF = Sensorkurzschluss
9Bit0...Bit7Bit0...Bit7Bit0...Bit7Warmwasser-Status

Bit0Bit0Bit0- WW-Bereitung im Normalbetrieb52_5_0

Bit1Bit1Bit1- Einmalige Speicher-Ladung52_5_1

Bit2Bit2Bit2- Thermische Desinfektion52_5_2

Bit3Bit3Bit3- Speicherladung im WW-System52_5_3

Bit4Bit4Bit4- Speicherladung im Nachwärmsystem52_5_4

Bit5Bit5Bit5- Erreichter Sollwert Warmwasser-Temperatur52_5_5

Bit6Bit6Bit6- Warmwasserbetrieb52_5_6

Bit7Bit7Bit7- Status f. Art der Warmwasserbereitung52_5_7




-- 0 = Warmwasserteilvorrang




-- 1 = Warmwasservorrang
10Bit0...Bit7Bit0...Bit7Bit0...Bit7WW-Fehlersignale

Bit0Bit0Bit0- WW-Temperaturfühler 1 defekt52_6_0

Bit1Bit1Bit1- WW-Temperaturfühler 2 defekt52_6_1

Bit2Bit2Bit2- WW-System wird nicht aufgeheizt52_6_2

Bit3Bit3Bit3- Thermische Desinfektion ist nicht in Betrieb52_6_3

Bit4Bit4Bit4- WW ist nicht blockiert52_6_4

Bit5...Bit7Bit5...Bit7Bit5...Bit7- Immer 052_6_5 bis





52_6_7
11Bit0...Bit7Bit0...Bit7Bit0...Bit7Zirkulationspumpen-Status

Bit0Bit0Bit0- Zirkulationspumpe (ZP) im Normalbetrieb52_7_0

Bit1Bit1Bit1- Zirkulationspumpe (ZP) an bei einmaliger Speicherladung52_7_1

Bit2Bit2Bit2- Zirkulationspumpe (ZP) an52_7_2

Bit3Bit3Bit3- Ansteuersignal f. Zirkulationspumpe (ZP)52_7_3

Bit4...Bit7Bit4...Bit7Bit4...Bit7- Immer 0
120...40...40...4Bauart des Warmwassersystems52_8_0




- 0 = ohne Warmwasserbereitung




- 1 = nach Durchlaufprinzip




- 2 = Druckloser Speicher




- 3 = Warmwasser-Speicherprinzip




- 4 = Schichtlade-Speicher
13xyxyxyAktuelle Wasserduchflussmenge52_9_0
14Byte 3Byte 3Byte 3Betriebszeit Warmwasser-Erzeugung (Minuten)52_10_0
15Byte 2Byte 2Byte 2
16Byte 1Byte 1Byte 1
17Byte 3Byte 3Byte 3Anzahl Brennerstarts für Warmwassererzeugung52_13_0
18Byte 2Byte 2Byte 2
19Byte 1Byte 1Byte 1
20xy<CRC>xyModulationsbereich ZP im WW-System 152_16_0
21<CRC><Ende>Hi-ByteHi-Byte Warmwasser Eingangstemperatur52_17_0
22<Ende>--Lo-ByteLo-Byte Warmwasser Eingangstemperatur




- 0x8000 = Sensorunterbrechung / Fühler nicht vorhanden




- 0x7FFF = Sensorkurzschluss
23

<CRC>

24

<Ende>

+ +
+

Tabelle 12: ID 467...468

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:467_x_0 bis 468_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

11Byte



Telegramm: Betriebsart WW-System
090 Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
400Immer 00EMS Type(H)
5D3 / D4WW-System


- D3=WW-System1467_0_0


- D4=WW-System2468_0_0
6xyBetriebsart Warmwasser-System


- 0=Automatikbetrieb f. WW-Speicher


- 1=Automatikbetrieb b. Kombigerät aktiv


- 2=Automatikbetrieb b. Kombigerät ausgeschaltet


- 3=Automatikbetrieb i. Urlaubsmodus f. WW-Speicher


- 4=Urlaubsfunktion eingeschaltet a. Kombigerät


- 5=Urlaubsfunktion ausgeschaltet a. Kombigerät


- 6=Fest eingestellte Speichertemperatur im Urlaubsprogramm


- 7=Thermische Desinfektion f. WW-Speicher


- 8=Warmwasser sofort


- 9=Estrichtrocknung in Betrieb oder angehalten
7xyWert f. Temperaturreduzierung bei solarer Unterstuetzung467_1_0 bis 468_1_0
8xyStatus der letzten thermischen Desinfektion467_2_0 bis 468_2_0


- 0=Abgeschlossen


- 1=In Betrieb


- 2=Abgebrochen
9<CRC>CRC
10<Ende>Ende Marker
+ +
+

Tabelle 13: ID 26

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme



Message-ID:26_x_0

ByteWerte (Hex)BemerkungBedeutung / IDBeispiel (Hex)

11Byte




Telegramm: Heizkreis Systemwerte

090
Source
108Target = SteuerungTarget
21AImmer 1A26_x_0
3xy Telegramm-Offset (hier 0...4).

426Sollwert f. Vorlauftemperatur im Heizkreis26_0_0
564Maximale Leistung des Wärmeerzeugers26_1_0
664Sollwert f. Drehzahl der Umwälzpumpe26_2_0
70 / FFStatus f. Aufheizen mit hohem Wirkungsgrad26_3_0
83Betriebsart f. Umwälzpumpe im Energiesparmodus26_4_0
9<CRC>CRC

10<Ende>Ende Marker

+ +
+

Tabelle 14: ID 268

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:268_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

14Byte



IPM – Telegramm (Schaltmodul)
0A0...A7
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
400Immer 00EMS Type(H)
50CImmer 0CEMS Type(L)
60...2Bauart des Heizkreises (Mischer ja/nein)


- 0=Nicht vorhanden


- 1=Ungemischter Heizkreis268_0_0


- 2=Gemischter Heizkreis268_0_1
70...1Status Heizungspumpe im Heizkreis268_1_0


- 0=Pumpe aus


- 1=Pumpe Ein
8xyMischer Position (Prozentwert)268_2_0
9Hi-ByteVorlauftemperatur 'Ist' für gemischten Heizkreis268_3_0
10Lo-Byte
11xySollwert Vorlauftemperatur (Grad)268_5_0
12<CRC>CRC
13<Ende>Ende Marker
+ +
+

Tabelle 15: ID 296

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:296_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

32Byte



Telegramm: Heizkreis Fehlermeldungen
090
Source
100
Target
2FF
EMS Marker
3xyOffset auf nächste FehlermeldungEMS Offset
400Immer 00EMS Type(H)
528FehlerEMS Type(L)
6xy1Fehler1: Display-Code1296_0_0
7xy2Fehler1: Display-Code2296_1_0
8Hi-ByteFehler1: Fehlercode296_2_0
9Lo-Byte

10xyFehler1: Jahr (+2000)296_4_0
11xyFehler1: Monat296_5_0
12xyFehler1: Stunde296_6_0
13xyFehler1: Tag296_7_0
14xyFehler1: Minute296_8_0
15Hi-ByteFehler1: Minute (Reserviert)296_9_0
16Lo-Byte

17xyFehler1: Busadresse296_11_0
18xy1Fehler2: Display-Code1296_12_0
19xy2Fehler2: Display-Code2296_13_0
20Hi-ByteFehler2: Fehlercode296_14_0
21Lo-Byte

22xyFehler2: Jahr (+2000)296_16_0
23xyFehler2: Monat296_17_0
24xyFehler2: Stunde296_18_0
25xyFehler2: Tag296_19_0
26xyFehler2: Minute296_20_0
27Hi-ByteFehler2: Minute (Reserviert)296_21_0
28Lo-Byte

29xyFehler2: Busadresse296_23_0
30<CRC>CRC
31<Ende>Ende Marker
+ +
+

Tabelle 16: ID 357...366

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:357_x_0 bis 366_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

29Byte



Telegramm: Heizkreis Steuerung


(Bauart des Heizkreises)
090
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
400Immer 00EMS Type(H)
565...6EHeizkreis xEMS Type(L)

65 65=Heizkreis1357_0_0

66 66=Heizkreis2358_0_0

67 67=Heizkreis3359_0_0

68 68=Heizkreis4360_0_0

69 69=Heizkreis5361_0_0

6A 6A=Heizkreis6362_0_0

6B 6B=Heizkreis7363_0_0

6C 6C=Heizkreis8364_0_0

6D 6D=Heizkreis9365_0_0

6E 6E=Heizkreis10366_0_0
60...3Bauart-Werte357_1_0 bis


- 0=Nicht vorhanden366_1_0


- 1=Ungemischter Heizkreis ohne Schaltmodul IPM


- 2=Ungemischter Heizkreis mit Schaltmodul IPM


- 3=Gemischter Heizkreis
70...2Fernbedienung für Heizkreis x


- 0=Nicht vorhanden


- 1=Fernbedienung FB 10


- 2=Fernbedienung FB100
80...4Bauart des Heizkreis x


- 0=nicht definiert357_2_0 bis


- 1=Fußpunkt/Endpunkt366_2_0


- 2=Radiatoren


- 3=Konvektoren


- 4=Fußbodenheizung
9z.B. 19Fußpunkt für Heizkurve (in Grad)357_3_0 bis



366_3_0
10z.B. 30Endpunkt für Heizkurve (in Grad)357_4_0 bis



366_4_0
11z.B. 50Maximale Vorlauftemperatur (in Grad) für Heizkreis x357_5_0 bis



366_5_0
12
Raumeinfluss-Faktor (%) im Heizkreis x357_6_0 bis



366_6_0
130...2Raumeinfluss im Heizkreis x bei Betriebsart357_7_0 bis


- 0=nicht definiert366_7_0


- 1=Normalbetrieb / Sparbetrieb / Frostschutzbetrieb


- 2=Sparbetrieb / Frostschutzbetrieb
14
Einstellung dauerhafte Raumtemperatur-Korrektur im Heizkreis x357_8_0 bis



366_8_0
150...3Betriebsart Raumtemperaturfühler für Heizkreis x357_9_0 bis


- 0=nicht definiert366_9_0


- 1=Externer Temperaturfühler


- 2=Interner Temperaturfühler


- 3=Temperatur im Sparmodus




160/FFStatus für Temperaturniveau Frost357_10_0 bis


- 0 = Aus366_10_0


- FF = Ein
17z.B. 2BAbschaltung (Außentemperaturgesteuert) von Heizkreis x357_11_0 bis


- (in 0.5 Grad Schritten)366_11_0
18
Frostgrenztemperatur für Heizkreis x357_12_0 bis


- (in 0.5 Grad Schritten)366_12_0
190...6Aktives Heizprogramm im Heizkreis x357_13_0 bis


- 0=nicht definiert366_13_0


- 1-6=Nummer des aktiven Heizprogramms


- (1:A; 2:=B;3:=C; …)
200....4Betriebsart für den Heizkreis x357_14_0 bis


- 0=nicht definiert366_14_0


- 1=Betrieb im Frostschutzmodus


- 2=Betrieb im Sparmodus


- 3=Betrieb im Normalmodus


- 4=Automatikbetrieb
21z.B. 14Temperaturniveau für Betriebsart Frost im Heizkreis x357_15_0 bis


- (in 0.5 Grad Schritten)366_15_0
22z.B. 28Temperaturniveau für Betriebsart Sparen im Heizkreis x357_16_0 bis


- (in 0.5 Grad Schritten)366_16_0
23z.B. 2BTemperaturniveau für Betriebsart Normal im Heizkreis x357_17_0 bis


- (in 0.5 Grad Schritten)366_17_0
240...3Aufheizgeschwindigkeit für Heizkreis x357_18_0 bis


- 0=nicht definiert366_18_0


- 1=Langsam


- 2=Normal


- 3=Schnell
250...4Urlaubsprogramm Betriebsart für Heizkreis x357_19_0 bis


- 0=nicht definiert366_19_0


- 1=Betrieb im Frostschutzmodus


- 2=Betrieb im Sparmodus


- 3=Betrieb im Normalmodus


- 4=Automatikbetrieb
26
Optimierungseinfluss für solare Unterstützung im Heizkreis x357_20_0 bis


- (in 1 Grad Schritten)366_20_0
27<CRC>CRC
28<Ende>Ende Marker
+ +
+

Tabelle 17: ID 367...376

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme






Message-ID:367_x_0 bis 376_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

17Byte 14Byte 9Byte





Telegramm: Heizkreis Steuerung




(Temperaturniveau für den Heizkreis)
090 | 9x90 | 9x90 | 9x (wobei: x:= 8...F)Source
1000000
Target
2FFFFFF
EMS Marker
3xyxyxy
EMS Offset
4000000Immer 00EMS Type(H)
56F...786F...786F...78Heizkreis-ZuordnungEMS Type(L)




6F=Heizkreis1367_0_0




70=Heizkreis2368_0_0




71=Heizkreis3369_0_0




72=Heizkreis4370_0_0




73=Heizkreis5371_0_0




74=Heizkreis6372_0_0




75=Heizkreis7373_0_0




76=Heizkreis8374_0_0




77=Heizkreis9375_0_0




78=Heizkreis10376_0_0
60...30...30...3Betriebsart Heizung:367_0_0 bis




- 0=nicht definiert376_0_0




- 1=Frost




- 2=Sparen




- 3=Heizen
70...50...5<CRC>Betriebsart Heizkreis | | CRC367_1_0 bis




- 0=nicht definiert376_1_0



- 1=dauernd



- 2=Automatikbetrieb



- 3=Urlaub



- 4=Estrichtrocknung im StandbyModus



- 5=Estrichtrocknung in Betrieb
8Hi-ByteHi-Byte<Ende>Soll-Temperatur (HK1 bis HK10) | | Ende Marker367_2_0 bis
9Lo-ByteLo-Byte376_2_0
10Hi-ByteHi-ByteIst-Temperatur (HK1 bis HK10 vom Regler)367_4_0 bis
11Lo-ByteLo-Byte376_4_0
12Hi-Byte<CRC>T-Raum FB10x | CRC367_6_0
13Lo-Byte<Ende>T-Raum FB10x | Ende Marker
1400 … 07Temperaturwert für solare Unterstützung der Vorlauftemperatur367_8_0
15<CRC>CRC
16<Ende>Ende Marker
+ +
+

Tabelle 18: ID 377...386

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:377_x_0 bis 386_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

19Byte



Telegramm: Heizkreis Steuerung
090 (Bauart des Heizkreises)Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
400Immer 00EMS Type(H)
579...82Heizkreis x KennungEMS Type(L)


79=Heizkreis1377_0_0


7A=Heizkreis2378_0_0


7B=Heizkreis3379_0_0


7C=Heizkreis4380_0_0


7D=Heizkreis5381_0_0


7E=Heizkreis6382_0_0


7F=Heizkreis7383_0_0


80=Heizkreis8384_0_0


81=Heizkreis9385_0_0


82=Heizkreis10386_0_0
60...3Bauart-Werte377_0_0 bis


- 0=Nicht vorhanden386_0_0


- 1=Ungemischter Heizkreis ohne Schaltmodul IPM


- 2=Ungemischter Heizkreis mit Schaltmodul IPM


- 3=Gemischter Heizkreis
7
Anpassungsfaktor im Heizkreis x377_1_0 bis



386_1_0
8
Verstärkungsfaktor im Heizkreis x377_2_0 bis



386_2_0
9
Maximale Vorlauftemperatur im Heizkreis x377_3_0 bis



386_3_0
100...4Betriebsart für Heizkreis x377_4_0 bis


- 0=nicht definiert386_4_0


- 1=Betrieb im Frostschutzmodus


- 2=Betrieb im Sparmodus


- 3=Betrieb im Normalmodus


- 4=Automatikbetrieb
11
Temperaturniveau bei Betriebsart Frost377_5_0 bis


- (in 0.5 Grad Schritten)386_5_0
12
Temperaturniveau bei Betriebsart Sparen377_6_0 bis


- (in 0.5 Grad Schritten)386_6_0
13
Temperaturniveau bei Betriebsart Normal377_7_0 bis


- (in 0.5 Grad Schritten)386_7_0
14
Urlaubsprogramm Betriebsart für Heizkreis x377_8_0 bis


- ( Werte wie bei Byte:10 Betriebsart Heizkreis)386_8_0
150/FFStatus Optimierungsfunktion im Heizkreis x377_9_0 bis


- 0 = Aus386_9_0


- FF = Ein
160...6Aktiviertes Heizprogramm377_10_0 bis


- 0=Nicht definiert386_10_0


- 1-6=Nummer des aktiven Heizprogramms


- (1=A; 2=B; 3=C; …)
17<CRC>CRC
18<Ende>Ende Marker
+ +
+

Tabelle 19: ID 677...684

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:677_x_0 bis 684_x_0
Byte
BemerkungBedeutung / ID






Telegramm: Heizkreis Steuerung


(Temperaturniveau für den Heizkreis)
090
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
401Immer 01EMS Type(H)
5A5...ACHeizkreis-ZuordnungEMS Type(L)


A5=Heizkreis1677_0_0


A6=Heizkreis2678_0_0


A7=Heizkreis3679_0_0


A8=Heizkreis4680_0_0


A9=Heizkreis5681_0_0


AA=Heizkreis6682_0_0


AB=Heizkreis7683_0_0


AC=Heizkreis8684_0_0
6Hi-ByteIst-Raumtemperatur (HK1 bis HK8)677_0_0 bis
7Lo-Byte684_0_0
8xyStatus Heizkreis6xy_2_0
9xy
6xy_3_0
10xy
6xy_4_0
11xy
6xy_5_0
12xySoll-Raumtemperatur (HK1 bis HK8)6xy_6_0
13xy
6xy_7_0
14Hi-Byte
6xy_8_0
15Lo-Byte
16xy
6xy_10_0
17xyTemperatur-Niveau6xy_11_0
18xy
6xy_12_0
19Hi-Byte
6xy_13_0
20Lo-Byte
21Hi-Byte
6xy_15_0
22Lo-Byte
23xy
6xy_17_0
24xy
6xy_18_0
25xy
6xy_19_0
26xy
6xy_20_0
27xyBetriebsstatus (HK1 bis HK8) {Auto / Manuell}6xy_21_0
28Hi-Byte
6xy_22_0
29Lo-Byte
30xy
6xy_24_0
31xy
6xy_25_0
32xy
6xy_26_0
33Hi-Byte
6xy_27_0
34Lo-Byte
35xy
6xy_29_0
36xy
6xy_30_0
37<CRC>CRC
38<Ende>Ende Marker
+ +
+

Tabelle 20: ID 259

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:259_x_0
ByteWerte (Hex)BemerkungBedeutung / ID

21Byte



ISM Solar-Telegramm
0B0
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
400Immer 00EMS Type(H)
503Immer 03EMS Type(L)
6xyOptimierungsfaktor WW mit solarer Unterstützung259_0_0
7xyOptimierungsfaktor Heiz. mit solarer Unterstützung259_1_0
8Hi-ByteSolarertrag in der letzten Stunde (Wh)259_2_0
9Lo-Byte
10Hi-ByteSolarkollektor1 Temperatur T1259_4_0
11Lo-Byte
12Hi-ByteSolarspeicher Temperatur T2259_6_0
13Lo-Byte
14Bit0...Bit7Betriebsart Solarpumpe (1. Kollektorfeld)

Bit0- Solarpumpe (SP); 0=aus; 1=ein259_8_0

Bit1- Relaysignal Umwälzpumpe(PE) bei thermischer Desinfektion259_8_1

Bit2..Bit7- Immer 0
15Bit0...Bit7Solar Systemstatus

Bit0- Abschaltung 1.Kollektorfeld bei Stagnation259_9_0


-- 0 =Nein


-- 1 =Ja (5 Grad Hysterese)

Bit1- Status Temperatur bei thermischer Desinfektion259_9_1

Bit2- Status Solarspeicher259_9_2


-- 0 =Nicht voll geladen


-- 1 =Voll geladen (2 Grad Hysterese)

Bit3-8 Immer 0
16Byte 3Laufzeit Solarpumpe (Minuten)
17Byte 2 „ ( Calculation-Type: 2 )259_10_0
18Byte 1
19<CRC>CRC
20<Ende>Ende Marker
+ +
+

Tabelle 21: ID 260

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme



Message-ID:260_x_y
ByteWerte (Hex)
BemerkungBedeutung / ID

24Byte 35Byte




ISM Solar-Telegramm
0B0B0
Source
10000
Target
2FFFF
EMS Marker
3xyxy
EMS Offset
40000Immer 00EMS Type(H)
50404Immer 04EMS Type(L)
6Hi-Byte T3Hi-Byte T3Temperatur T3 im Pufferspeicher f. Rücklaufanhebung260_0_0
7Lo-Byte T3Lo-Byte T3
8Hi-ByteHi-ByteHeizungsrücklauftemperatur260_2_0
9Lo-ByteLo-Byte
10Hi-Byte T5Hi-Byte T5Temperatur T5 im Pufferspeicher (oben)260_4_0
11Lo-Byte T5Lo-Byte T5
12Hi-Byte T6Hi-Byte T6Temperatur T6 im Bereitschaftsspeicher (unten)260_6_0
13Lo-Byte T6Lo-Byte T6
14Hi-ByteHi-ByteTemperatur 2. Kollektorfeld260_8_0
15Lo-ByteLo-Byte
16Hi-ByteHi-ByteTemperatur TB im Pufferspeicher (oben)260_10_0
17Lo-ByteLo-Byte
18Hi-ByteHi-ByteTemperatur TC im Vorrang-/Nachrangspeicher260_12_0
19Lo-ByteLo-Byte
20Hi-ByteHi-ByteTemperatur am externen Wärmetauscher f. Solarsystem260_14_0
21Lo-ByteLo-Byte
22<CRC>Bit0...Bit7Status 1


Bit0- Betriebsart Ventil (DWU) f. Rücklaufanhebung260_16_0


Bit1- Relaisansteuerung f. Umwälzpumpe Umladesystem260_16_1


Bit2- Umwälzpumpe (PA) im 2. Kollektorfeld260_16_2


Bit3- Relaisansteuerung f. Umwälzpumpe (PB) Umladesystem260_16_3


Bit4- Betriebsart Umwälzpumpe (PC)/Umschaltventil260_16_4


Bit5- Betriebsart Umwälzpumpe (PD) im Sekundärkreis260_16_5


Bit6- Relaissignal bei Option F260_16_6


Bit7- unbenutzt260_16_7
23<Ende>Bit0...Bit7Status 2


Bit0- Ansteuerung Ventil DWU1 f. Rücklaufanhebung260_17_0


Bit1- Status maximale Temperatur im Umladespeicher260_17_1


Bit2- Status Umwälzpumpe (PA) im 2.Kollektorfeld (Stagnation)260_17_2


Bit3- Maximaltemperatur erreicht im WW-Speicher B260_17_3


Bit4- WW-Speicher geladen260_17_4


Bit5- Testmodus (Speicherladung Vorrangspeicher)260_17_5


Bit6- Maximaltemperatur erreicht im WW-Speicher C260_17_6


Bit7- Testmodus260_17_7
24
Byte 3Betriebszeit f. Solarmumpe (PA) im zweiten Kollektorfeld260_18_0
25
Byte 2
26
Byte 1
27
Hi-ByteZeitintervall f. Überprüfung ob Speicher C geladen wird260_21_0
28
Lo-Byte

29
Hi-ByteTemperatur TF 1 in Wärmequelle260_23_0
30
Lo-Byte

31
Hi-ByteTemperatur TF 2 in Wärmesenke260_25_0
32
Lo-Byte

33
<CRC>

34
<Ende>

+ +
+

Tabelle 22: ID 866

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:866
Byte
BemerkungBedeutung / ID






MS100 Solar-Telegramm
0B0
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
402Immer 02EMS Type(H)
562Immer 62EMS Type(L)
6Hi-ByteSolarkollektor1 Temperatur866_0_0
7Lo-Byte
8Hi-ByteSolarspeicher Temperatur unten866_2_0
9Lo-Byte
10Hi-ByteSolarspeicher Temperatur mittlerer Sensor866_4_0
11Lo-Byte
12Hi-ByteSolarkollektor2 Temperatur866_6_0
13Lo-Byte
14Hi-ByteSolarspeicher Beipass Temperatur866_8_0
15Lo-Byte
16Hi-ByteSolarspeicher Beipass Return-Temperatur866_10_0
17Lo-Byte
18Hi-Byte
866_12_0
19Lo-Byte
20Hi-Byte
866_14_0
21Lo-Byte
22Hi-Byte
866_16_0
23Lo-Byte
24Hi-Byte
866_18_0
25Lo-Byte
26Hi-Byte
866_20_0
27Lo-Byte
28Hi-Byte
866_22_0
29Lo-Byte
30Hi-Byte
866_24_0
31Lo-Byte
32<CRC>

33<Ende>

+ +
+

Tabelle 23: ID 868

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:868_x_y
Byte
BemerkungBedeutung / ID






MS100 Solar-Telegramm
0B0
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
402Immer 02EMS Type(H)
564Immer 64EMS Type(L)
6xy
868_0_0
7xy
868_1_0
8Bit0...Bit7
868_2_x

Bit0
868_2_0

Bit1
868_2_1

Bit2
868_2_2

Bit3
868_2_3

Bit4
868_2_4

Bit5
868_2_5

Bit6
868_2_6

Bit7
868_2_7
9Bit0...Bit7Solar Systemstatus868_3_x

Bit0- Abschaltung 1.Kollektorfeld bei Stagnation868_3_0


-- 0 =Nein


-- 1 =Ja

Bit1-- 1 =Solarspeicher maximale Temperatur erreicht868_3_1

Bit2-- 1 =Solarspeicher minimale Temperatur erreicht868_3_2

Bit3
868_3_3

Bit4
868_3_4

Bit5
868_3_5

Bit6
868_3_6

Bit7
868_3_7
10xy
868_4_0
11xy
868_5_0
12xy
868_6_0
13xy
868_7_0
14xy
868_8_0
15xyAktuelle Solarpumpen – Leistung868_9_0
16xy
868_10_0
17xy868_11_0
18xy
868_12_0
19xy868_13_0
20xy
868_14_0
21xy868_15_0
22<CRC>

23<Ende>

+ +
+

Tabelle 24: ID 873

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:873_x_0
Byte
BemerkungBedeutung / ID






MS100 Solar-Telegramm
0B0
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
402Immer 02EMS Type(H)
569Immer 69EMS Type(L)
6Byte 4Solarertrag letzte Stunde873_0_0
7Byte 3
8Byte 2 „ ( Calculation-Type: 4 )
9Byte 1
10Byte 4Solarertrag aktueller Tag873_4_0
11Byte 3
12Byte 2
13Byte 1
14Byte 4Solarertrag Summe873_8_0
15Byte 3
16Byte 2
17Byte 1
18<CRC>

19<Ende>

+ +
+

Tabelle 25: ID 874

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:874_x_0
Byte
BemerkungBedeutung / ID






MS100 Solar-Telegramm
0B0
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
402Immer 02EMS Type(H)
56AImmer 6AEMS Type(L)
6xy
874_0_0
7xy
874_1_0
8xy
874_2_0
9xy
874_3_0
10xy
874_4_0
11xy
874_5_0
12xy
874_6_0
13xy
874_7_0
14xy
874_8_0
15xy
874_9_0
16Bit0...Bit7
874_10_x

Bit0
874_10_0

Bit1
874_10_1

Bit2- Solarpumpe (SP); 0=aus; 1=ein874_10_2

Bit3
874_10_3

Bit4
874_10_4

Bit5
874_10_5

Bit6
874_10_6

Bit7
874_10_7
17xy
874_11_0
18xy
874_12_0
19xy874_13_0
20xy
874_14_0
21xy874_15_0
22<CRC>

23<Ende>

+ +
+

Tabelle 26: ID 910

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:910_x_0
Byte
BemerkungBedeutung / ID






MS100 Solar-Telegramm
0B0
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
402Immer 02EMS Type(H)
58EImmer 8EEMS Type(L)
6Byte 4Solarertrag letzte Stunde910_0_0
7Byte 3
8Byte 2 „ ( Calculation-Type: 4 )
9Byte 1
10Byte 4Solarertrag aktueller Tag910_4_0
11Byte 3
12Byte 2 „ ( Calculation-Type: 5 )
13Byte 1
14Byte 4Solarertrag Summe910_8_0
15Byte 3
16Byte 2 „ ( Calculation-Type: 4 )
17Byte 1
18<CRC>

19<Ende>

+ +
+

Tabelle 27: ID 913

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:913_x_0
Byte
BemerkungBedeutung / ID






MS100 Solar-Telegramm
0B0
Source
100
Target
2FF
EMS Marker
3xy
EMS Offset
402Immer 02EMS Type(H)
591Immer 91EMS Type(L)
6Byte 4Laufzeit Solarpumpe (Minuten)913_0_0
7Byte 3
8Byte 2 „ ( Calculation-Type: 2 )
9Byte 1
10xy
913_4_0
11xy
913_5_0
12xy
913_6_0
13xy
913_7_0
14xy
913_8_0
15xy
913_9_0
16xy
913_10_0
17xy
913_11_0
18<CRC>

19<Ende>

+ +
+

Tabelle 28: ID 357_366_14_Modem

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:357_14_0 bis 366_14_0
ByteWerte (Hex)BemerkungBedeutung / ID

9Byte



Modem-CMD:: Betriebsart setzen
08DSource: ModemSource
110TargetTarget
2FFEMS-TypeEMS Marker
30E
EMS Offset
400
EMS Type(H)
565...6EHeizkreis xEMS Type(L)


65=Heizkreis1


66=Heizkreis2


67=Heizkreis3


68=Heizkreis4


69=Heizkreis5


6A=Heizkreis6


6B=Heizkreis7


6C=Heizkreis8


6D=Heizkreis9


6E=Heizkreis10
60...4Heizkreisbetriebsart-Werte357_14_0 bis


- 0=Nicht definiert366_14_0


- 1=Betrieb im Frostschutzmodus


- 2=Betrieb im Sparmodus


- 3=Betrieb im Normalmodus


- 4=Automatikbetrieb
7<CRC>CRC
8<Ende>Ende Marker
+ +
+

Tabelle 29: ID 377_387_4_Modem

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme


Message-ID:377_4_0 bis 386_4_0
ByteWerte (Hex)BemerkungBedeutung / ID

9Byte



Modem-CMD: Betriebsart setzen
08DSource: ModemSource
110TargetTarget
2FFEMS-TypeEMS Marker
304
EMS Offset
400
EMS Type(H)
579...82Heizkreis x KennungEMS Type(L)


79=Heizkreis1


7A=Heizkreis2


7B=Heizkreis3


7C=Heizkreis4


7D=Heizkreis5


7E=Heizkreis6


7F=Heizkreis7


80=Heizkreis8


81=Heizkreis9


82=Heizkreis10
60...4Heizkreisbetriebsart-Werte357_4_0 bis


- 0=Nicht definiert366_4_0


- 1=Betrieb im Frostschutzmodus


- 2=Betrieb im Sparmodus


- 3=Betrieb im Normalmodus


- 4=Automatikbetrieb
7<CRC>CRC
8<Ende>Ende Marker
+ +
+

Tabelle 30: ID 357...366_1x_Modem

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme




Message-ID:357_1x_0 bis 366_1x_0


ByteWerte (Hex)BemerkungBedeutung / ID


9Byte
Betriebsart



Modem-CMD: Temperatur-Niveau setzen (Betriebsart Normal/Sparen/Frost) NormalSparenFrost
08DSource: ModemSourceSourceSource
110TargetTargetTargetTarget
2FFEMS-TypeEMS MarkerEMS MarkerEMS Marker
311/10/0FEMS-Offset 11 (hex)10 (hex) F (hex)
400
EMS Type(H)EMS Type(H)EMS Type(H)
565...6EHeizkreis xEMS Type(L)EMS Type(L)EMS Type(L)


65=Heizkreis1




66=Heizkreis2




67=Heizkreis3




68=Heizkreis4




69=Heizkreis5




6A=Heizkreis6




6B=Heizkreis7




6C=Heizkreis8




6D=Heizkreis9




6E=Heizkreis10


6
Temperaturniveau für Betriebsart: y im Heizkreis x357_17_0 bis357_16_0 bis357_15_0 bis


- (in 0.5 Grad Schritten)366_17_0366_16_0366_15_0
7<CRC>CRC


8<Ende>Ende Marker


+ +
+

Tabelle 31: ID 377...386_x_Modem

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HT Bus-Telegramme




Message-ID:377_x_0 bis 386_x_0


ByteWerte (Hex)BemerkungBedeutung / ID


9Byte





Modem-CMD: Temperatur-Niveau setzen (Betriebsart Normal/Sparen/Frost) NormalSparenFrost
08DSource: ModemSourceSourceSource
110TargetTargetTargetTarget
2FFEMS-TypeEMS MarkerEMS MarkerEMS Marker
307/06/05EMS-Offset 7 (hex) 6 (hex) 5 (hex)
400
EMS Type(H)EMS Type(H)EMS Type(H)
579...82Heizkreis x KennungEMS Type(L)EMS Type(L)EMS Type(L)


79=Heizkreis1




7A=Heizkreis2




7B=Heizkreis3




7C=Heizkreis4




7D=Heizkreis5




7E=Heizkreis6




7F=Heizkreis7




80=Heizkreis8




81=Heizkreis9




82=Heizkreis10


60...4Temperaturniveau für Betriebsart: y im Heizkreis x377_7_0 bis377_6_0 bis377_5_0 bis


- (in 0.5 Grad Schritten)386_7_0386_6_0386_5_0
7<CRC>CRC


8<Ende>Ende Marker


+ + + + diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index d3468c2e1..b1e27b031 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -419,6 +419,8 @@ void showInfo() { myDebug_P(PSTR(" System logging set to Thermostat only")); } else if (sysLog == EMS_SYS_LOGGING_SOLARMODULE) { myDebug_P(PSTR(" System logging set to Solar Module only")); + } else if (sysLog == EMS_SYS_LOGGING_JABBER) { + myDebug_P(PSTR(" System logging set to Jabber")); } else { myDebug_P(PSTR(" System logging set to None")); } diff --git a/src/ems.cpp b/src/ems.cpp index dbe01ac2d..56128df59 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -441,7 +441,7 @@ _EMS_SYS_LOGGING ems_getLogging() { } void ems_setLogging(_EMS_SYS_LOGGING loglevel) { - if (loglevel <= EMS_SYS_LOGGING_VERBOSE) { + if (loglevel <= EMS_SYS_LOGGING_JABBER) { EMS_Sys_Status.emsLogging = loglevel; if (loglevel == EMS_SYS_LOGGING_NONE) { myDebug_P(PSTR("System Logging set to None")); @@ -642,7 +642,7 @@ void _ems_sendTelegram() { // dest if (EMS_TxTelegram.action == EMS_TX_TELEGRAM_WRITE) { - EMS_TxTelegram.data[1] = EMS_TxTelegram.dest; + EMS_TxTelegram.data[1] = EMS_TxTelegram.dest ^ EMS_Sys_Status.emsIDMask; } else { // for a READ or VALIDATE EMS_TxTelegram.data[1] = (EMS_TxTelegram.dest ^ 0x80 ^ EMS_Sys_Status.emsIDMask); // read has 8th bit set @@ -756,6 +756,7 @@ void ems_dumpBuffer(const char *prefix, uint8_t *telegram, uint8_t length) { if (EMS_Sys_Status.emsLogging != EMS_SYS_LOGGING_JABBER) return; +/* // we only care about known devices if (length) { uint8_t dev = telegram[0] & 0x7F; @@ -763,6 +764,7 @@ void ems_dumpBuffer(const char *prefix, uint8_t *telegram, uint8_t length) { ||(dev == 0x01)||(dev == 0x0b)||(dev == 0x10))) return; } +*/ strlcpy(output_str, "(", sizeof(output_str)); strlcat(output_str, COLOR_CYAN, sizeof(output_str)); @@ -796,6 +798,7 @@ void ems_dumpBuffer(const char *prefix, uint8_t *telegram, uint8_t length) { myDebug(output_str); } + /** * Entry point triggered by an interrupt in emsuart.cpp * length is the number of all the telegram bytes up to and including the CRC at the end @@ -805,7 +808,7 @@ void ems_dumpBuffer(const char *prefix, uint8_t *telegram, uint8_t length) { void ems_parseTelegram(uint8_t * telegram, uint8_t length) { static uint32_t _last_emsPollFrequency = 0; - ems_dumpBuffer("** [DEBUG MODE] ems_parseTelegram: ", telegram, length); + ems_dumpBuffer("ems_parseTelegram: ", telegram, length); /* * check if we just received a single byte * it could well be a Poll request from the boiler for us, which will have a value of 0x8B (0x0B | 0x80) @@ -927,7 +930,7 @@ void ems_parseTelegram(uint8_t * telegram, uint8_t length) { // if we are in raw logging mode then just print out the telegram as it is // but still continue to process it - if (EMS_Sys_Status.emsLogging == EMS_SYS_LOGGING_RAW) { + if ((EMS_Sys_Status.emsLogging == EMS_SYS_LOGGING_RAW)) { _debugPrintTelegram("", &EMS_RxTelegram, COLOR_WHITE, true); } @@ -1915,9 +1918,11 @@ void _process_Version(_EMS_RxTelegram * EMS_RxTelegram) { * Do a read command for the version with the src having the MSB set */ void _ems_detectJunkers() { +#ifdef JUNKERS_DETECT char s[30] = {0}; snprintf(s, sizeof(s), "%02X %02X %02X 00 %02X", (EMS_ID_ME | 0x80), (EMS_ID_BOILER | 0x080), EMS_TYPE_Version, EMS_MAX_TELEGRAM_LENGTH); ems_sendRawTelegram(s); +#endif } /* From 573ebcffeb910c2931870391ff1eb8d19515c4aa Mon Sep 17 00:00:00 2001 From: Susis Strolch Date: Mon, 29 Jul 2019 21:35:22 +0200 Subject: [PATCH 4/5] txstatus: remove all references and settings --- src/ems-esp.cpp | 11 -------- src/ems.cpp | 19 -------------- src/emsuart.cpp | 68 +------------------------------------------------ 3 files changed, 1 insertion(+), 97 deletions(-) diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index b1e27b031..0e0ae8c3c 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -1147,8 +1147,6 @@ bool FSCallback(MYESP_FSACTION action, const JsonObject json) { EMSESP_Status.shower_alert = json["shower_alert"]; EMSESP_Status.publish_time = json["publish_time"] | DEFAULT_PUBLISHTIME; - ems_setTxMode(json["tx_mode"]); - EMSESP_Status.listen_mode = json["listen_mode"]; ems_setTxDisabled(EMSESP_Status.listen_mode); @@ -1170,8 +1168,6 @@ bool FSCallback(MYESP_FSACTION action, const JsonObject json) { json["shower_alert"] = EMSESP_Status.shower_alert; json["publish_time"] = EMSESP_Status.publish_time; json["heating_circuit"] = EMSESP_Status.heating_circuit; - json["tx_mode"] = ems_getTxMode(); - return true; } @@ -1300,12 +1296,6 @@ bool SettingsCallback(MYESP_FSACTION action, uint8_t wc, const char * setting, c myDebug_P(PSTR("Error. Usage: set heating_circuit <1 | 2>")); } } - - // tx delay/ tx mode - if (((strcmp(setting, "tx_mode") == 0) || (strcmp(setting, "tx_delay") == 0)) && (wc == 2)) { - ems_setTxMode(atoi(value)); - ok = true; - } } if (action == MYESP_FSACTION_LIST) { @@ -1332,7 +1322,6 @@ bool SettingsCallback(MYESP_FSACTION action, uint8_t wc, const char * setting, c myDebug_P(PSTR(" shower_timer=%s"), EMSESP_Status.shower_timer ? "on" : "off"); myDebug_P(PSTR(" shower_alert=%s"), EMSESP_Status.shower_alert ? "on" : "off"); myDebug_P(PSTR(" publish_time=%d"), EMSESP_Status.publish_time); - myDebug_P(PSTR(" tx_mode=%d"), ems_getTxMode()); } return ok; diff --git a/src/ems.cpp b/src/ems.cpp index 56128df59..3b1422e4b 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -235,7 +235,6 @@ void ems_init() { EMS_Sys_Status.emsTxDisabled = false; EMS_Sys_Status.emsPollFrequency = 0; EMS_Sys_Status.txRetryCount = 0; - EMS_Sys_Status.emsTxMode = 0; EMS_Sys_Status.emsIDMask = 0x00; EMS_Sys_Status.emsPollAck[0] = EMS_ID_ME; @@ -356,24 +355,6 @@ bool ems_getPoll() { return EMS_Sys_Status.emsPollEnabled; } -void ems_setTxMode(uint8_t mode) { - EMS_Sys_Status.emsTxMode = mode; - - // special case for Junkers. If tx_mode is 3 then set the reverse poll flag - // https://github.com/proddy/EMS-ESP/issues/103#issuecomment-495945850 - if (mode == 3) { - EMS_Sys_Status.emsIDMask = 0x80; - myDebug_P(PSTR("Forcing emsReverse for Junkers")); - } else { - EMS_Sys_Status.emsIDMask = 0x00; - } - EMS_Sys_Status.emsPollAck[0] = EMS_ID_ME ^ EMS_Sys_Status.emsIDMask; -} - -uint8_t ems_getTxMode() { - return EMS_Sys_Status.emsTxMode; -} - bool ems_getEmsRefreshed() { return EMS_Sys_Status.emsRefreshed; } diff --git a/src/emsuart.cpp b/src/emsuart.cpp index a0bb11411..834718524 100644 --- a/src/emsuart.cpp +++ b/src/emsuart.cpp @@ -171,36 +171,6 @@ void ICACHE_FLASH_ATTR emsuart_start() { ETS_UART_INTR_ENABLE(); } -/* - * Send a BRK signal - * Which is a 11-bit set of zero's (11 cycles) - */ -void ICACHE_FLASH_ATTR emsuart_tx_brk() { - uint32_t tmp; - - // must make sure Tx FIFO is empty - while (((USS(EMSUART_UART) >> USTXC) & 0xFF) != 0) - ; - - tmp = ((1 << UCRXRST) | (1 << UCTXRST)); // bit mask - USC0(EMSUART_UART) |= (tmp); // set bits - USC0(EMSUART_UART) &= ~(tmp); // clear bits - - // To create a 11-bit we set TXD_BRK bit so the break signal will - // automatically be sent when the tx fifo is empty - tmp = (1 << UCBRK); - GPIO_H(TX_MARK_MASK); - USC0(EMSUART_UART) |= (tmp); // set bit - - if (EMS_Sys_Status.emsTxMode <= 1) { // classic mode and ems+ (0, 1) - delayMicroseconds(EMSUART_TX_BRK_WAIT); - } else if (EMS_Sys_Status.emsTxMode == 3) { // junkers mode - delayMicroseconds(EMSUART_TX_WAIT_BRK - EMSUART_TX_LAG); // 1144 (11 Bits) - } - - USC0(EMSUART_UART) &= ~(tmp); // clear bit - GPIO_L(TX_MARK_MASK); -} /* * Send to Tx, ending with a @@ -210,35 +180,7 @@ _EMS_TX_STATUS ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len) { ems_dumpBuffer("emsuart_tx_buffer: ", buf, len); // validate and transmit the EMS buffer, excluding the BRK if (len) { LA_PULSE(50); - // temp code until we get mode 2 working without resets - if (EMS_Sys_Status.emsTxMode == 0) { // classic mode logic - for (uint8_t i = 0; i < len; i++) { - TX_PULSE(EMSUART_BIT_TIME / 4); - USF(EMSUART_UART) = buf[i]; - } - emsuart_tx_brk(); // send - } else if (EMS_Sys_Status.emsTxMode == 1) { // With extra tx delay for EMS+ - for (uint8_t i = 0; i < len; i++) { - TX_PULSE(EMSUART_BIT_TIME / 4); - USF(EMSUART_UART) = buf[i]; - delayMicroseconds(EMSUART_TX_BRK_WAIT); // https://github.com/proddy/EMS-ESP/issues/23# - } - emsuart_tx_brk(); // send - } else if (EMS_Sys_Status.emsTxMode == 3) { // Junkers logic by @philrich - for (uint8_t i = 0; i < len; i++) { - TX_PULSE(EMSUART_BIT_TIME / 4); - USF(EMSUART_UART) = buf[i]; - - // just to be safe wait for tx fifo empty (needed?) - while (((USS(EMSUART_UART) >> USTXC) & 0xff) != 0) - ; - - // wait until bits are sent on wire - delayMicroseconds(EMSUART_TX_WAIT_BYTE - EMSUART_TX_LAG + EMSUART_TX_WAIT_GAP); - } - emsuart_tx_brk(); // send - } else if (EMS_Sys_Status.emsTxMode == 2) { - /* + /* * * based on code from https://github.com/proddy/EMS-ESP/issues/103 by @susisstrolch * we emit the whole telegram, with Rx interrupt disabled, collecting busmaster response in FIFO. @@ -321,14 +263,6 @@ _EMS_TX_STATUS ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len) { } ETS_UART_INTR_ENABLE(); // receive anything from FIFO... } - } return result; } -/* - * Send the Poll (our own ID) to Tx as a single byte and end with a - * *** moved to ems.cpp, renamed to ems_tx_pollAck -void ICACHE_FLASH_ATTR emsuart_tx_poll() { - static uint8_t buf[1] = {EMS_ID_ME ^ EMS_Sys_Status.emsIDMask}; -} - */ \ No newline at end of file From 53f3f44ae2dd97ff1ec87d9679802830d5357139 Mon Sep 17 00:00:00 2001 From: Susis Strolch Date: Wed, 31 Jul 2019 11:17:36 +0200 Subject: [PATCH 5/5] hunting the Software Watchdog restart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ° unconditionaly show the last reset reason on telnet connect ° trying to enable stack trace also for Software watchdog events ° add wtdfeed() to MyESP loop --- lib/MyESP/MyESP.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/MyESP/MyESP.cpp b/lib/MyESP/MyESP.cpp index 6d0077954..6d64cf284 100644 --- a/lib/MyESP/MyESP.cpp +++ b/lib/MyESP/MyESP.cpp @@ -188,6 +188,8 @@ void MyESP::_wifiCallback(justwifi_messages_t code, char * parameter) { // start OTA ArduinoOTA.begin(); // moved to support esp32 myDebug_P(PSTR("[OTA] listening to %s.local:%u"), ArduinoOTA.getHostname().c_str(), OTA_PORT); + // unconditionaly show the last reset reason + myDebug_P(PSTR("[SYSTEM] Last reset info: %s"), (char *)ESP.getResetInfo().c_str()); // MQTT Setup _mqtt_setup(); @@ -1005,9 +1007,10 @@ bool MyESP::_rtcmemStatus() { } switch (reason) { - //case REASON_EXT_SYS_RST: // external system reset - case REASON_WDT_RST: // hardware watch dog reset - case REASON_DEFAULT_RST: // normal startup by power on + //case REASON_EXT_SYS_RST: // external system reset + case REASON_WDT_RST: // hardware watch dog reset + case REASON_DEFAULT_RST: // normal startup by power on + case REASON_SOFT_WDT_RST: // Software watchdog readable = false; break; default: @@ -2159,12 +2162,14 @@ void MyESP::loop() { return; // quit if in the middle of an OTA update } + ESP.wdtFeed(); // feed the watchdog... _calculateLoad(); _systemCheckLoop(); _heartbeatCheck(); _bootupSequence(); webServer.handleClient(); _telnetHandle(); + ESP.wdtFeed(); // feed the watchdog... _mqttConnect(); yield(); // ...and breath