mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
merged Junkers FW100 & ISM1
This commit is contained in:
@@ -110,7 +110,7 @@ command_t project_cmds[] = {
|
|||||||
|
|
||||||
{false, "info", "show data captured on the EMS bus"},
|
{false, "info", "show data captured on the EMS bus"},
|
||||||
{false, "log <n | b | t | r | v>", "set logging mode to none, basic, thermostat only, raw or verbose"},
|
{false, "log <n | b | t | r | v>", "set logging mode to none, basic, thermostat only, raw or verbose"},
|
||||||
|
|
||||||
#ifdef TESTS
|
#ifdef TESTS
|
||||||
{false, "test <n>", "insert a test telegram on to the EMS bus"},
|
{false, "test <n>", "insert a test telegram on to the EMS bus"},
|
||||||
#endif
|
#endif
|
||||||
@@ -348,7 +348,8 @@ void showInfo() {
|
|||||||
if (ems_getTxCapable()) {
|
if (ems_getTxCapable()) {
|
||||||
char valuestr[8] = {0}; // for formatting floats
|
char valuestr[8] = {0}; // for formatting floats
|
||||||
myDebug_P(PSTR(" Tx: Last poll=%s seconds ago, Tx mode=%d, # successful write requests=%d"),
|
myDebug_P(PSTR(" Tx: Last poll=%s seconds ago, Tx mode=%d, # successful write requests=%d"),
|
||||||
_float_to_char(valuestr, (ems_getPollFrequency() / (float)1000000), 3), ems_getTxMode(),
|
_float_to_char(valuestr, (ems_getPollFrequency() / (float)1000000), 3),
|
||||||
|
ems_getTxMode(),
|
||||||
EMS_Sys_Status.emsTxPkgs);
|
EMS_Sys_Status.emsTxPkgs);
|
||||||
} else {
|
} else {
|
||||||
myDebug_P(PSTR(" Tx: no signal"));
|
myDebug_P(PSTR(" Tx: no signal"));
|
||||||
@@ -476,19 +477,16 @@ void showInfo() {
|
|||||||
myDebug_P(PSTR("")); // newline
|
myDebug_P(PSTR("")); // newline
|
||||||
myDebug_P(PSTR("%sThermostat stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
|
myDebug_P(PSTR("%sThermostat stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
|
||||||
myDebug_P(PSTR(" Thermostat: %s"), ems_getThermostatDescription(buffer_type));
|
myDebug_P(PSTR(" Thermostat: %s"), ems_getThermostatDescription(buffer_type));
|
||||||
|
|
||||||
// Render Current & Setpoint Room Temperature
|
// Render Current & Setpoint Room Temperature
|
||||||
if ( (ems_getThermostatModel() == EMS_MODEL_EASY)
|
if ((ems_getThermostatModel() == EMS_MODEL_EASY) || (ems_getThermostatModel() == EMS_MODEL_BOSCHEASY) || (ems_getThermostatModel() == EMS_MODEL_FR10)
|
||||||
|| (ems_getThermostatModel() == EMS_MODEL_BOSCHEASY)
|
|| (ems_getThermostatModel() == EMS_MODEL_FW100)) {
|
||||||
|| (ems_getThermostatModel() == EMS_MODEL_FR10)
|
|
||||||
|| (ems_getThermostatModel() == EMS_MODEL_FW100)) {
|
|
||||||
// Temperatures are *10
|
// Temperatures are *10
|
||||||
_renderShortValue("Set room temperature", "C", EMS_Thermostat.setpoint_roomTemp, 10); // *100
|
_renderShortValue("Set room temperature", "C", EMS_Thermostat.setpoint_roomTemp, 10); // *100
|
||||||
_renderShortValue("Current room temperature", "C", EMS_Thermostat.curr_roomTemp, 10); // *100
|
_renderShortValue("Current room temperature", "C", EMS_Thermostat.curr_roomTemp, 10); // *100
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// because we store in 2 bytes short, when converting to a single byte we'll loose the negative value if its unset
|
// because we store in 2 bytes short, when converting to a single byte we'll loose the negative value if its unset
|
||||||
if (EMS_Thermostat.setpoint_roomTemp <= 0) {
|
if (EMS_Thermostat.setpoint_roomTemp <= 0) {
|
||||||
EMS_Thermostat.setpoint_roomTemp = EMS_VALUE_INT_NOTSET;
|
EMS_Thermostat.setpoint_roomTemp = EMS_VALUE_INT_NOTSET;
|
||||||
}
|
}
|
||||||
if (EMS_Thermostat.curr_roomTemp <= 0) {
|
if (EMS_Thermostat.curr_roomTemp <= 0) {
|
||||||
@@ -507,13 +505,13 @@ void showInfo() {
|
|||||||
|
|
||||||
// Render Thermostat Date & Time
|
// Render Thermostat Date & Time
|
||||||
myDebug_P(PSTR(" Thermostat time is %02d:%02d:%02d %d/%d/%d"),
|
myDebug_P(PSTR(" Thermostat time is %02d:%02d:%02d %d/%d/%d"),
|
||||||
EMS_Thermostat.hour,
|
EMS_Thermostat.hour,
|
||||||
EMS_Thermostat.minute,
|
EMS_Thermostat.minute,
|
||||||
EMS_Thermostat.second,
|
EMS_Thermostat.second,
|
||||||
EMS_Thermostat.day,
|
EMS_Thermostat.day,
|
||||||
EMS_Thermostat.month,
|
EMS_Thermostat.month,
|
||||||
EMS_Thermostat.year + 2000);
|
EMS_Thermostat.year + 2000);
|
||||||
|
|
||||||
// Render Termostat Mode
|
// Render Termostat Mode
|
||||||
if (EMS_Thermostat.mode == 0) {
|
if (EMS_Thermostat.mode == 0) {
|
||||||
myDebug_P(PSTR(" Mode is set to low"));
|
myDebug_P(PSTR(" Mode is set to low"));
|
||||||
@@ -583,7 +581,6 @@ void publishSensorValues() {
|
|||||||
// CRC check is done to see if there are changes in the values since the last send to avoid too much wifi traffic
|
// CRC check is done to see if there are changes in the values since the last send to avoid too much wifi traffic
|
||||||
// a check is done against the previous values and if there are changes only then they are published. Unless force=true
|
// a check is done against the previous values and if there are changes only then they are published. Unless force=true
|
||||||
void publishValues(bool force) {
|
void publishValues(bool force) {
|
||||||
|
|
||||||
// don't send if MQTT is connected
|
// don't send if MQTT is connected
|
||||||
if (!myESP.isMQTTConnected()) {
|
if (!myESP.isMQTTConnected()) {
|
||||||
return;
|
return;
|
||||||
@@ -698,7 +695,8 @@ void publishValues(bool force) {
|
|||||||
rootThermostat[THERMOSTAT_HC] = _int_to_char(s, EMSESP_Status.heating_circuit);
|
rootThermostat[THERMOSTAT_HC] = _int_to_char(s, EMSESP_Status.heating_circuit);
|
||||||
|
|
||||||
// different logic depending on thermostat types
|
// different logic depending on thermostat types
|
||||||
if ((ems_getThermostatModel() == EMS_MODEL_EASY) || (ems_getThermostatModel() == EMS_MODEL_BOSCHEASY) || (ems_getThermostatModel() == EMS_MODEL_FR10) || (ems_getThermostatModel() == EMS_MODEL_FW100)) {
|
if ((ems_getThermostatModel() == EMS_MODEL_EASY) || (ems_getThermostatModel() == EMS_MODEL_BOSCHEASY) || (ems_getThermostatModel() == EMS_MODEL_FR10)
|
||||||
|
|| (ems_getThermostatModel() == EMS_MODEL_FW100)) {
|
||||||
if (abs(EMS_Thermostat.setpoint_roomTemp) < EMS_VALUE_SHORT_NOTSET)
|
if (abs(EMS_Thermostat.setpoint_roomTemp) < EMS_VALUE_SHORT_NOTSET)
|
||||||
rootThermostat[THERMOSTAT_SELTEMP] = (double)EMS_Thermostat.setpoint_roomTemp / 10;
|
rootThermostat[THERMOSTAT_SELTEMP] = (double)EMS_Thermostat.setpoint_roomTemp / 10;
|
||||||
if (abs(EMS_Thermostat.curr_roomTemp) < EMS_VALUE_SHORT_NOTSET)
|
if (abs(EMS_Thermostat.curr_roomTemp) < EMS_VALUE_SHORT_NOTSET)
|
||||||
|
|||||||
@@ -41,14 +41,14 @@
|
|||||||
#define EMS_OFFSET_UBASetPoints_flowtemp 0 // flow temp
|
#define EMS_OFFSET_UBASetPoints_flowtemp 0 // flow temp
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
#define EMS_TYPE_SM10Monitor 0x97 // SM10Monitor
|
#define EMS_TYPE_SM10Monitor 0x97 // SM10Monitor
|
||||||
#define EMS_TYPE_SM100Monitor 0x0262 // SM100Monitor
|
#define EMS_TYPE_SM100Monitor 0x0262 // SM100Monitor
|
||||||
#define EMS_TYPE_SM100Status 0x0264 // SM100Status
|
#define EMS_TYPE_SM100Status 0x0264 // SM100Status
|
||||||
#define EMS_TYPE_SM100Status2 0x026A // SM100Status2
|
#define EMS_TYPE_SM100Status2 0x026A // SM100Status2
|
||||||
#define EMS_TYPE_SM100Energy 0x028E // SM100Energy
|
#define EMS_TYPE_SM100Energy 0x028E // SM100Energy
|
||||||
#define EMS_TYPE_HPMonitor1 0xE3 // HeatPump Monitor 1
|
#define EMS_TYPE_HPMonitor1 0xE3 // HeatPump Monitor 1
|
||||||
#define EMS_TYPE_HPMonitor2 0xE5 // HeatPump Monitor 2
|
#define EMS_TYPE_HPMonitor2 0xE5 // HeatPump Monitor 2
|
||||||
#define EMS_TYPE_ISM1StatusMessage 0x0003 // Solar Module Junkers ISM1 Status
|
#define EMS_TYPE_ISM1StatusMessage 0x0003 // Solar Module Junkers ISM1 Status
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Thermostats...
|
* Thermostats...
|
||||||
@@ -183,7 +183,7 @@ const _Other_Type Other_Types[] = {
|
|||||||
{EMS_MODEL_OTHER, 163, EMS_ID_SM, "SM100 Solar Module"},
|
{EMS_MODEL_OTHER, 163, EMS_ID_SM, "SM100 Solar Module"},
|
||||||
{EMS_MODEL_OTHER, 171, 0x02, "EMS-OT OpenTherm converter"},
|
{EMS_MODEL_OTHER, 171, 0x02, "EMS-OT OpenTherm converter"},
|
||||||
{EMS_MODEL_OTHER, 252, EMS_ID_HP, "HeatPump Module"}, // warning, fake product id!
|
{EMS_MODEL_OTHER, 252, EMS_ID_HP, "HeatPump Module"}, // warning, fake product id!
|
||||||
{EMS_MODEL_OTHER, 101, 0x30, "Junkers ISM1 Solar Controller"},
|
{EMS_MODEL_OTHER, 101, 0x30, "Junkers ISM1 Solar Controller"},
|
||||||
{EMS_MODEL_OTHER, 189, EMS_ID_GATEWAY, "Web Gateway KM200"}
|
{EMS_MODEL_OTHER, 189, EMS_ID_GATEWAY, "Web Gateway KM200"}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -185,10 +185,10 @@ void ICACHE_FLASH_ATTR emsuart_tx_brk() {
|
|||||||
|
|
||||||
if (EMS_Sys_Status.emsTxMode <= 2) { // classic mode
|
if (EMS_Sys_Status.emsTxMode <= 2) { // classic mode
|
||||||
delayMicroseconds(EMSUART_TX_BRK_WAIT);
|
delayMicroseconds(EMSUART_TX_BRK_WAIT);
|
||||||
} else if (EMS_Sys_Status.emsTxMode == 3) { // junkers mode
|
} else if (EMS_Sys_Status.emsTxMode == 3) { // junkers mode
|
||||||
delayMicroseconds(EMSUART_TX_WAIT_BRK - EMSUART_TX_LAG); // 1144 (11 Bits)
|
delayMicroseconds(EMSUART_TX_WAIT_BRK - EMSUART_TX_LAG); // 1144 (11 Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
USC0(EMSUART_UART) &= ~(tmp); // clear bit
|
USC0(EMSUART_UART) &= ~(tmp); // clear bit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define APP_NAME "EMS-ESP"
|
#define APP_NAME "EMS-ESP"
|
||||||
#define APP_VERSION "1.8.0b10"
|
#define APP_VERSION "1.8.0b11"
|
||||||
#define APP_HOSTNAME "ems-esp"
|
#define APP_HOSTNAME "ems-esp"
|
||||||
|
|||||||
Reference in New Issue
Block a user