This commit is contained in:
proddy
2019-02-23 14:58:09 +01:00
parent 06c2b20549
commit e3807afc23
11 changed files with 208 additions and 141 deletions

View File

@@ -78,7 +78,7 @@ typedef struct {
command_t PROGMEM project_cmds[] = {
{"set led <on | off>", "toggle status LED on/off"},
{"set led_gpio <pin>", "set the LED pin. Default is the onboard LED."},
{"set led_gpio <pin>", "set the LED pin. Default is the onboard LED (D1=5)"},
{"set dallas_gpio <pin>", "set the pin for the external Dallas temperature sensor (D5=14)"},
{"set thermostat_type <hex type ID>", "set the thermostat type id (e.g. 10 for 0x10)"},
{"set boiler_type <hex type ID>", "set the boiler type id (e.g. 8 for 0x08)"},
@@ -364,7 +364,7 @@ void showInfo() {
myDebug(" Thermostat type: %s", ems_getThermostatDescription(buffer_type));
_renderFloatValue("Setpoint room temperature", "C", EMS_Thermostat.setpoint_roomTemp);
_renderFloatValue("Current room temperature", "C", EMS_Thermostat.curr_roomTemp);
if (ems_getThermostatModel() != EMS_MODEL_EASY) {
if ((ems_getThermostatModel() != EMS_MODEL_EASY) && (ems_getThermostatModel() != EMS_MODEL_BOSCHEASY)) {
myDebug(" Thermostat time is %02d:%02d:%02d %d/%d/%d",
EMS_Thermostat.hour,
EMS_Thermostat.minute,
@@ -657,6 +657,9 @@ bool SettingsCallback(MYESP_FSACTION action, uint8_t wc, const char * setting, c
// led_gpio
if ((strcmp(setting, "led_gpio") == 0) && (wc == 2)) {
EMSESP_Status.led_gpio = atoi(value);
// reset pin
pinMode(EMSESP_Status.led_gpio, OUTPUT);
digitalWrite(EMSESP_Status.led_gpio, (EMSESP_Status.led_gpio == LED_BUILTIN) ? HIGH : LOW); // light off. For onboard high=off
ok = true;
}
@@ -1115,7 +1118,8 @@ void setup() {
#endif
// MQTT host, username and password taken from the SPIFFS settings
myESP.setMQTT(NULL, NULL, NULL, MQTT_BASE, MQTT_KEEPALIVE, MQTT_QOS, MQTT_RETAIN, MQTT_WILL_TOPIC, MQTT_WILL_PAYLOAD, MQTTCallback);
myESP.setMQTT(NULL, NULL, NULL, MQTT_BASE, MQTT_KEEPALIVE, MQTT_QOS, MQTT_RETAIN, MQTT_WILL_TOPIC,
MQTT_WILL_ONLINE_PAYLOAD, MQTT_WILL_OFFLINE_PAYLOAD, MQTTCallback);
// custom settings in SPIFFS
myESP.setSettings(FSCallback, SettingsCallback);

View File

@@ -113,6 +113,8 @@ const _EMS_Type EMS_Types[] = {
// Easy
{EMS_MODEL_EASY, EMS_TYPE_EasyStatusMessage, "EasyStatusMessage", _process_EasyStatusMessage},
{EMS_MODEL_BOSCHEASY, EMS_TYPE_EasyStatusMessage, "EasyStatusMessage", _process_EasyStatusMessage},
};
@@ -1257,7 +1259,7 @@ void _process_SetPoints(uint8_t type, uint8_t * data, uint8_t length) {
* common for all thermostats
*/
void _process_RCTime(uint8_t type, uint8_t * data, uint8_t length) {
if (EMS_Thermostat.model_id == EMS_MODEL_EASY) {
if ((EMS_Thermostat.model_id == EMS_MODEL_EASY) || (EMS_Thermostat.model_id == EMS_MODEL_BOSCHEASY)) {
return; // not supported
}
@@ -1347,7 +1349,7 @@ void ems_getThermostatValues() {
} else if ((model_id == EMS_MODEL_RC35) || (model_id == EMS_MODEL_ES73)) {
ems_doReadCommand(EMS_TYPE_RC35StatusMessage, type); // to get the setpoint temp
ems_doReadCommand(EMS_TYPE_RC35Set, type); // to get the mode
} else if (model_id == EMS_MODEL_EASY) {
} else if ((model_id == EMS_MODEL_EASY) || (model_id == EMS_MODEL_BOSCHEASY)) {
ems_doReadCommand(EMS_TYPE_EasyStatusMessage, type);
}
@@ -1723,7 +1725,7 @@ void ems_setWarmWaterTemp(uint8_t temperature) {
}
/**
* Set the warm water mode to comfort ot Eco
* Set the warm water mode to comfort to Eco/Comfort
*/
void ems_setWarmWaterModeComfort(bool comfort) {
myDebug("Setting boiler warm water to comfort mode %s\n", comfort ? "Comfort" : "Eco");

View File

@@ -34,19 +34,6 @@
#define EMS_THERMOSTAT_WRITE_YES true
#define EMS_THERMOSTAT_WRITE_NO false
// ANSI Colors
#define COLOR_RESET "\x1B[0m"
#define COLOR_BLACK "\x1B[0;30m"
#define COLOR_RED "\x1B[0;31m"
#define COLOR_GREEN "\x1B[0;32m"
#define COLOR_YELLOW "\x1B[0;33m"
#define COLOR_BLUE "\x1B[0;34m"
#define COLOR_MAGENTA "\x1B[0;35m"
#define COLOR_CYAN "\x1B[0;36m"
#define COLOR_WHITE "\x1B[0;37m"
#define COLOR_BOLD_ON "\x1B[1m"
#define COLOR_BOLD_OFF "\x1B[21m"
// trigger settings to determine if hot tap water or the heating is active
#define EMS_BOILER_BURNPOWER_TAPWATER 100
#define EMS_BOILER_SELFLOWTEMP_HEATING 70

View File

@@ -100,6 +100,7 @@ typedef enum {
EMS_MODEL_RC30,
EMS_MODEL_RC35,
EMS_MODEL_EASY,
EMS_MODEL_BOSCHEASY,
EMS_MODEL_RC310,
EMS_MODEL_CW100
@@ -112,6 +113,7 @@ const _Boiler_Type Boiler_Types[] = {
{EMS_MODEL_UBA, 72, 0x08, "MC10"},
{EMS_MODEL_UBA, 123, 0x08, "Buderus GB172/Nefit Trendline"},
{EMS_MODEL_UBA, 115, 0x08, "Nefit Topline Compact"},
{EMS_MODEL_UBA, 203, 0x08, "Buderus Logamax U122"},
{EMS_MODEL_UBA, 64, 0x08, "Sieger BK15 Boiler/Nefit Smartline"},
{EMS_MODEL_UBA, 190, 0x09, "BC10 Base Controller"},
{EMS_MODEL_UBA, 114, 0x09, "BC10 Base Controller"},
@@ -135,6 +137,7 @@ const _Thermostat_Type Thermostat_Types[] = {
{EMS_MODEL_RC30, 78, 0x10, "RC30/Nefit Moduline 400)", EMS_THERMOSTAT_READ_YES, EMS_THERMOSTAT_WRITE_YES},
{EMS_MODEL_RC35, 86, 0x10, "RC35", EMS_THERMOSTAT_READ_YES, EMS_THERMOSTAT_WRITE_YES},
{EMS_MODEL_EASY, 202, 0x18, "TC100/Nefit Easy", EMS_THERMOSTAT_READ_YES, EMS_THERMOSTAT_WRITE_NO},
{EMS_MODEL_BOSCHEASY, 206, 0x02, "Bosch Easy", EMS_THERMOSTAT_READ_YES, EMS_THERMOSTAT_WRITE_NO},
{EMS_MODEL_RC310, 158, 0x10, "RC310", EMS_THERMOSTAT_READ_NO, EMS_THERMOSTAT_WRITE_NO},
{EMS_MODEL_CW100, 255, 0x18, "Bosch CW100", EMS_THERMOSTAT_READ_NO, EMS_THERMOSTAT_WRITE_NO}

View File

@@ -16,8 +16,9 @@
// MQTT general settings
#define MQTT_TOPIC_START "start"
#define MQTT_TOPIC_START_PAYLOAD "start"
#define MQTT_WILL_TOPIC "status" // for last will & testament topic name
#define MQTT_WILL_PAYLOAD "0" // for last will & testament payload
#define MQTT_WILL_TOPIC "status" // for last will & testament topic name
#define MQTT_WILL_ONLINE_PAYLOAD "online" // for last will & testament payload
#define MQTT_WILL_OFFLINE_PAYLOAD "offline" // for last will & testament payload
#define MQTT_RETAIN false
#define MQTT_KEEPALIVE 300
#define MQTT_QOS 1
@@ -53,8 +54,9 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
// Set LED pin used for showing ems bus connection status. Solid is connected, Flashing is error
// can be either the onboard LED on the ESP8266 (LED_BULLETIN) or external via an external pull-up LED (e.g. D1 on bbqkees' board)
// can be enabled and disabled via the 'set led' command
// can be either the onboard LED on the ESP8266 (LED_BULLETIN) or external via an external pull-up LED
// (e.g. D1/5 on a bbqkees' board
// can be enabled and disabled via the 'set led'
// pin can be set by 'set led_gpio'
#define EMSESP_LED_GPIO LED_BUILTIN

View File

@@ -6,5 +6,5 @@
#pragma once
#define APP_NAME "EMS-ESP"
#define APP_VERSION "1.5.2"
#define APP_VERSION "1.5.3"
#define APP_HOSTNAME "ems-esp"