This commit is contained in:
proddy
2019-04-07 12:01:58 +02:00
parent 72b82a2326
commit 5cf6d25f2f
7 changed files with 55 additions and 13 deletions

View File

@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.7.0 dev] 2019-03- ## [1.7.0 dev] 2019-04-07
### Added ### Added
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- EMS+ support (thanks @GlennArens, @gl3nni3) - EMS+ support (thanks @GlennArens, @gl3nni3)
- MQTT 'restart' topic to reboot ESP (thanks @balk77) - MQTT 'restart' topic to reboot ESP (thanks @balk77)
- Support for multiple thermostat heating circuits like the HC1/HC2 on a RC35, also via MQTT (thanks @lobocobra) - Support for multiple thermostat heating circuits like the HC1/HC2 on a RC35, also via MQTT (thanks @lobocobra)
- `boiler flowtemp` command to set the flow temperature [(issue 59)](https://github.com/proddy/EMS-ESP/issues/59)
## [1.6.0] 2019-03-24 ## [1.6.0] 2019-03-24

View File

@@ -32,7 +32,6 @@ void custom_crash_callback(struct rst_info *, uint32_t, uint32_t);
#define ets_vsnprintf vsnprintf // added for ESP32 #define ets_vsnprintf vsnprintf // added for ESP32
#define OTA_PORT 8266 #define OTA_PORT 8266
#else #else
//#include <ESP8266mDNS.h>
#include <ESPAsyncTCP.h> #include <ESPAsyncTCP.h>
#define OTA_PORT 3232 #define OTA_PORT 3232
#endif #endif

View File

@@ -118,6 +118,7 @@ command_t PROGMEM project_cmds[] = {
{false, "boiler read <type ID>", "send read request to boiler"}, {false, "boiler read <type ID>", "send read request to boiler"},
{false, "boiler wwtemp <degrees>", "set boiler warm water temperature"}, {false, "boiler wwtemp <degrees>", "set boiler warm water temperature"},
{false, "boiler tapwater <on | off>", "set boiler warm tap water on/off"}, {false, "boiler tapwater <on | off>", "set boiler warm tap water on/off"},
{false, "boiler flowtemp <degrees>", "set boiler flow temperature"},
{false, "boiler comfort <hot | eco | intelligent>", "set boiler warm water comfort setting"} {false, "boiler comfort <hot | eco | intelligent>", "set boiler warm water comfort setting"}
}; };
@@ -1202,6 +1203,9 @@ void TelnetCommandCallback(uint8_t wc, const char * commandLine) {
ems_setWarmTapWaterActivated(false); ems_setWarmTapWaterActivated(false);
ok = true; ok = true;
} }
} else if (strcmp(second_cmd, "flowtemp") == 0) {
ems_setFlowTemp(_readIntNumber());
ok = true;
} }
} }
@@ -1286,7 +1290,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
float f = strtof((char *)message, 0); float f = strtof((char *)message, 0);
char s[10] = {0}; char s[10] = {0};
myDebug("MQTT topic: new thermostat night temperature value %s", _float_to_char(s, f)); myDebug("MQTT topic: new thermostat night temperature value %s", _float_to_char(s, f));
ems_setThermostatTemp(f,1); ems_setThermostatTemp(f, 1);
} }
// set daytemp value // set daytemp value
@@ -1294,7 +1298,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
float f = strtof((char *)message, 0); float f = strtof((char *)message, 0);
char s[10] = {0}; char s[10] = {0};
myDebug("MQTT topic: new thermostat day temperature value %s", _float_to_char(s, f)); myDebug("MQTT topic: new thermostat day temperature value %s", _float_to_char(s, f));
ems_setThermostatTemp(f,2); ems_setThermostatTemp(f, 2);
} }
// set holiday value // set holiday value
@@ -1302,7 +1306,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
float f = strtof((char *)message, 0); float f = strtof((char *)message, 0);
char s[10] = {0}; char s[10] = {0};
myDebug("MQTT topic: new thermostat holiday temperature value %s", _float_to_char(s, f)); myDebug("MQTT topic: new thermostat holiday temperature value %s", _float_to_char(s, f));
ems_setThermostatTemp(f,3); ems_setThermostatTemp(f, 3);
} }
// wwActivated // wwActivated

View File

@@ -1265,16 +1265,23 @@ void _process_SM10Monitor(uint8_t src, uint8_t * data, uint8_t length) {
* UBASetPoint 0x1A * UBASetPoint 0x1A
*/ */
void _process_SetPoints(uint8_t src, uint8_t * data, uint8_t length) { void _process_SetPoints(uint8_t src, uint8_t * data, uint8_t length) {
/*
if (EMS_Sys_Status.emsLogging == EMS_SYS_LOGGING_VERBOSE) { if (EMS_Sys_Status.emsLogging == EMS_SYS_LOGGING_VERBOSE) {
if (length != 0) { if (length != 0) {
uint8_t setpoint = data[0]; uint8_t setpoint = data[0]; // flow temp is * 2
uint8_t hk_power = data[1]; uint8_t ww_power = data[2]; // power in %
uint8_t ww_power = data[2];
myDebug(" SetPoint=%d, hk_power=%d, ww_power=%d", setpoint, hk_power, ww_power); char s[5];
char s2[5];
strlcpy(s, itoa(setpoint >> 1, s2, 10), 5);
strlcat(s, ".", sizeof(s));
strlcat(s, ((setpoint & 0x01) ? "5" : "0"), 5);
myDebug(" Boiler flow temp %s C, Warm Water power %d %", s, ww_power);
} }
} }
*/
} }
/** /**
@@ -1972,6 +1979,34 @@ void ems_setWarmWaterTemp(uint8_t temperature) {
EMS_TxQueue.push(EMS_TxTelegram); EMS_TxQueue.push(EMS_TxTelegram);
} }
/**
* Set the boiler flow temp
*/
void ems_setFlowTemp(uint8_t temperature) {
myDebug("Setting boiler flow temperature to %d C", temperature);
_EMS_TxTelegram EMS_TxTelegram = EMS_TX_TELEGRAM_NEW; // create new Tx
EMS_TxTelegram.timestamp = millis(); // set timestamp
EMS_Sys_Status.txRetryCount = 0; // reset retry counter
EMS_TxTelegram.action = EMS_TX_TELEGRAM_WRITE;
EMS_TxTelegram.dest = EMS_Boiler.type_id;
EMS_TxTelegram.type = EMS_TYPE_UBASetPoints;
EMS_TxTelegram.offset = EMS_OFFSET_UBASetPoints_flowtemp;
EMS_TxTelegram.length = EMS_MIN_TELEGRAM_LENGTH;
EMS_TxTelegram.dataValue = temperature; // value to compare against. must be a single int
EMS_TxTelegram.type_validate = EMS_TYPE_UBASetPoints; // validate
EMS_TxTelegram.comparisonOffset = EMS_OFFSET_UBASetPoints_flowtemp;
EMS_TxTelegram.comparisonValue = temperature;
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_UBASetPoints;
EMS_TxTelegram.forceRefresh = false;
EMS_TxQueue.push(EMS_TxTelegram);
}
/** /**
* Set the warm water mode to comfort to Eco/Comfort * Set the warm water mode to comfort to Eco/Comfort
* 1 = Hot, 2 = Eco, 3 = Intelligent * 1 = Hot, 2 = Eco, 3 = Intelligent

View File

@@ -282,6 +282,7 @@ void ems_setThermostatTemp(float temperature, uint8_t temptype = 0);
void ems_setThermostatMode(uint8_t mode); void ems_setThermostatMode(uint8_t mode);
void ems_setThermostatHC(uint8_t hc); void ems_setThermostatHC(uint8_t hc);
void ems_setWarmWaterTemp(uint8_t temperature); void ems_setWarmWaterTemp(uint8_t temperature);
void ems_setFlowTemp(uint8_t temperature);
void ems_setWarmWaterActivated(bool activated); void ems_setWarmWaterActivated(bool activated);
void ems_setWarmTapWaterActivated(bool activated); void ems_setWarmTapWaterActivated(bool activated);
void ems_setPoll(bool b); void ems_setPoll(bool b);

View File

@@ -39,6 +39,8 @@
#define EMS_VALUE_UBAParameterWW_wwComfort_Eco 0xD8 // the value for eco #define EMS_VALUE_UBAParameterWW_wwComfort_Eco 0xD8 // the value for eco
#define EMS_VALUE_UBAParameterWW_wwComfort_Intelligent 0xEC // the value for intelligent #define EMS_VALUE_UBAParameterWW_wwComfort_Intelligent 0xEC // the value for intelligent
#define EMS_OFFSET_UBASetPoints_flowtemp 0 // flow temp
// Other // Other
#define EMS_TYPE_SM10Monitor 0x97 // SM10Monitor #define EMS_TYPE_SM10Monitor 0x97 // SM10Monitor

View File

@@ -6,5 +6,5 @@
#pragma once #pragma once
#define APP_NAME "EMS-ESP" #define APP_NAME "EMS-ESP"
#define APP_VERSION "1.7.0b3" #define APP_VERSION "1.7.0b4"
#define APP_HOSTNAME "ems-esp" #define APP_HOSTNAME "ems-esp"