This commit is contained in:
proddy
2021-02-23 14:10:55 +01:00
parent 0dc0671690
commit c1effa9681
6 changed files with 33 additions and 26 deletions

View File

@@ -143,8 +143,8 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_device_value(TAG_BOILER_DATA_WW, &wWCurTemp_, DeviceValueType::USHORT, FL_(div10), F("wWCurTemp"), F("Warm Water current temperature (intern)"), DeviceValueUOM::DEGREES); register_device_value(TAG_BOILER_DATA_WW, &wWCurTemp_, DeviceValueType::USHORT, FL_(div10), F("wWCurTemp"), F("Warm Water current temperature (intern)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_BOILER_DATA_WW, &wWCurTemp2_, DeviceValueType::USHORT, FL_(div10), F("wWCurTemp2"), F("Warm Water current temperature (extern)"), DeviceValueUOM::DEGREES); register_device_value(TAG_BOILER_DATA_WW, &wWCurTemp2_, DeviceValueType::USHORT, FL_(div10), F("wWCurTemp2"), F("Warm Water current temperature (extern)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_BOILER_DATA_WW, &wWCurFlow_, DeviceValueType::UINT, FL_(div10), F("wWCurFlow"), F("Warm Water current tap water flow"), DeviceValueUOM::LMIN); register_device_value(TAG_BOILER_DATA_WW, &wWCurFlow_, DeviceValueType::UINT, FL_(div10), F("wWCurFlow"), F("Warm Water current tap water flow"), DeviceValueUOM::LMIN);
register_device_value(TAG_BOILER_DATA_WW, &wwStorageTemp1_, DeviceValueType::USHORT, FL_(div10), F("wwStorageTemp1"), F("Warm water storage temperature (intern)"), DeviceValueUOM::DEGREES); register_device_value(TAG_BOILER_DATA_WW, &wWStorageTemp1_, DeviceValueType::USHORT, FL_(div10), F("wWStorageTemp1"), F("Warm water storage temperature (intern)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_BOILER_DATA_WW, &wwStorageTemp2_, DeviceValueType::USHORT, FL_(div10), F("wwStorageTemp2"), F("Warm water storage temperature (extern)"), DeviceValueUOM::DEGREES); register_device_value(TAG_BOILER_DATA_WW, &wWStorageTemp2_, DeviceValueType::USHORT, FL_(div10), F("wWStorageTemp2"), F("Warm water storage temperature (extern)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_BOILER_DATA_WW, &wWActivated_, DeviceValueType::BOOL, nullptr, F("wWActivated"), F("Warm Water activated"), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA_WW, &wWActivated_, DeviceValueType::BOOL, nullptr, F("wWActivated"), F("Warm Water activated"), DeviceValueUOM::NONE);
register_device_value(TAG_BOILER_DATA_WW, &wWOneTime_, DeviceValueType::BOOL, nullptr, F("wWOneTime"), F("Warm Water one time charging"), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA_WW, &wWOneTime_, DeviceValueType::BOOL, nullptr, F("wWOneTime"), F("Warm Water one time charging"), DeviceValueUOM::NONE);
register_device_value(TAG_BOILER_DATA_WW, &wWDisinfecting_, DeviceValueType::BOOL, nullptr, F("wWDisinfecting"), F("Warm Water disinfecting"), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA_WW, &wWDisinfecting_, DeviceValueType::BOOL, nullptr, F("wWDisinfecting"), F("Warm Water disinfecting"), DeviceValueUOM::NONE);
@@ -154,8 +154,8 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_device_value(TAG_BOILER_DATA_WW, &wWActive_, DeviceValueType::BOOL, nullptr, F("wWActive"), F("Warm Water active"), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA_WW, &wWActive_, DeviceValueType::BOOL, nullptr, F("wWActive"), F("Warm Water active"), DeviceValueUOM::NONE);
register_device_value(TAG_BOILER_DATA_WW, &wWHeat_, DeviceValueType::BOOL, nullptr, F("wWHeat"), F("Warm Water heating"), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA_WW, &wWHeat_, DeviceValueType::BOOL, nullptr, F("wWHeat"), F("Warm Water heating"), DeviceValueUOM::NONE);
register_device_value(TAG_BOILER_DATA_WW, &wWSetPumpPower_, DeviceValueType::UINT, nullptr, F("wWSetPumpPower"), F("Warm Water pump set power"), DeviceValueUOM::PERCENT); register_device_value(TAG_BOILER_DATA_WW, &wWSetPumpPower_, DeviceValueType::UINT, nullptr, F("wWSetPumpPower"), F("Warm Water pump set power"), DeviceValueUOM::PERCENT);
register_device_value(TAG_BOILER_DATA_WW, &wwMixTemperature_, DeviceValueType::USHORT, nullptr, F("wwMixTemperature"), F("Warm Water mix temperature"), DeviceValueUOM::DEGREES); register_device_value(TAG_BOILER_DATA_WW, &mixerTemp_, DeviceValueType::USHORT, FL_(div10), F("mixerTemp"), F("Mixer temperature"), DeviceValueUOM::DEGREES);
register_device_value(TAG_BOILER_DATA_WW, &wwBufferTemperature_, DeviceValueType::USHORT, nullptr, F("wwBufferTemperature"), F("Warm Water buffer boiler temperature"), DeviceValueUOM::DEGREES); register_device_value(TAG_BOILER_DATA_WW, &tankMiddleTemp_, DeviceValueType::USHORT, FL_(div10), F("tankMiddleTemp"), F("Tank middle temperature (TS3)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_BOILER_DATA_WW, &wWStarts_, DeviceValueType::ULONG, nullptr, F("wWStarts"), F("Warm Water # starts"), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA_WW, &wWStarts_, DeviceValueType::ULONG, nullptr, F("wWStarts"), F("Warm Water # starts"), DeviceValueUOM::NONE);
register_device_value(TAG_BOILER_DATA_WW, &wWStarts2_, DeviceValueType::ULONG, nullptr, F("wWStarts2"), F("Warm Water # starts (control)"), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA_WW, &wWStarts2_, DeviceValueType::ULONG, nullptr, F("wWStarts2"), F("Warm Water # starts (control)"), DeviceValueUOM::NONE);
register_device_value(TAG_BOILER_DATA_WW, &wWWorkM_, DeviceValueType::TIME, nullptr, F("wWWorkM"), F("Warm Water active time"), DeviceValueUOM::MINUTES); register_device_value(TAG_BOILER_DATA_WW, &wWWorkM_, DeviceValueType::TIME, nullptr, F("wWWorkM"), F("Warm Water active time"), DeviceValueUOM::MINUTES);
@@ -291,9 +291,9 @@ void Boiler::process_UBAMonitorFast(std::shared_ptr<const Telegram> telegram) {
has_update(telegram->read_bitvalue(wWCirc_, 7, 7)); has_update(telegram->read_bitvalue(wWCirc_, 7, 7));
// warm water storage sensors (if present) // warm water storage sensors (if present)
// wwStorageTemp2 is also used by some brands as the boiler temperature - see https://github.com/proddy/EMS-ESP/issues/206 // wWStorageTemp2 is also used by some brands as the boiler temperature - see https://github.com/proddy/EMS-ESP/issues/206
has_update(telegram->read_value(wwStorageTemp1_, 9)); // 0x8300 if not available has_update(telegram->read_value(wWStorageTemp1_, 9)); // 0x8300 if not available
has_update(telegram->read_value(wwStorageTemp2_, has_update(telegram->read_value(wWStorageTemp2_,
11)); // 0x8000 if not available - this is boiler temp 11)); // 0x8000 if not available - this is boiler temp
has_update(telegram->read_value(retTemp_, 13)); has_update(telegram->read_value(retTemp_, 13));
@@ -550,8 +550,8 @@ void Boiler::process_UBAEnergySupplied(std::shared_ptr<const Telegram> telegram)
// e.g. 88 00 2A 00 00 00 00 00 00 00 00 00 D2 00 00 80 00 00 01 08 80 00 02 47 00 // e.g. 88 00 2A 00 00 00 00 00 00 00 00 00 D2 00 00 80 00 00 01 08 80 00 02 47 00
// see https://github.com/proddy/EMS-ESP/issues/397 // see https://github.com/proddy/EMS-ESP/issues/397
void Boiler::process_MC10Status(std::shared_ptr<const Telegram> telegram) { void Boiler::process_MC10Status(std::shared_ptr<const Telegram> telegram) {
has_update(telegram->read_value(wwMixTemperature_, 14)); has_update(telegram->read_value(mixerTemp_, 14));
has_update(telegram->read_value(wwBufferTemperature_, 18)); has_update(telegram->read_value(tankMiddleTemp_, 18));
} }
/* /*

View File

@@ -61,23 +61,24 @@ class Boiler : public EMSdevice {
uint16_t wWCurTemp_; // Warm Water current temperature uint16_t wWCurTemp_; // Warm Water current temperature
uint16_t wWCurTemp2_; // Warm Water current temperature storage uint16_t wWCurTemp2_; // Warm Water current temperature storage
uint8_t wWCurFlow_; // Warm Water current flow temp in l/min uint8_t wWCurFlow_; // Warm Water current flow temp in l/min
uint16_t wwStorageTemp1_; // warm water storage temp 1 uint16_t wWStorageTemp1_; // warm water storage temp 1
uint16_t wwStorageTemp2_; // warm water storage temp 2 uint16_t wWStorageTemp2_; // warm water storage temp 2
uint8_t wWActivated_; // Warm Water activated uint8_t wWActivated_; // Warm Water activated
uint8_t wWOneTime_; // Warm Water one time function on/off uint8_t wWOneTime_; // Warm Water one time function on/off
uint8_t wWDisinfecting_; // Warm Water disinfection on/off uint8_t wWDisinfecting_; // Warm Water disinfection on/off
uint8_t wWCharging_; // Warm Water charging on/off uint8_t wWCharging_; // Warm Water charging on/off
uint8_t wWRecharging_; // Warm Water recharge on/off uint8_t wWRecharging_; // Warm Water recharge on/off
uint8_t wWTempOK_; // Warm Water temperature ok on/off uint8_t wWTempOK_; // Warm Water temperature ok on/off
uint8_t wWActive_; uint8_t wWActive_; //
uint8_t wWHeat_; // 3-way valve on WW uint8_t wWHeat_; // 3-way valve on WW
uint8_t wWSetPumpPower_; // ww pump speed/power? uint8_t wWSetPumpPower_; // ww pump speed/power?
uint16_t wwMixTemperature_; // mixing temperature
uint16_t wwBufferTemperature_; // buffertemperature
uint32_t wWStarts_; // Warm Water # starts uint32_t wWStarts_; // Warm Water # starts
uint32_t wWStarts2_; // Warm water starts (control) uint32_t wWStarts2_; // Warm water starts (control)
uint32_t wWWorkM_; // Warm Water # minutes uint32_t wWWorkM_; // Warm Water # minutes
uint16_t mixerTemp_; // mixing temperature
uint16_t tankMiddleTemp_; // Tank middle temperature (TS3)
// main // main
uint8_t heatingActive_; // Central heating is on/off uint8_t heatingActive_; // Central heating is on/off
uint8_t tapwaterActive_; // Hot tap water is on/off uint8_t tapwaterActive_; // Hot tap water is on/off

View File

@@ -69,8 +69,8 @@ Solar::Solar(uint8_t device_type, uint8_t device_id, uint8_t product_id, const s
} }
register_device_value(TAG_NONE, &collectorTemp_, DeviceValueType::SHORT, FL_(div10), F("collectorTemp"), F("Collector temperature (TS1)"), DeviceValueUOM::DEGREES); register_device_value(TAG_NONE, &collectorTemp_, DeviceValueType::SHORT, FL_(div10), F("collectorTemp"), F("Collector temperature (TS1)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_NONE, &tankBottomTemp_, DeviceValueType::SHORT, FL_(div10), F("tankBottomTemp"), F("Bottom temperature (TS2)"), DeviceValueUOM::DEGREES); register_device_value(TAG_NONE, &tankBottomTemp_, DeviceValueType::SHORT, FL_(div10), F("tankBottomTemp"), F("Tank Bottom temperature (TS2)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_NONE, &tankBottomTemp2_, DeviceValueType::SHORT, FL_(div10), F("tankBottomTemp2"), F("Bottom temperature (TS5)"), DeviceValueUOM::DEGREES); register_device_value(TAG_NONE, &tankBottomTemp2_, DeviceValueType::SHORT, FL_(div10), F("tankBottomTemp2"), F("Tank Bottom temperature (TS5)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_NONE, &heatExchangerTemp_, DeviceValueType::SHORT, FL_(div10), F("heatExchangerTemp"), F("Heat exchanger temperature (TS6)"), DeviceValueUOM::DEGREES); register_device_value(TAG_NONE, &heatExchangerTemp_, DeviceValueType::SHORT, FL_(div10), F("heatExchangerTemp"), F("Heat exchanger temperature (TS6)"), DeviceValueUOM::DEGREES);
register_device_value(TAG_NONE, &tank1MaxTempCurrent_, DeviceValueType::UINT, nullptr, F("tank1MaxTempCurrent"), F("Maximum Tank temperature"), DeviceValueUOM::NONE); register_device_value(TAG_NONE, &tank1MaxTempCurrent_, DeviceValueType::UINT, nullptr, F("tank1MaxTempCurrent"), F("Maximum Tank temperature"), DeviceValueUOM::NONE);
@@ -118,7 +118,7 @@ bool Solar::publish_ha_config() {
// SM10Monitor - type 0x97 // SM10Monitor - type 0x97
void Solar::process_SM10Monitor(std::shared_ptr<const Telegram> telegram) { void Solar::process_SM10Monitor(std::shared_ptr<const Telegram> telegram) {
has_update(telegram->read_value(collectorTemp_, 2)); // collector temp from SM10, is *10 has_update(telegram->read_value(collectorTemp_, 2)); // collector temp from SM10, is *10
has_update(telegram->read_value(tankBottomTemp_, 5)); // bottom temp from SM10, is *10 has_update(telegram->read_value(tankBottomTemp_, 5)); // tank bottom temp from SM10, is *10
has_update(telegram->read_value(solarPumpModulation_, 4)); // modulation solar pump has_update(telegram->read_value(solarPumpModulation_, 4)); // modulation solar pump
has_update(telegram->read_bitvalue(solarPump_, 7, 1)); has_update(telegram->read_bitvalue(solarPump_, 7, 1));
has_update(telegram->read_value(pumpWorkMin_, 8, 3)); has_update(telegram->read_value(pumpWorkMin_, 8, 3));
@@ -187,7 +187,7 @@ void Solar::process_SM100ParamCfg(std::shared_ptr<const Telegram> telegram) {
* e.g. B0 0B FF 00 02 62 00 77 01 D4 80 00 80 00 80 00 80 00 80 00 80 00 80 00 80 00 00 F9 80 00 80 9E - for heat exchanger temp * e.g. B0 0B FF 00 02 62 00 77 01 D4 80 00 80 00 80 00 80 00 80 00 80 00 80 00 80 00 00 F9 80 00 80 9E - for heat exchanger temp
* e.g, 30 00 FF 00 02 62 01 AC * e.g, 30 00 FF 00 02 62 01 AC
* 30 00 FF 18 02 62 80 00 * 30 00 FF 18 02 62 80 00
* 30 00 FF 00 02 62 01 A1 - for bottom temps * 30 00 FF 00 02 62 01 A1 - for tank bottom temps
* bytes 0+1 = TS1 Temperature sensor for collector * bytes 0+1 = TS1 Temperature sensor for collector
* bytes 2+3 = TS2 Temperature sensor 1 cylinder, bottom * bytes 2+3 = TS2 Temperature sensor 1 cylinder, bottom
* bytes 16+17 = TS5 Temperature sensor 2 cylinder, bottom, or swimming pool * bytes 16+17 = TS5 Temperature sensor 2 cylinder, bottom, or swimming pool
@@ -308,7 +308,7 @@ void Solar::process_SM100Time(std::shared_ptr<const Telegram> telegram) {
*/ */
void Solar::process_ISM1StatusMessage(std::shared_ptr<const Telegram> telegram) { void Solar::process_ISM1StatusMessage(std::shared_ptr<const Telegram> telegram) {
has_update(telegram->read_value(collectorTemp_, 4)); // Collector Temperature has_update(telegram->read_value(collectorTemp_, 4)); // Collector Temperature
has_update(telegram->read_value(tankBottomTemp_, 6)); // Temperature Bottom of Solar Boiler has_update(telegram->read_value(tankBottomTemp_, 6)); // Temperature Bottom of Solar Boiler tank
uint16_t Wh = 0xFFFF; uint16_t Wh = 0xFFFF;
has_update(telegram->read_value(Wh, 2)); // Solar Energy produced in last hour only ushort, is not * 10 has_update(telegram->read_value(Wh, 2)); // Solar Energy produced in last hour only ushort, is not * 10

View File

@@ -33,8 +33,8 @@ class Solar : public EMSdevice {
static uuid::log::Logger logger_; static uuid::log::Logger logger_;
int16_t collectorTemp_; // TS1: Temperature sensor for collector array 1 int16_t collectorTemp_; // TS1: Temperature sensor for collector array 1
int16_t tankBottomTemp_; // TS2: Temperature sensor 1 cylinder, bottom (solar thermal system) int16_t tankBottomTemp_; // TS2: Temperature sensor 1 cylinder, bottom tank (solar thermal system)
int16_t tankBottomTemp2_; // TS5: Temperature sensor 2 cylinder, bottom, or swimming pool (solar thermal system) int16_t tankBottomTemp2_; // TS5: Temperature sensor 2 cylinder, bottom tank, or swimming pool (solar thermal system)
int16_t heatExchangerTemp_; // TS6: Heat exchanger temperature sensor int16_t heatExchangerTemp_; // TS6: Heat exchanger temperature sensor
uint8_t solarPumpModulation_; // PS1: modulation solar pump uint8_t solarPumpModulation_; // PS1: modulation solar pump
uint8_t cylinderPumpModulation_; // PS5: modulation cylinder pump uint8_t cylinderPumpModulation_; // PS5: modulation cylinder pump

View File

@@ -953,6 +953,7 @@ void Test::add_device(uint8_t device_id, uint8_t product_id) {
uart_telegram({device_id, EMSESP_DEFAULT_EMS_BUS_ID, EMSdevice::EMS_TYPE_VERSION, 0, product_id, 1, 0}); uart_telegram({device_id, EMSESP_DEFAULT_EMS_BUS_ID, EMSdevice::EMS_TYPE_VERSION, 0, product_id, 1, 0});
} }
#ifndef EMSESP_STANDALONE
void Test::listDir(fs::FS & fs, const char * dirname, uint8_t levels) { void Test::listDir(fs::FS & fs, const char * dirname, uint8_t levels) {
Serial.printf("Listing directory: %s\r\n", dirname); Serial.printf("Listing directory: %s\r\n", dirname);
@@ -983,6 +984,7 @@ void Test::listDir(fs::FS & fs, const char * dirname, uint8_t levels) {
file = root.openNextFile(); file = root.openNextFile();
} }
} }
#endif
void Test::debug(uuid::console::Shell & shell, const std::string & cmd) { void Test::debug(uuid::console::Shell & shell, const std::string & cmd) {
// shell.add_flags(CommandFlags::ADMIN); // switch to su // shell.add_flags(CommandFlags::ADMIN); // switch to su
@@ -994,9 +996,11 @@ void Test::debug(uuid::console::Shell & shell, const std::string & cmd) {
command = cmd; command = cmd;
} }
#ifndef EMSESP_STANDALONE
if (command == "ls") { if (command == "ls") {
listDir(LITTLEFS, "/", 3); listDir(LITTLEFS, "/", 3);
} }
#endif
} }
} // namespace emsesp } // namespace emsesp

View File

@@ -45,7 +45,9 @@ class Test {
static void debug(uuid::console::Shell & shell, const std::string & command); static void debug(uuid::console::Shell & shell, const std::string & command);
private: private:
#ifndef EMSESP_STANDALONE
static void listDir(fs::FS & fs, const char * dirname, uint8_t levels); static void listDir(fs::FS & fs, const char * dirname, uint8_t levels);
#endif
}; };
} // namespace emsesp } // namespace emsesp