mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
b12, cleanup, formatting, small fixes
This commit is contained in:
@@ -33,7 +33,8 @@
|
||||
- Extend customization to select if an entity is to be shown in the WebUI or forced as read-only [#317](https://github.com/emsesp/EMS-ESP32/issues/317)
|
||||
- Added Moduline 400 installation parameters [PR #449 by @kwertie01](https://github.com/emsesp/EMS-ESP32/pull/449)
|
||||
- Read time from IVT-controller [#439](https://github.com/emsesp/EMS-ESP32/issues/439)
|
||||
- Hybrid Heatpump product-id 168 [#459](https://github.com/emsesp/EMS-ESP32/issues/459)
|
||||
- Hybrid Heatpump product-id 168 [#459](https://github.com/emsesp/EMS-ESP32/issues/459), thermostat settings
|
||||
- Junkers ISM2 and IPM in warm water mode [#437](https://github.com/emsesp/EMS-ESP32/issues/437)
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
@@ -215,46 +215,58 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
MAKE_CF_CB(set_hybridStrategy));
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&switchOverTemp_,
|
||||
DeviceValueType::UINT,
|
||||
DeviceValueType::INT,
|
||||
nullptr,
|
||||
FL_(switchOverTemp),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_switchOverTemp));
|
||||
MAKE_CF_CB(set_switchOverTemp),
|
||||
-20,
|
||||
20);
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&energyCostRatio_,
|
||||
DeviceValueType::UINT,
|
||||
FL_(div10),
|
||||
FL_(energyCostRatio),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_energyCostRatio));
|
||||
MAKE_CF_CB(set_energyCostRatio),
|
||||
0,
|
||||
19.9);
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&fossileFactor_,
|
||||
DeviceValueType::UINT,
|
||||
FL_(div10),
|
||||
FL_(fossileFactor),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_fossileFactor));
|
||||
MAKE_CF_CB(set_fossileFactor),
|
||||
0,
|
||||
5);
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&electricFactor_,
|
||||
DeviceValueType::UINT,
|
||||
FL_(div10),
|
||||
FL_(electricFactor),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_electricFactor));
|
||||
MAKE_CF_CB(set_electricFactor),
|
||||
0,
|
||||
5);
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&delayBoiler_,
|
||||
DeviceValueType::UINT,
|
||||
nullptr,
|
||||
FL_(delayBoiler),
|
||||
DeviceValueUOM::MINUTES,
|
||||
MAKE_CF_CB(set_delayBoiler));
|
||||
MAKE_CF_CB(set_delayBoiler),
|
||||
5,
|
||||
120);
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&tempDiffBoiler_,
|
||||
DeviceValueType::UINT,
|
||||
nullptr,
|
||||
FL_(tempDiffBoiler),
|
||||
DeviceValueUOM::DEGREES_R,
|
||||
MAKE_CF_CB(set_tempDiffBoiler));
|
||||
MAKE_CF_CB(set_tempDiffBoiler),
|
||||
1,
|
||||
99);
|
||||
}
|
||||
*/
|
||||
// heatpump info
|
||||
|
||||
@@ -128,7 +128,7 @@ class Boiler : public EMSdevice {
|
||||
uint32_t burn2WorkMin_; // burner stage 2 operating time
|
||||
uint32_t heatWorkMin_; // Total heat operating time
|
||||
uint32_t UBAuptime_; // Total UBA working hours
|
||||
char lastCode_[75]; // last error code
|
||||
char lastCode_[50]; // last error code
|
||||
char serviceCode_[4]; // 3 character status/service code
|
||||
uint16_t serviceCodeNumber_; // error/service code
|
||||
|
||||
@@ -196,7 +196,7 @@ class Boiler : public EMSdevice {
|
||||
/*
|
||||
// HybridHP
|
||||
uint8_t hybridStrategy_; // cost = 2, temperature = 3, mix = 4
|
||||
uint8_t switchOverTemp_; // degrees
|
||||
int8_t switchOverTemp_; // degrees
|
||||
uint8_t energyCostRatio_; // is *10
|
||||
uint8_t fossileFactor_; // is * 10
|
||||
uint8_t electricFactor_; // is * 10
|
||||
|
||||
@@ -110,6 +110,7 @@ Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
|
||||
register_device_value(tag, &wwCurTemp_1_, DeviceValueType::USHORT, FL_(div10), FL_(wwCurTemp), DeviceValueUOM::DEGREES);
|
||||
register_device_value(tag, &wwCurTemp_2_, DeviceValueType::USHORT, FL_(div10), FL_(wwCurTemp2), DeviceValueUOM::DEGREES);
|
||||
register_device_value(tag, &HydrTemp_, DeviceValueType::USHORT, FL_(div10), FL_(hydrTemp), DeviceValueUOM::DEGREES);
|
||||
register_device_value(tag, &pumpStatus_, DeviceValueType::BOOL, nullptr, FL_(pumpStatus), DeviceValueUOM::NONE, MAKE_CF_CB(set_pump));
|
||||
} else {
|
||||
register_telegram_type(0x010C, F("IPMStatusMessage"), false, MAKE_PF_CB(process_IPMStatusMessage));
|
||||
register_telegram_type(0x011E, F("IPMTempMessage"), false, MAKE_PF_CB(process_IPMTempMessage));
|
||||
@@ -216,13 +217,17 @@ void Mixer::process_MMPLUSConfigMessage_WWC(std::shared_ptr<const Telegram> tele
|
||||
has_update(telegram, wwMaxTemp_, 10);
|
||||
}
|
||||
|
||||
// 0x34
|
||||
// 0x34 only8 bytes long
|
||||
// Mixer(0x41) -> All(0x00), UBAMonitorWW(0x34), data: 37 02 1E 02 1E 00 00 00 00
|
||||
void Mixer::process_MonitorWW(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, wwSelTemp_, 0);
|
||||
has_update(telegram, wwCurTemp_1_, 1);
|
||||
has_update(telegram, wwCurTemp_2_, 3);
|
||||
has_bitupdate(telegram, pumpStatus_, 5, 0); // not sure thisisthe right value
|
||||
}
|
||||
// 0x1E
|
||||
|
||||
// 0x1E, only16 bit temperature
|
||||
// Mixer(0x41) -> Boiler(0x08), HydrTemp(0x1E), data: 01 D8
|
||||
void Mixer::process_HydrTemp(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, HydrTemp_, 0);
|
||||
}
|
||||
|
||||
@@ -3524,46 +3524,58 @@ void Thermostat::register_device_values() {
|
||||
MAKE_CF_CB(set_hybridStrategy));
|
||||
register_device_value(DeviceValueTAG::TAG_THERMOSTAT_DATA,
|
||||
&switchOverTemp_,
|
||||
DeviceValueType::UINT,
|
||||
DeviceValueType::INT,
|
||||
nullptr,
|
||||
FL_(switchOverTemp),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_switchOverTemp));
|
||||
MAKE_CF_CB(set_switchOverTemp),
|
||||
-20,
|
||||
20);
|
||||
register_device_value(DeviceValueTAG::TAG_THERMOSTAT_DATA,
|
||||
&energyCostRatio_,
|
||||
DeviceValueType::UINT,
|
||||
FL_(div10),
|
||||
FL_(energyCostRatio),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_energyCostRatio));
|
||||
MAKE_CF_CB(set_energyCostRatio),
|
||||
0,
|
||||
19.9);
|
||||
register_device_value(DeviceValueTAG::TAG_THERMOSTAT_DATA,
|
||||
&fossileFactor_,
|
||||
DeviceValueType::UINT,
|
||||
FL_(div10),
|
||||
FL_(fossileFactor),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_fossileFactor));
|
||||
MAKE_CF_CB(set_fossileFactor),
|
||||
0,
|
||||
5);
|
||||
register_device_value(DeviceValueTAG::TAG_THERMOSTAT_DATA,
|
||||
&electricFactor_,
|
||||
DeviceValueType::UINT,
|
||||
FL_(div10),
|
||||
FL_(electricFactor),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_electricFactor));
|
||||
MAKE_CF_CB(set_electricFactor),
|
||||
0,
|
||||
5);
|
||||
register_device_value(DeviceValueTAG::TAG_THERMOSTAT_DATA,
|
||||
&delayBoiler_,
|
||||
DeviceValueType::UINT,
|
||||
nullptr,
|
||||
FL_(delayBoiler),
|
||||
DeviceValueUOM::MINUTES,
|
||||
MAKE_CF_CB(set_delayBoiler));
|
||||
MAKE_CF_CB(set_delayBoiler),
|
||||
5,
|
||||
120);
|
||||
register_device_value(DeviceValueTAG::TAG_THERMOSTAT_DATA,
|
||||
&tempDiffBoiler_,
|
||||
DeviceValueType::UINT,
|
||||
nullptr,
|
||||
FL_(tempDiffBoiler),
|
||||
DeviceValueUOM::DEGREES_R,
|
||||
MAKE_CF_CB(set_tempDiffBoiler));
|
||||
MAKE_CF_CB(set_tempDiffBoiler),
|
||||
1,
|
||||
99);
|
||||
break;
|
||||
case EMS_DEVICE_FLAG_EASY:
|
||||
// Easy TC100 have no date/time, see issue #100, not sure about CT200, so leave it.
|
||||
|
||||
@@ -217,8 +217,8 @@ class Thermostat : public EMSdevice {
|
||||
uint8_t wwDailyHeatTime_;
|
||||
|
||||
// HybridHP
|
||||
uint8_t hybridStrategy_; // cost = 2, temperature = 3, mix = 4
|
||||
uint8_t switchOverTemp_; // degrees
|
||||
uint8_t hybridStrategy_; // co2 = 1, cost = 2, temperature = 3, mix = 4
|
||||
int8_t switchOverTemp_; // degrees
|
||||
uint8_t energyCostRatio_; // is *10
|
||||
uint8_t fossileFactor_; // is * 10
|
||||
uint8_t electricFactor_; // is * 10
|
||||
|
||||
@@ -561,7 +561,7 @@ void EMSdevice::publish_value(void * value_p) const {
|
||||
}
|
||||
|
||||
int8_t divider = (dv.options_size == 1) ? Helpers::atoint(read_flash_string(dv.options[0]).c_str()) : 0;
|
||||
char payload[30] = {'\0'};
|
||||
char payload[50] = {'\0'};
|
||||
uint8_t fahrenheit = !EMSESP::system_.fahrenheit() ? 0 : (dv.uom == DeviceValueUOM::DEGREES) ? 2 : (dv.uom == DeviceValueUOM::DEGREES_R) ? 1 : 0;
|
||||
|
||||
switch (dv.type) {
|
||||
|
||||
@@ -386,6 +386,10 @@ void Mqtt::on_publish(uint16_t packetId) const {
|
||||
|
||||
// called when MQTT settings have changed via the Web forms
|
||||
void Mqtt::reset_mqtt() {
|
||||
if (!mqtt_enabled_) {
|
||||
mqtt_messages_.clear();
|
||||
}
|
||||
|
||||
if (!mqttClient_) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.4.0b11"
|
||||
#define EMSESP_APP_VERSION "3.4.0b12"
|
||||
|
||||
Reference in New Issue
Block a user