mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
formatting
This commit is contained in:
@@ -2,7 +2,7 @@ Language: Cpp
|
|||||||
BasedOnStyle: LLVM
|
BasedOnStyle: LLVM
|
||||||
UseTab: Never
|
UseTab: Never
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
ColumnLimit: 160
|
ColumnLimit: 220
|
||||||
TabWidth: 4
|
TabWidth: 4
|
||||||
#BreakBeforeBraces: Custom
|
#BreakBeforeBraces: Custom
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
|
|||||||
@@ -56,9 +56,12 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
register_telegram_type(0x494, F("UBAEnergySupplied"), false, [&](std::shared_ptr<const Telegram> t) { process_UBAEnergySupplied(t); });
|
register_telegram_type(0x494, F("UBAEnergySupplied"), false, [&](std::shared_ptr<const Telegram> t) { process_UBAEnergySupplied(t); });
|
||||||
register_telegram_type(0x495, F("UBAInformation"), false, [&](std::shared_ptr<const Telegram> t) { process_UBAInformation(t); });
|
register_telegram_type(0x495, F("UBAInformation"), false, [&](std::shared_ptr<const Telegram> t) { process_UBAInformation(t); });
|
||||||
|
|
||||||
EMSESP::send_read_request(0x10, device_id); // read last errorcode on start (only published on errors)
|
EMSESP::send_read_request(0x10,
|
||||||
EMSESP::send_read_request(0x11, device_id); // read last errorcode on start (only published on errors)
|
device_id); // read last errorcode on start (only published on errors)
|
||||||
EMSESP::send_read_request(0x15, device_id); // read maintenace data on start (only published on change)
|
EMSESP::send_read_request(0x11,
|
||||||
|
device_id); // read last errorcode on start (only published on errors)
|
||||||
|
EMSESP::send_read_request(0x15,
|
||||||
|
device_id); // read maintenace data on start (only published on change)
|
||||||
|
|
||||||
System::show_mem("after telegram type reg");
|
System::show_mem("after telegram type reg");
|
||||||
|
|
||||||
@@ -91,428 +94,102 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
reserve_device_values(50);
|
reserve_device_values(50);
|
||||||
|
|
||||||
// main - boiler_data topic
|
// main - boiler_data topic
|
||||||
register_device_value(
|
register_device_value(TAG_BOILER_DATA, &heatingActive_, DeviceValueType::BOOL, nullptr, F("heatingActive"), F("Heating active"), DeviceValueUOM::NONE);
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &heatingActive_, DeviceValueType::BOOL, nullptr, F("heatingActive"), F("Heating active"), DeviceValueUOM::NONE);
|
register_device_value(TAG_BOILER_DATA, &tapwaterActive_, DeviceValueType::BOOL, nullptr, F("tapwaterActive"), F("Warm water/DHW active"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
register_device_value(TAG_BOILER_DATA, &selFlowTemp_, DeviceValueType::UINT, nullptr, F("selFlowTemp"), F("Selected flow temperature"), DeviceValueUOM::DEGREES);
|
||||||
&tapwaterActive_,
|
register_device_value(TAG_BOILER_DATA, &selBurnPow_, DeviceValueType::UINT, nullptr, F("selBurnPow"), F("Burner selected max power"), DeviceValueUOM::PERCENT);
|
||||||
DeviceValueType::BOOL,
|
register_device_value(TAG_BOILER_DATA, &pumpMod_, DeviceValueType::UINT, nullptr, F("pumpMod"), F("Pump modulation"), DeviceValueUOM::PERCENT);
|
||||||
nullptr,
|
register_device_value(TAG_BOILER_DATA, &pumpMod2_, DeviceValueType::UINT, nullptr, F("pumpMod2"), F("Heat pump modulation"), DeviceValueUOM::PERCENT);
|
||||||
F("tapwaterActive"),
|
|
||||||
F("Warm water/DHW active"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
|
||||||
&selFlowTemp_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("selFlowTemp"),
|
|
||||||
F("Selected flow temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
|
||||||
&selBurnPow_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("selBurnPow"),
|
|
||||||
F("Burner selected max power"),
|
|
||||||
DeviceValueUOM::PERCENT);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &pumpMod_, DeviceValueType::UINT, nullptr, F("pumpMod"), F("Pump modulation"), DeviceValueUOM::PERCENT);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &pumpMod2_, DeviceValueType::UINT, nullptr, F("pumpMod2"), F("Heat pump modulation"), DeviceValueUOM::PERCENT);
|
|
||||||
|
|
||||||
register_device_value(TAG_BOILER_DATA, &outdoorTemp_, DeviceValueType::SHORT, FL_(div10), F("outdoorTemp"), F("Outside temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_BOILER_DATA, &outdoorTemp_, DeviceValueType::SHORT, FL_(div10), F("outdoorTemp"), F("Outside temperature"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
register_device_value(TAG_BOILER_DATA, &curFlowTemp_, DeviceValueType::USHORT, FL_(div10), F("curFlowTemp"), F("Current flow temperature"), DeviceValueUOM::DEGREES);
|
||||||
&curFlowTemp_,
|
register_device_value(TAG_BOILER_DATA, &retTemp_, DeviceValueType::USHORT, FL_(div10), F("retTemp"), F("Return temperature"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueType::USHORT,
|
register_device_value(TAG_BOILER_DATA, &switchTemp_, DeviceValueType::USHORT, FL_(div10), F("switchTemp"), F("Mixing switch temperature"), DeviceValueUOM::DEGREES);
|
||||||
FL_(div10),
|
register_device_value(TAG_BOILER_DATA, &sysPress_, DeviceValueType::UINT, FL_(div10), F("sysPress"), F("System pressure"), DeviceValueUOM::BAR);
|
||||||
F("curFlowTemp"),
|
|
||||||
F("Current flow temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &retTemp_, DeviceValueType::USHORT, FL_(div10), F("retTemp"), F("Return temperature"), DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
|
||||||
&switchTemp_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("switchTemp"),
|
|
||||||
F("Mixing switch temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &sysPress_, DeviceValueType::UINT, FL_(div10), F("sysPress"), F("System pressure"), DeviceValueUOM::BAR);
|
|
||||||
register_device_value(TAG_BOILER_DATA, &boilTemp_, DeviceValueType::USHORT, FL_(div10), F("boilTemp"), F("Max boiler temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_BOILER_DATA, &boilTemp_, DeviceValueType::USHORT, FL_(div10), F("boilTemp"), F("Max boiler temperature"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(TAG_BOILER_DATA, &exhaustTemp_, DeviceValueType::USHORT, FL_(div10), F("exhaustTemp"), F("Exhaust temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_BOILER_DATA, &exhaustTemp_, DeviceValueType::USHORT, FL_(div10), F("exhaustTemp"), F("Exhaust temperature"), DeviceValueUOM::DEGREES);
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &burnGas_, DeviceValueType::BOOL, nullptr, F("burnGas"), F("Gas"), DeviceValueUOM::NONE);
|
register_device_value(TAG_BOILER_DATA, &burnGas_, DeviceValueType::BOOL, nullptr, F("burnGas"), F("Gas"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &flameCurr_, DeviceValueType::USHORT, FL_(div10), F("flameCurr"), F("Flame current"), DeviceValueUOM::UA);
|
register_device_value(TAG_BOILER_DATA, &flameCurr_, DeviceValueType::USHORT, FL_(div10), F("flameCurr"), F("Flame current"), DeviceValueUOM::UA);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &heatPump_, DeviceValueType::BOOL, nullptr, F("heatPump"), F("Heat pump"), DeviceValueUOM::NONE);
|
register_device_value(TAG_BOILER_DATA, &heatPump_, DeviceValueType::BOOL, nullptr, F("heatPump"), F("Heat pump"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &fanWork_, DeviceValueType::BOOL, nullptr, F("fanWork"), F("Fan"), DeviceValueUOM::NONE);
|
register_device_value(TAG_BOILER_DATA, &fanWork_, DeviceValueType::BOOL, nullptr, F("fanWork"), F("Fan"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &ignWork_, DeviceValueType::BOOL, nullptr, F("ignWork"), F("Ignition"), DeviceValueUOM::NONE);
|
register_device_value(TAG_BOILER_DATA, &ignWork_, DeviceValueType::BOOL, nullptr, F("ignWork"), F("Ignition"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
register_device_value(TAG_BOILER_DATA, &heatingActivated_, DeviceValueType::BOOL, nullptr, F("heatingActivated"), F("Heating activated"), DeviceValueUOM::NONE);
|
||||||
&heatingActivated_,
|
register_device_value(TAG_BOILER_DATA, &heatingTemp_, DeviceValueType::UINT, nullptr, F("heatingTemp"), F("Heating temperature"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueType::BOOL,
|
register_device_value(TAG_BOILER_DATA, &pumpModMax_, DeviceValueType::UINT, nullptr, F("pumpModMax"), F("Burner pump max power"), DeviceValueUOM::PERCENT);
|
||||||
nullptr,
|
register_device_value(TAG_BOILER_DATA, &pumpModMin_, DeviceValueType::UINT, nullptr, F("pumpModMin"), F("Burner pump min power"), DeviceValueUOM::PERCENT);
|
||||||
F("heatingActivated"),
|
register_device_value(TAG_BOILER_DATA, &pumpDelay_, DeviceValueType::UINT, nullptr, F("pumpDelay"), F("Pump delay"), DeviceValueUOM::MINUTES);
|
||||||
F("Heating activated"),
|
register_device_value(TAG_BOILER_DATA, &burnMinPeriod_, DeviceValueType::UINT, nullptr, F("burnMinPeriod"), F("Burner min period"), DeviceValueUOM::MINUTES);
|
||||||
DeviceValueUOM::NONE);
|
register_device_value(TAG_BOILER_DATA, &burnMinPower_, DeviceValueType::UINT, nullptr, F("burnMinPower"), F("Burner min power"), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(
|
register_device_value(TAG_BOILER_DATA, &burnMaxPower_, DeviceValueType::UINT, nullptr, F("burnMaxPower"), F("Burner max power"), DeviceValueUOM::PERCENT);
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &heatingTemp_, DeviceValueType::UINT, nullptr, F("heatingTemp"), F("Heating temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_BOILER_DATA, &boilHystOn_, DeviceValueType::INT, nullptr, F("boilHystOn"), F("Hysteresis on temperature"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(
|
register_device_value(TAG_BOILER_DATA, &boilHystOff_, DeviceValueType::INT, nullptr, F("boilHystOff"), F("Hysteresis off temperature"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &pumpModMax_, DeviceValueType::UINT, nullptr, F("pumpModMax"), F("Burner pump max power"), DeviceValueUOM::PERCENT);
|
register_device_value(TAG_BOILER_DATA, &setFlowTemp_, DeviceValueType::UINT, nullptr, F("setFlowTemp"), F("Set flow temperature"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(
|
register_device_value(TAG_BOILER_DATA, &setBurnPow_, DeviceValueType::UINT, nullptr, F("setBurnPow"), F("Burner set power"), DeviceValueUOM::PERCENT);
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &pumpModMin_, DeviceValueType::UINT, nullptr, F("pumpModMin"), F("Burner pump min power"), DeviceValueUOM::PERCENT);
|
register_device_value(TAG_BOILER_DATA, &curBurnPow_, DeviceValueType::UINT, nullptr, F("curBurnPow"), F("Burner current power"), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &pumpDelay_, DeviceValueType::UINT, nullptr, F("pumpDelay"), F("Pump delay"), DeviceValueUOM::MINUTES);
|
register_device_value(TAG_BOILER_DATA, &burnStarts_, DeviceValueType::ULONG, nullptr, F("burnStarts"), F("Burner # starts"), DeviceValueUOM::NONE);
|
||||||
register_device_value(
|
register_device_value(TAG_BOILER_DATA, &burnWorkMin_, DeviceValueType::TIME, nullptr, F("burnWorkMin"), F("Total burner operating time"), DeviceValueUOM::MINUTES);
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &burnMinPeriod_, DeviceValueType::UINT, nullptr, F("burnMinPeriod"), F("Burner min period"), DeviceValueUOM::MINUTES);
|
register_device_value(TAG_BOILER_DATA, &heatWorkMin_, DeviceValueType::TIME, nullptr, F("heatWorkMin"), F("Total heat operating time"), DeviceValueUOM::MINUTES);
|
||||||
register_device_value(
|
register_device_value(TAG_BOILER_DATA, &UBAuptime_, DeviceValueType::TIME, nullptr, F("UBAuptime"), F("Total UBA operating time"), DeviceValueUOM::MINUTES);
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &burnMinPower_, DeviceValueType::UINT, nullptr, F("burnMinPower"), F("Burner min power"), DeviceValueUOM::PERCENT);
|
register_device_value(TAG_BOILER_DATA, &lastCode_, DeviceValueType::TEXT, nullptr, F("lastCode"), F("Last error code"), DeviceValueUOM::NONE);
|
||||||
register_device_value(
|
register_device_value(TAG_BOILER_DATA, &serviceCode_, DeviceValueType::TEXT, nullptr, F("serviceCode"), F("Service code"), DeviceValueUOM::NONE);
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &burnMaxPower_, DeviceValueType::UINT, nullptr, F("burnMaxPower"), F("Burner max power"), DeviceValueUOM::PERCENT);
|
register_device_value(TAG_BOILER_DATA, &serviceCodeNumber_, DeviceValueType::USHORT, nullptr, F("serviceCodeNumber"), F("Service code number"), DeviceValueUOM::NONE);
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &boilHystOn_, DeviceValueType::INT, nullptr, F("boilHystOn"), F("Hysteresis on temperature"), DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
|
||||||
&boilHystOff_,
|
|
||||||
DeviceValueType::INT,
|
|
||||||
nullptr,
|
|
||||||
F("boilHystOff"),
|
|
||||||
F("Hysteresis off temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &setFlowTemp_, DeviceValueType::UINT, nullptr, F("setFlowTemp"), F("Set flow temperature"), DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &setBurnPow_, DeviceValueType::UINT, nullptr, F("setBurnPow"), F("Burner set power"), DeviceValueUOM::PERCENT);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &curBurnPow_, DeviceValueType::UINT, nullptr, F("curBurnPow"), F("Burner current power"), DeviceValueUOM::PERCENT);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &burnStarts_, DeviceValueType::ULONG, nullptr, F("burnStarts"), F("Burner # starts"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
|
||||||
&burnWorkMin_,
|
|
||||||
DeviceValueType::TIME,
|
|
||||||
nullptr,
|
|
||||||
F("burnWorkMin"),
|
|
||||||
F("Total burner operating time"),
|
|
||||||
DeviceValueUOM::MINUTES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
|
||||||
&heatWorkMin_,
|
|
||||||
DeviceValueType::TIME,
|
|
||||||
nullptr,
|
|
||||||
F("heatWorkMin"),
|
|
||||||
F("Total heat operating time"),
|
|
||||||
DeviceValueUOM::MINUTES);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA, &UBAuptime_, DeviceValueType::TIME, nullptr, F("UBAuptime"), F("Total UBA operating time"), DeviceValueUOM::MINUTES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &lastCode_, DeviceValueType::TEXT, nullptr, F("lastCode"), F("Last error code"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA, &serviceCode_, DeviceValueType::TEXT, nullptr, F("serviceCode"), F("Service code"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
|
||||||
&serviceCodeNumber_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
nullptr,
|
|
||||||
F("serviceCodeNumber"),
|
|
||||||
F("Service code number"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
|
|
||||||
System::show_mem("after device value reg");
|
System::show_mem("after device value reg");
|
||||||
|
|
||||||
// ww - boiler_data_ww topic
|
// ww - boiler_data_ww topic
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
register_device_value(TAG_BOILER_DATA_WW, &wWSelTemp_, DeviceValueType::UINT, nullptr, F("wWSelTemp"), F("Warm Water selected temperature"), DeviceValueUOM::DEGREES);
|
||||||
&wWSelTemp_,
|
register_device_value(TAG_BOILER_DATA_WW, &wWSetTemp_, DeviceValueType::UINT, nullptr, F("wWSetTemp"), F("Warm water set temperature"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueType::UINT,
|
register_device_value(TAG_BOILER_DATA_WW, &wWType_, DeviceValueType::ENUM, FL_(enum_flow), F("wWType"), F("Warm water type"), DeviceValueUOM::NONE);
|
||||||
nullptr,
|
register_device_value(TAG_BOILER_DATA_WW, &wWComfort_, DeviceValueType::ENUM, FL_(enum_comfort), F("wWComfort"), F("Warm water comfort"), DeviceValueUOM::NONE);
|
||||||
F("wWSelTemp"),
|
register_device_value(TAG_BOILER_DATA_WW, &wWCircPump_, DeviceValueType::BOOL, nullptr, F("wWCircPump"), F("Warm water circulation pump available"), DeviceValueUOM::NONE);
|
||||||
F("Warm Water selected temperature"),
|
register_device_value(TAG_BOILER_DATA_WW, &wWChargeType_, DeviceValueType::BOOL, FL_(enum_charge), F("wWChargeType"), F("Warm Water charging type"), DeviceValueUOM::NONE);
|
||||||
DeviceValueUOM::DEGREES);
|
register_device_value(TAG_BOILER_DATA_WW, &wWDisinfectionTemp_, DeviceValueType::UINT, nullptr, F("wWDisinfectionTemp"), F("Warm Water disinfection temperature"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
register_device_value(TAG_BOILER_DATA_WW, &wWCircPumpMode_, DeviceValueType::ENUM, FL_(enum_freq), F("wWCircPumpMode"), F("Warm water circulation pump freq"), DeviceValueUOM::NONE);
|
||||||
&wWSetTemp_,
|
register_device_value(TAG_BOILER_DATA_WW, &wWCirc_, DeviceValueType::BOOL, nullptr, F("wWCirc"), F("Warm Water circulation active"), DeviceValueUOM::NONE);
|
||||||
DeviceValueType::UINT,
|
register_device_value(TAG_BOILER_DATA_WW, &wWCurTemp_, DeviceValueType::USHORT, FL_(div10), F("wWCurTemp"), F("Warm Water current temperature (intern)"), DeviceValueUOM::DEGREES);
|
||||||
nullptr,
|
register_device_value(TAG_BOILER_DATA_WW, &wWCurTemp2_, DeviceValueType::USHORT, FL_(div10), F("wWCurTemp2"), F("Warm Water current temperature (extern)"), DeviceValueUOM::DEGREES);
|
||||||
F("wWSetTemp"),
|
register_device_value(TAG_BOILER_DATA_WW, &wWCurFlow_, DeviceValueType::UINT, FL_(div10), F("wWCurFlow"), F("Warm Water current tap water flow"), DeviceValueUOM::LMIN);
|
||||||
F("Warm water set temperature"),
|
register_device_value(TAG_BOILER_DATA_WW, &wwStorageTemp1_, DeviceValueType::USHORT, FL_(div10), F("wwStorageTemp1"), F("Warm water storage temperature (intern)"), DeviceValueUOM::DEGREES);
|
||||||
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(DeviceValueTAG::TAG_BOILER_DATA_WW, &wWType_, DeviceValueType::ENUM, FL_(enum_flow), F("wWType"), F("Warm water type"), DeviceValueUOM::NONE);
|
register_device_value(TAG_BOILER_DATA_WW, &wWActivated_, DeviceValueType::BOOL, nullptr, F("wWActivated"), F("Warm Water activated"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
register_device_value(TAG_BOILER_DATA_WW, &wWOneTime_, DeviceValueType::BOOL, nullptr, F("wWOneTime"), F("Warm Water one time charging"), DeviceValueUOM::NONE);
|
||||||
&wWComfort_,
|
register_device_value(TAG_BOILER_DATA_WW, &wWDisinfecting_, DeviceValueType::BOOL, nullptr, F("wWDisinfecting"), F("Warm Water disinfecting"), DeviceValueUOM::NONE);
|
||||||
DeviceValueType::ENUM,
|
register_device_value(TAG_BOILER_DATA_WW, &wWCharging_, DeviceValueType::BOOL, nullptr, F("wWCharging"), F("Warm Water charging"), DeviceValueUOM::NONE);
|
||||||
FL_(enum_comfort),
|
register_device_value(TAG_BOILER_DATA_WW, &wWRecharging_, DeviceValueType::BOOL, nullptr, F("wWRecharging"), F("Warm Water recharging"), DeviceValueUOM::NONE);
|
||||||
F("wWComfort"),
|
register_device_value(TAG_BOILER_DATA_WW, &wWTempOK_, DeviceValueType::BOOL, nullptr, F("wWTempOK"), F("Warm Water temperature ok"), DeviceValueUOM::NONE);
|
||||||
F("Warm water comfort"),
|
register_device_value(TAG_BOILER_DATA_WW, &wWActive_, DeviceValueType::BOOL, nullptr, F("wWActive"), F("Warm Water active"), DeviceValueUOM::NONE);
|
||||||
DeviceValueUOM::NONE);
|
register_device_value(TAG_BOILER_DATA_WW, &wWHeat_, DeviceValueType::BOOL, nullptr, F("wWHeat"), F("Warm Water heating"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
register_device_value(TAG_BOILER_DATA_WW, &wWSetPumpPower_, DeviceValueType::UINT, nullptr, F("wWSetPumpPower"), F("Warm Water pump set power"), DeviceValueUOM::PERCENT);
|
||||||
&wWCircPump_,
|
register_device_value(TAG_BOILER_DATA_WW, &wwMixTemperature_, DeviceValueType::USHORT, nullptr, F("wwMixTemperature"), F("Warm Water mix temperature"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueType::BOOL,
|
register_device_value(TAG_BOILER_DATA_WW, &wwBufferTemperature_, DeviceValueType::USHORT, nullptr, F("wwBufferTemperature"), F("Warm Water buffer boiler temperature"), DeviceValueUOM::DEGREES);
|
||||||
nullptr,
|
register_device_value(TAG_BOILER_DATA_WW, &wWStarts_, DeviceValueType::ULONG, nullptr, F("wWStarts"), F("Warm Water # starts"), DeviceValueUOM::NONE);
|
||||||
F("wWCircPump"),
|
register_device_value(TAG_BOILER_DATA_WW, &wWStarts2_, DeviceValueType::ULONG, nullptr, F("wWStarts2"), F("Warm Water # starts (control)"), DeviceValueUOM::NONE);
|
||||||
F("Warm water circulation pump available"),
|
register_device_value(TAG_BOILER_DATA_WW, &wWWorkM_, DeviceValueType::TIME, nullptr, F("wWWorkM"), F("Warm Water active time"), DeviceValueUOM::MINUTES);
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWChargeType_,
|
|
||||||
DeviceValueType::BOOL,
|
|
||||||
FL_(enum_charge),
|
|
||||||
F("wWChargeType"),
|
|
||||||
F("Warm Water charging type"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWDisinfectionTemp_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("wWDisinfectionTemp"),
|
|
||||||
F("Warm Water disinfection temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWCircPumpMode_,
|
|
||||||
DeviceValueType::ENUM,
|
|
||||||
FL_(enum_freq),
|
|
||||||
F("wWCircPumpMode"),
|
|
||||||
F("Warm water circulation pump freq"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA_WW, &wWCirc_, DeviceValueType::BOOL, nullptr, F("wWCirc"), F("Warm Water circulation active"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWCurTemp_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("wWCurTemp"),
|
|
||||||
F("Warm Water current temperature (intern)"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWCurTemp2_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("wWCurTemp2"),
|
|
||||||
F("Warm Water current temperature (extern)"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWCurFlow_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
FL_(div10),
|
|
||||||
F("wWCurFlow"),
|
|
||||||
F("Warm Water current tap water flow"),
|
|
||||||
DeviceValueUOM::LMIN);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wwStorageTemp1_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("wwStorageTemp1"),
|
|
||||||
F("Warm water storage temperature (intern)"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wwStorageTemp2_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("wwStorageTemp2"),
|
|
||||||
F("Warm water storage temperature (extern)"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA_WW, &wWActivated_, DeviceValueType::BOOL, nullptr, F("wWActivated"), F("Warm Water activated"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWOneTime_,
|
|
||||||
DeviceValueType::BOOL,
|
|
||||||
nullptr,
|
|
||||||
F("wWOneTime"),
|
|
||||||
F("Warm Water one time charging"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWDisinfecting_,
|
|
||||||
DeviceValueType::BOOL,
|
|
||||||
nullptr,
|
|
||||||
F("wWDisinfecting"),
|
|
||||||
F("Warm Water disinfecting"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA_WW, &wWCharging_, DeviceValueType::BOOL, nullptr, F("wWCharging"), F("Warm Water charging"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWRecharging_,
|
|
||||||
DeviceValueType::BOOL,
|
|
||||||
nullptr,
|
|
||||||
F("wWRecharging"),
|
|
||||||
F("Warm Water recharging"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA_WW, &wWTempOK_, DeviceValueType::BOOL, nullptr, F("wWTempOK"), F("Warm Water temperature ok"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW, &wWActive_, DeviceValueType::BOOL, nullptr, F("wWActive"), F("Warm Water active"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW, &wWHeat_, DeviceValueType::BOOL, nullptr, F("wWHeat"), F("Warm Water heating"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWSetPumpPower_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("wWSetPumpPower"),
|
|
||||||
F("Warm Water pump set power"),
|
|
||||||
DeviceValueUOM::PERCENT);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wwMixTemperature_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
nullptr,
|
|
||||||
F("wwMixTemperature"),
|
|
||||||
F("Warm Water mix temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wwBufferTemperature_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
nullptr,
|
|
||||||
F("wwBufferTemperature"),
|
|
||||||
F("Warm Water buffer boiler temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA_WW, &wWStarts_, DeviceValueType::ULONG, nullptr, F("wWStarts"), F("Warm Water # starts"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
|
||||||
&wWStarts2_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("wWStarts2"),
|
|
||||||
F("Warm Water # starts (control)"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_BOILER_DATA_WW, &wWWorkM_, DeviceValueType::TIME, nullptr, F("wWWorkM"), F("Warm Water active time"), DeviceValueUOM::MINUTES);
|
|
||||||
|
|
||||||
// info - boiler_data_info topic
|
// info - boiler_data_info topic
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
register_device_value(TAG_BOILER_DATA_INFO, &upTimeControl_, DeviceValueType::TIME, FL_(div60), F("upTimeControl"), F("Operating time total heat"), DeviceValueUOM::MINUTES);
|
||||||
&upTimeControl_,
|
register_device_value(TAG_BOILER_DATA_INFO, &upTimeCompHeating_, DeviceValueType::TIME, FL_(div60), F("upTimeCompHeating"), F("Operating time compressor heating"), DeviceValueUOM::MINUTES);
|
||||||
DeviceValueType::TIME,
|
register_device_value(TAG_BOILER_DATA_INFO, &upTimeCompCooling_, DeviceValueType::TIME, FL_(div60), F("upTimeCompCooling"), F("Operating time compressor cooling"), DeviceValueUOM::MINUTES);
|
||||||
FL_(div60),
|
register_device_value(TAG_BOILER_DATA_INFO, &upTimeCompWw_, DeviceValueType::TIME, FL_(div60), F("upTimeCompWw"), F("Operating time compressor warm water"), DeviceValueUOM::MINUTES);
|
||||||
F("upTimeControl"),
|
register_device_value(TAG_BOILER_DATA_INFO, &heatingStarts_, DeviceValueType::ULONG, nullptr, F("heatingStarts"), F("# heating starts (control)"), DeviceValueUOM::NONE);
|
||||||
F("Operating time total heat"),
|
register_device_value(TAG_BOILER_DATA_INFO, &coolingStarts_, DeviceValueType::ULONG, nullptr, F("coolingStarts"), F("# cooling starts (control)"), DeviceValueUOM::NONE);
|
||||||
DeviceValueUOM::MINUTES);
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgConsTotal_, DeviceValueType::ULONG, nullptr, F("nrgConsTotal"), F("Total energy consumption"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgConsCompTotal_, DeviceValueType::ULONG, nullptr, F("nrgConsCompTotal"), F("Energy consumption compressor total"), DeviceValueUOM::NONE);
|
||||||
&upTimeCompHeating_,
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgConsCompHeating_, DeviceValueType::ULONG, nullptr, F("nrgConsCompHeating"), F("Energy consumption compressor heating"), DeviceValueUOM::NONE);
|
||||||
DeviceValueType::TIME,
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgConsCompWw_, DeviceValueType::ULONG, nullptr, F("nrgConsCompWw"), F("Energy consumption compressor warm water"), DeviceValueUOM::NONE);
|
||||||
FL_(div60),
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgConsCompCooling_, DeviceValueType::ULONG, nullptr, F("nrgConsCompCooling"), F("Energy consumption compressor cooling"), DeviceValueUOM::NONE);
|
||||||
F("upTimeCompHeating"),
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgSuppTotal_, DeviceValueType::ULONG, nullptr, F("nrgSuppTotal"), F("Total energy supplied"), DeviceValueUOM::NONE);
|
||||||
F("Operating time compressor heating"),
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgSuppHeating_, DeviceValueType::ULONG, nullptr, F("nrgSuppHeating"), F("Total energy supplied heating"), DeviceValueUOM::NONE);
|
||||||
DeviceValueUOM::MINUTES);
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgSuppWw_, DeviceValueType::ULONG, nullptr, F("nrgSuppWw"), F("Total energy warm supplied warm water"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
register_device_value(TAG_BOILER_DATA_INFO, &nrgSuppCooling_, DeviceValueType::ULONG, nullptr, F("nrgSuppCooling"), F("Total energy supplied cooling"), DeviceValueUOM::NONE);
|
||||||
&upTimeCompCooling_,
|
register_device_value(TAG_BOILER_DATA_INFO, &auxElecHeatNrgConsTotal_, DeviceValueType::ULONG, nullptr, F("auxElecHeatNrgConsTotal"), F("Auxiliary electrical heater energy consumption total"), DeviceValueUOM::NONE);
|
||||||
DeviceValueType::TIME,
|
register_device_value(TAG_BOILER_DATA_INFO, &auxElecHeatNrgConsHeating_, DeviceValueType::ULONG, nullptr, F("auxElecHeatNrgConsHeating"), F("Auxiliary electrical heater energy consumption heating"), DeviceValueUOM::NONE);
|
||||||
FL_(div60),
|
register_device_value(TAG_BOILER_DATA_INFO, &auxElecHeatNrgConsDHW_, DeviceValueType::ULONG, nullptr, F("auxElecHeatNrgConsDHW"), F("Auxiliary electrical heater energy consumption DHW"), DeviceValueUOM::NONE);
|
||||||
F("upTimeCompCooling"),
|
register_device_value(TAG_BOILER_DATA_INFO, &maintenanceMessage_, DeviceValueType::TEXT, nullptr, F("maintenanceMessage"), F("Maintenance message"), DeviceValueUOM::NONE);
|
||||||
F("Operating time compressor cooling"),
|
register_device_value(TAG_BOILER_DATA_INFO, &maintenanceDate_, DeviceValueType::TEXT, nullptr, F("maintenanceDate"), F("Maintenance set date"), DeviceValueUOM::NONE);
|
||||||
DeviceValueUOM::MINUTES);
|
register_device_value(TAG_BOILER_DATA_INFO, &maintenanceType_, DeviceValueType::ENUM, FL_(enum_off_time_date), F("maintenanceType"), F("Scheduled maintenance"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
register_device_value(TAG_BOILER_DATA_INFO, &maintenanceTime_, DeviceValueType::UINT, nullptr, F("maintenanceTime"), F("Maintenance set time"), DeviceValueUOM::NONE);
|
||||||
&upTimeCompWw_,
|
|
||||||
DeviceValueType::TIME,
|
|
||||||
FL_(div60),
|
|
||||||
F("upTimeCompWw"),
|
|
||||||
F("Operating time compressor warm water"),
|
|
||||||
DeviceValueUOM::MINUTES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&heatingStarts_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("heatingStarts"),
|
|
||||||
F("# heating starts (control)"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&coolingStarts_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("coolingStarts"),
|
|
||||||
F("# cooling starts (control)"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgConsTotal_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgConsTotal"),
|
|
||||||
F("Total energy consumption"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgConsCompTotal_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgConsCompTotal"),
|
|
||||||
F("Energy consumption compressor total"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgConsCompHeating_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgConsCompHeating"),
|
|
||||||
F("Energy consumption compressor heating"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgConsCompWw_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgConsCompWw"),
|
|
||||||
F("Energy consumption compressor warm water"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgConsCompCooling_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgConsCompCooling"),
|
|
||||||
F("Energy consumption compressor cooling"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgSuppTotal_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgSuppTotal"),
|
|
||||||
F("Total energy supplied"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgSuppHeating_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgSuppHeating"),
|
|
||||||
F("Total energy supplied heating"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgSuppWw_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgSuppWw"),
|
|
||||||
F("Total energy warm supplied warm water"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&nrgSuppCooling_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("nrgSuppCooling"),
|
|
||||||
F("Total energy supplied cooling"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&auxElecHeatNrgConsTotal_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("auxElecHeatNrgConsTotal"),
|
|
||||||
F("Auxiliary electrical heater energy consumption total"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&auxElecHeatNrgConsHeating_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("auxElecHeatNrgConsHeating"),
|
|
||||||
F("Auxiliary electrical heater energy consumption heating"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&auxElecHeatNrgConsDHW_,
|
|
||||||
DeviceValueType::ULONG,
|
|
||||||
nullptr,
|
|
||||||
F("auxElecHeatNrgConsDHW"),
|
|
||||||
F("Auxiliary electrical heater energy consumption DHW"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&maintenanceMessage_,
|
|
||||||
DeviceValueType::TEXT,
|
|
||||||
nullptr,
|
|
||||||
F("maintenanceMessage"),
|
|
||||||
F("Maintenance message"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&maintenanceDate_,
|
|
||||||
DeviceValueType::TEXT,
|
|
||||||
nullptr,
|
|
||||||
F("maintenanceDate"),
|
|
||||||
F("Maintenance set date"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&maintenanceType_,
|
|
||||||
DeviceValueType::ENUM,
|
|
||||||
FL_(enum_off_time_date),
|
|
||||||
F("maintenanceType"),
|
|
||||||
F("Scheduled maintenance"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_INFO,
|
|
||||||
&maintenanceTime_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("maintenanceTime"),
|
|
||||||
F("Maintenance set time"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// publish HA config
|
// publish HA config
|
||||||
@@ -536,7 +213,8 @@ bool Boiler::publish_ha_config() {
|
|||||||
|
|
||||||
char topic[100];
|
char topic[100];
|
||||||
snprintf_P(topic, sizeof(topic), PSTR("homeassistant/sensor/%s/boiler/config"), System::hostname().c_str());
|
snprintf_P(topic, sizeof(topic), PSTR("homeassistant/sensor/%s/boiler/config"), System::hostname().c_str());
|
||||||
Mqtt::publish_ha(topic, doc.as<JsonObject>()); // publish the config payload with retain flag
|
Mqtt::publish_ha(topic,
|
||||||
|
doc.as<JsonObject>()); // publish the config payload with retain flag
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -583,10 +261,12 @@ void Boiler::check_active(const bool force) {
|
|||||||
|
|
||||||
// 0x33
|
// 0x33
|
||||||
void Boiler::process_UBAParameterWW(std::shared_ptr<const Telegram> telegram) {
|
void Boiler::process_UBAParameterWW(std::shared_ptr<const Telegram> telegram) {
|
||||||
has_update(telegram->read_value(wWActivated_, 1)); // 0xFF means on
|
has_update(telegram->read_value(wWActivated_, 1)); // 0xFF means on
|
||||||
has_update(telegram->read_value(wWCircPump_, 6)); // 0xFF means on
|
has_update(telegram->read_value(wWCircPump_, 6)); // 0xFF means on
|
||||||
has_update(telegram->read_value(wWCircPumpMode_, 7)); // 1=1x3min... 6=6x3min, 7=continuous
|
has_update(telegram->read_value(wWCircPumpMode_,
|
||||||
has_update(telegram->read_value(wWChargeType_, 10)); // 0 = charge pump, 0xff = 3-way valve
|
7)); // 1=1x3min... 6=6x3min, 7=continuous
|
||||||
|
has_update(telegram->read_value(wWChargeType_,
|
||||||
|
10)); // 0 = charge pump, 0xff = 3-way valve
|
||||||
has_update(telegram->read_value(wWSelTemp_, 2));
|
has_update(telegram->read_value(wWSelTemp_, 2));
|
||||||
has_update(telegram->read_value(wWDisinfectionTemp_, 8));
|
has_update(telegram->read_value(wWDisinfectionTemp_, 8));
|
||||||
|
|
||||||
@@ -619,8 +299,9 @@ void Boiler::process_UBAMonitorFast(std::shared_ptr<const Telegram> telegram) {
|
|||||||
|
|
||||||
// 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_, 11)); // 0x8000 if not available - this is boiler temp
|
has_update(telegram->read_value(wwStorageTemp2_,
|
||||||
|
11)); // 0x8000 if not available - this is boiler temp
|
||||||
|
|
||||||
has_update(telegram->read_value(retTemp_, 13));
|
has_update(telegram->read_value(retTemp_, 13));
|
||||||
has_update(telegram->read_value(flameCurr_, 15));
|
has_update(telegram->read_value(flameCurr_, 15));
|
||||||
@@ -703,7 +384,8 @@ void Boiler::process_UBAMonitorFastPlus(std::shared_ptr<const Telegram> telegram
|
|||||||
has_update(telegram->read_value(selBurnPow_, 9));
|
has_update(telegram->read_value(selBurnPow_, 9));
|
||||||
has_update(telegram->read_value(curFlowTemp_, 7));
|
has_update(telegram->read_value(curFlowTemp_, 7));
|
||||||
has_update(telegram->read_value(flameCurr_, 19));
|
has_update(telegram->read_value(flameCurr_, 19));
|
||||||
has_update(telegram->read_value(retTemp_, 17)); // can be 0 if no sensor, handled in export_values
|
has_update(telegram->read_value(retTemp_,
|
||||||
|
17)); // can be 0 if no sensor, handled in export_values
|
||||||
has_update(telegram->read_value(sysPress_, 21));
|
has_update(telegram->read_value(sysPress_, 21));
|
||||||
|
|
||||||
//has_update(telegram->read_value(temperatur_, 13)); // unknown temperature
|
//has_update(telegram->read_value(temperatur_, 13)); // unknown temperature
|
||||||
@@ -740,7 +422,8 @@ void Boiler::process_UBAMonitorSlow(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_update(telegram->read_value(outdoorTemp_, 0));
|
has_update(telegram->read_value(outdoorTemp_, 0));
|
||||||
has_update(telegram->read_value(boilTemp_, 2));
|
has_update(telegram->read_value(boilTemp_, 2));
|
||||||
has_update(telegram->read_value(exhaustTemp_, 4));
|
has_update(telegram->read_value(exhaustTemp_, 4));
|
||||||
has_update(telegram->read_value(switchTemp_, 25)); // only if there is a mixer module present
|
has_update(telegram->read_value(switchTemp_,
|
||||||
|
25)); // only if there is a mixer module present
|
||||||
has_update(telegram->read_value(pumpMod_, 9));
|
has_update(telegram->read_value(pumpMod_, 9));
|
||||||
has_update(telegram->read_value(burnStarts_, 10, 3)); // force to 3 bytes
|
has_update(telegram->read_value(burnStarts_, 10, 3)); // force to 3 bytes
|
||||||
has_update(telegram->read_value(burnWorkMin_, 13, 3)); // force to 3 bytes
|
has_update(telegram->read_value(burnWorkMin_, 13, 3)); // force to 3 bytes
|
||||||
@@ -791,9 +474,10 @@ void Boiler::process_UBAParametersPlus(std::shared_ptr<const Telegram> telegram)
|
|||||||
|
|
||||||
// 0xEA
|
// 0xEA
|
||||||
void Boiler::process_UBAParameterWWPlus(std::shared_ptr<const Telegram> telegram) {
|
void Boiler::process_UBAParameterWWPlus(std::shared_ptr<const Telegram> telegram) {
|
||||||
has_update(telegram->read_value(wWActivated_, 5)); // 0x01 means on
|
has_update(telegram->read_value(wWActivated_, 5)); // 0x01 means on
|
||||||
has_update(telegram->read_value(wWCircPump_, 10)); // 0x01 means yes
|
has_update(telegram->read_value(wWCircPump_, 10)); // 0x01 means yes
|
||||||
has_update(telegram->read_value(wWCircPumpMode_, 11)); // 1=1x3min... 6=6x3min, 7=continuous
|
has_update(telegram->read_value(wWCircPumpMode_,
|
||||||
|
11)); // 1=1x3min... 6=6x3min, 7=continuous
|
||||||
// has_update(telegram->read_value(wWDisinfectTemp_, 12)); // settings, status in E9
|
// has_update(telegram->read_value(wWDisinfectTemp_, 12)); // settings, status in E9
|
||||||
// has_update(telegram->read_value(wWSelTemp_, 6)); // settings, status in E9
|
// has_update(telegram->read_value(wWSelTemp_, 6)); // settings, status in E9
|
||||||
}
|
}
|
||||||
@@ -882,7 +566,8 @@ void Boiler::process_UBAOutdoorTemp(std::shared_ptr<const Telegram> telegram) {
|
|||||||
|
|
||||||
// UBASetPoint 0x1A
|
// UBASetPoint 0x1A
|
||||||
void Boiler::process_UBASetPoints(std::shared_ptr<const Telegram> telegram) {
|
void Boiler::process_UBASetPoints(std::shared_ptr<const Telegram> telegram) {
|
||||||
has_update(telegram->read_value(setFlowTemp_, 0)); // boiler set temp from thermostat
|
has_update(telegram->read_value(setFlowTemp_,
|
||||||
|
0)); // boiler set temp from thermostat
|
||||||
has_update(telegram->read_value(setBurnPow_, 1)); // max json power in %
|
has_update(telegram->read_value(setBurnPow_, 1)); // max json power in %
|
||||||
has_update(telegram->read_value(wWSetPumpPower_, 2)); // ww pump speed/power?
|
has_update(telegram->read_value(wWSetPumpPower_, 2)); // ww pump speed/power?
|
||||||
}
|
}
|
||||||
@@ -973,8 +658,9 @@ bool Boiler::set_warmwater_temp(const char * value, const int8_t id) {
|
|||||||
if (get_toggle_fetch(EMS_TYPE_UBAParametersPlus)) {
|
if (get_toggle_fetch(EMS_TYPE_UBAParametersPlus)) {
|
||||||
write_command(EMS_TYPE_UBAParameterWWPlus, 6, v, EMS_TYPE_UBAParameterWWPlus);
|
write_command(EMS_TYPE_UBAParameterWWPlus, 6, v, EMS_TYPE_UBAParameterWWPlus);
|
||||||
} else {
|
} else {
|
||||||
write_command(EMS_TYPE_UBAParameterWW, 2, v, EMS_TYPE_UBAParameterWW); // read seltemp back
|
write_command(EMS_TYPE_UBAParameterWW, 2, v,
|
||||||
write_command(EMS_TYPE_UBAFlags, 3, v, 0x34); // for i9000, see #397, read setTemp
|
EMS_TYPE_UBAParameterWW); // read seltemp back
|
||||||
|
write_command(EMS_TYPE_UBAFlags, 3, v, 0x34); // for i9000, see #397, read setTemp
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1278,7 +964,8 @@ bool Boiler::set_warmwater_onetime(const char * value, const int8_t id) {
|
|||||||
|
|
||||||
LOG_INFO(F("Setting warm water OneTime loading %s"), v ? "on" : "off");
|
LOG_INFO(F("Setting warm water OneTime loading %s"), v ? "on" : "off");
|
||||||
if (get_toggle_fetch(EMS_TYPE_UBAParameterWWPlus)) {
|
if (get_toggle_fetch(EMS_TYPE_UBAParameterWWPlus)) {
|
||||||
write_command(EMS_TYPE_UBAFlags, 0, (v ? 0x22 : 0x02), 0xE9); // not sure if this is in flags
|
write_command(EMS_TYPE_UBAFlags, 0, (v ? 0x22 : 0x02),
|
||||||
|
0xE9); // not sure if this is in flags
|
||||||
} else {
|
} else {
|
||||||
write_command(EMS_TYPE_UBAFlags, 0, (v ? 0x22 : 0x02), 0x34);
|
write_command(EMS_TYPE_UBAFlags, 0, (v ? 0x22 : 0x02), 0x34);
|
||||||
}
|
}
|
||||||
@@ -1297,7 +984,8 @@ bool Boiler::set_warmwater_circulation(const char * value, const int8_t id) {
|
|||||||
|
|
||||||
LOG_INFO(F("Setting warm water circulation %s"), v ? "on" : "off");
|
LOG_INFO(F("Setting warm water circulation %s"), v ? "on" : "off");
|
||||||
if (get_toggle_fetch(EMS_TYPE_UBAParameterWWPlus)) {
|
if (get_toggle_fetch(EMS_TYPE_UBAParameterWWPlus)) {
|
||||||
write_command(EMS_TYPE_UBAFlags, 1, (v ? 0x22 : 0x02), 0xE9); // not sure if this is in flags
|
write_command(EMS_TYPE_UBAFlags, 1, (v ? 0x22 : 0x02),
|
||||||
|
0xE9); // not sure if this is in flags
|
||||||
} else {
|
} else {
|
||||||
write_command(EMS_TYPE_UBAFlags, 1, (v ? 0x22 : 0x02), 0x34);
|
write_command(EMS_TYPE_UBAFlags, 1, (v ? 0x22 : 0x02), 0x34);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Controller::Controller(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
|||||||
|
|
||||||
// publish HA config
|
// publish HA config
|
||||||
bool Controller::publish_ha_config() {
|
bool Controller::publish_ha_config() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace emsesp
|
} // namespace emsesp
|
||||||
@@ -30,7 +30,7 @@ Gateway::Gateway(uint8_t device_type, uint8_t device_id, uint8_t product_id, con
|
|||||||
|
|
||||||
// publish HA config
|
// publish HA config
|
||||||
bool Gateway::publish_ha_config() {
|
bool Gateway::publish_ha_config() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace emsesp
|
} // namespace emsesp
|
||||||
@@ -30,7 +30,7 @@ Generic::Generic(uint8_t device_type, uint8_t device_id, uint8_t product_id, con
|
|||||||
|
|
||||||
// publish HA config
|
// publish HA config
|
||||||
bool Generic::publish_ha_config() {
|
bool Generic::publish_ha_config() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace emsesp
|
} // namespace emsesp
|
||||||
@@ -33,10 +33,8 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
register_telegram_type(0x047B, F("HP2"), true, [&](std::shared_ptr<const Telegram> t) { process_HPMonitor2(t); });
|
register_telegram_type(0x047B, F("HP2"), true, [&](std::shared_ptr<const Telegram> t) { process_HPMonitor2(t); });
|
||||||
|
|
||||||
// device values
|
// device values
|
||||||
register_device_value(
|
register_device_value(TAG_NONE, &airHumidity_, DeviceValueType::UINT, FL_(div2), F("airHumidity"), F("Relative air humidity"), DeviceValueUOM::NONE);
|
||||||
DeviceValueTAG::TAG_NONE, &airHumidity_, DeviceValueType::UINT, FL_(div2), F("airHumidity"), F("Relative air humidity"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &dewTemperature_, DeviceValueType::UINT, nullptr, F("dewTemperature"), F("Dew point temperature"), DeviceValueUOM::NONE);
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_NONE, &dewTemperature_, DeviceValueType::UINT, nullptr, F("dewTemperature"), F("Dew point temperature"), DeviceValueUOM::NONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// publish HA config
|
// publish HA config
|
||||||
|
|||||||
@@ -31,14 +31,10 @@ Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const s
|
|||||||
if (flags == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
|
if (flags == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
|
||||||
if (device_id <= 0x27) {
|
if (device_id <= 0x27) {
|
||||||
// telegram handlers 0x20 - 0x27 for HC
|
// telegram handlers 0x20 - 0x27 for HC
|
||||||
register_telegram_type(device_id - 0x20 + 0x02D7, F("MMPLUSStatusMessage_HC"), true, [&](std::shared_ptr<const Telegram> t) {
|
register_telegram_type(device_id - 0x20 + 0x02D7, F("MMPLUSStatusMessage_HC"), true, [&](std::shared_ptr<const Telegram> t) { process_MMPLUSStatusMessage_HC(t); });
|
||||||
process_MMPLUSStatusMessage_HC(t);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
// telegram handlers for warm water/DHW 0x28, 0x29
|
// telegram handlers for warm water/DHW 0x28, 0x29
|
||||||
register_telegram_type(device_id - 0x28 + 0x0331, F("MMPLUSStatusMessage_WWC"), true, [&](std::shared_ptr<const Telegram> t) {
|
register_telegram_type(device_id - 0x28 + 0x0331, F("MMPLUSStatusMessage_WWC"), true, [&](std::shared_ptr<const Telegram> t) { process_MMPLUSStatusMessage_WWC(t); });
|
||||||
process_MMPLUSStatusMessage_WWC(t);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +49,6 @@ Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const s
|
|||||||
if (flags == EMSdevice::EMS_DEVICE_FLAG_IPM) {
|
if (flags == EMSdevice::EMS_DEVICE_FLAG_IPM) {
|
||||||
register_telegram_type(0x010C, F("IPMSetMessage"), false, [&](std::shared_ptr<const Telegram> t) { process_IPMStatusMessage(t); });
|
register_telegram_type(0x010C, F("IPMSetMessage"), false, [&](std::shared_ptr<const Telegram> t) { process_IPMStatusMessage(t); });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -68,11 +63,11 @@ void Mixer::register_values(const Type type, uint16_t hc) {
|
|||||||
type_ = type;
|
type_ = type;
|
||||||
|
|
||||||
// with hc<n> or wwc<n>
|
// with hc<n> or wwc<n>
|
||||||
uint8_t tag = DeviceValueTAG::TAG_NONE;
|
uint8_t tag = TAG_NONE;
|
||||||
if (type_ == Type::HC) {
|
if (type_ == Type::HC) {
|
||||||
tag = DeviceValueTAG::TAG_HC1 + hc - 1;
|
tag = TAG_HC1 + hc - 1;
|
||||||
} else {
|
} else {
|
||||||
tag = DeviceValueTAG::TAG_WWC1 + hc - 1;
|
tag = TAG_WWC1 + hc - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
register_device_value(tag, &flowTemp_, DeviceValueType::USHORT, FL_(div10), F("flowTemp"), F("Current flow temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(tag, &flowTemp_, DeviceValueType::USHORT, FL_(div10), F("flowTemp"), F("Current flow temperature"), DeviceValueUOM::DEGREES);
|
||||||
|
|||||||
@@ -64,73 +64,29 @@ Solar::Solar(uint8_t device_type, uint8_t device_id, uint8_t product_id, const s
|
|||||||
|
|
||||||
// special case for a device_id with 0x2A where it's not actual a solar module
|
// special case for a device_id with 0x2A where it's not actual a solar module
|
||||||
if (device_id == 0x2A) {
|
if (device_id == 0x2A) {
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &type_, DeviceValueType::TEXT, nullptr, F("type"), F("Type"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &type_, DeviceValueType::TEXT, nullptr, F("type"), F("Type"), DeviceValueUOM::NONE);
|
||||||
strncpy(type_, "warm water circuit", sizeof(type_));
|
strncpy(type_, "warm water circuit", sizeof(type_));
|
||||||
}
|
}
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
register_device_value(TAG_NONE, &collectorTemp_, DeviceValueType::SHORT, FL_(div10), F("collectorTemp"), F("Collector temperature (TS1)"), DeviceValueUOM::DEGREES);
|
||||||
&collectorTemp_,
|
register_device_value(TAG_NONE, &tankBottomTemp_, DeviceValueType::SHORT, FL_(div10), F("tankBottomTemp"), F("Bottom temperature (TS2)"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueType::SHORT,
|
register_device_value(TAG_NONE, &tankBottomTemp2_, DeviceValueType::SHORT, FL_(div10), F("tankBottomTemp2"), F("Bottom temperature (TS5)"), DeviceValueUOM::DEGREES);
|
||||||
FL_(div10),
|
register_device_value(TAG_NONE, &heatExchangerTemp_, DeviceValueType::SHORT, FL_(div10), F("heatExchangerTemp"), F("Heat exchanger temperature (TS6)"), DeviceValueUOM::DEGREES);
|
||||||
F("collectorTemp"),
|
|
||||||
F("Collector temperature (TS1)"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&tankBottomTemp_,
|
|
||||||
DeviceValueType::SHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("tankBottomTemp"),
|
|
||||||
F("Bottom temperature (TS2)"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&tankBottomTemp2_,
|
|
||||||
DeviceValueType::SHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("tankBottomTemp2"),
|
|
||||||
F("Bottom temperature (TS5)"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&heatExchangerTemp_,
|
|
||||||
DeviceValueType::SHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("heatExchangerTemp"),
|
|
||||||
F("Heat exchanger temperature (TS6)"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
register_device_value(TAG_NONE, &tank1MaxTempCurrent_, DeviceValueType::UINT, nullptr, F("tank1MaxTempCurrent"), F("Maximum Tank temperature"), DeviceValueUOM::NONE);
|
||||||
&tank1MaxTempCurrent_,
|
register_device_value(TAG_NONE, &solarPumpModulation_, DeviceValueType::UINT, nullptr, F("solarPumpModulation"), F("Solar pump modulation (PS1)"), DeviceValueUOM::PERCENT);
|
||||||
DeviceValueType::UINT,
|
register_device_value(TAG_NONE, &cylinderPumpModulation_, DeviceValueType::UINT, nullptr, F("cylinderPumpModulation"), F("Cylinder pump modulation (PS5)"), DeviceValueUOM::PERCENT);
|
||||||
nullptr,
|
|
||||||
F("tank1MaxTempCurrent"),
|
|
||||||
F("Maximum Tank temperature"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&solarPumpModulation_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("solarPumpModulation"),
|
|
||||||
F("Solar pump modulation (PS1)"),
|
|
||||||
DeviceValueUOM::PERCENT);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&cylinderPumpModulation_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("cylinderPumpModulation"),
|
|
||||||
F("Cylinder pump modulation (PS5)"),
|
|
||||||
DeviceValueUOM::PERCENT);
|
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &solarPump_, DeviceValueType::BOOL, nullptr, F("solarPump"), F("Solar pump (PS1) active"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &solarPump_, DeviceValueType::BOOL, nullptr, F("solarPump"), F("Solar pump (PS1) active"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &valveStatus_, DeviceValueType::BOOL, nullptr, F("valveStatus"), F("Valve status"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &valveStatus_, DeviceValueType::BOOL, nullptr, F("valveStatus"), F("Valve status"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &tankHeated_, DeviceValueType::BOOL, nullptr, F("tankHeated"), F("Tank heated"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &tankHeated_, DeviceValueType::BOOL, nullptr, F("tankHeated"), F("Tank heated"), DeviceValueUOM::NONE);
|
||||||
register_device_value(
|
register_device_value(TAG_NONE, &collectorShutdown_, DeviceValueType::BOOL, nullptr, F("collectorShutdown"), F("Collector shutdown"), DeviceValueUOM::NONE);
|
||||||
DeviceValueTAG::TAG_NONE, &collectorShutdown_, DeviceValueType::BOOL, nullptr, F("collectorShutdown"), F("Collector shutdown"), DeviceValueUOM::NONE);
|
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &pumpWorkMin_, DeviceValueType::TIME, nullptr, F("pumpWorkMin"), F("Pump working time"), DeviceValueUOM::MINUTES);
|
register_device_value(TAG_NONE, &pumpWorkMin_, DeviceValueType::TIME, nullptr, F("pumpWorkMin"), F("Pump working time"), DeviceValueUOM::MINUTES);
|
||||||
|
|
||||||
register_device_value(
|
register_device_value(TAG_NONE, &energyLastHour_, DeviceValueType::ULONG, FL_(div10), F("energyLastHour"), F("Energy last hour"), DeviceValueUOM::WH);
|
||||||
DeviceValueTAG::TAG_NONE, &energyLastHour_, DeviceValueType::ULONG, FL_(div10), F("energyLastHour"), F("Energy last hour"), DeviceValueUOM::WH);
|
register_device_value(TAG_NONE, &energyTotal_, DeviceValueType::ULONG, FL_(div10), F("energyTotal"), F("Energy total"), DeviceValueUOM::KWH);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &energyTotal_, DeviceValueType::ULONG, FL_(div10), F("energyTotal"), F("Energy total"), DeviceValueUOM::KWH);
|
register_device_value(TAG_NONE, &energyToday_, DeviceValueType::ULONG, nullptr, F("energyToday"), F("Energy today"), DeviceValueUOM::WH);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &energyToday_, DeviceValueType::ULONG, nullptr, F("energyToday"), F("Energy today"), DeviceValueUOM::WH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// publish HA config
|
// publish HA config
|
||||||
|
|||||||
@@ -34,10 +34,9 @@ Switch::Switch(uint8_t device_type, uint8_t device_id, uint8_t product_id, const
|
|||||||
register_telegram_type(0x9D, F("WM10SetMessage"), false, [&](std::shared_ptr<const Telegram> t) { process_WM10SetMessage(t); });
|
register_telegram_type(0x9D, F("WM10SetMessage"), false, [&](std::shared_ptr<const Telegram> t) { process_WM10SetMessage(t); });
|
||||||
register_telegram_type(0x1E, F("WM10TempMessage"), false, [&](std::shared_ptr<const Telegram> t) { process_WM10TempMessage(t); });
|
register_telegram_type(0x1E, F("WM10TempMessage"), false, [&](std::shared_ptr<const Telegram> t) { process_WM10TempMessage(t); });
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &activated_, DeviceValueType::BOOL, nullptr, F("activated"), F("Activated"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &activated_, DeviceValueType::BOOL, nullptr, F("activated"), F("Activated"), DeviceValueUOM::NONE);
|
||||||
register_device_value(
|
register_device_value(TAG_NONE, &flowTemp_, DeviceValueType::USHORT, FL_(div10), F("flowTemp"), F("Current flow temperature"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueTAG::TAG_NONE, &flowTemp_, DeviceValueType::USHORT, FL_(div10), F("flowTemp"), F("Current flow temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_NONE, &status_, DeviceValueType::INT, nullptr, F("status"), F("Status"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &status_, DeviceValueType::INT, nullptr, F("status"), F("Status"), DeviceValueUOM::NONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// publish HA config
|
// publish HA config
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
|||||||
// or if its the master thermostat we defined
|
// or if its the master thermostat we defined
|
||||||
// see https://github.com/proddy/EMS-ESP/issues/362#issuecomment-629628161
|
// see https://github.com/proddy/EMS-ESP/issues/362#issuecomment-629628161
|
||||||
if ((master_thermostat == device_id)
|
if ((master_thermostat == device_id)
|
||||||
|| ((master_thermostat == EMSESP_DEFAULT_MASTER_THERMOSTAT) && (device_id < 0x19)
|
|| ((master_thermostat == EMSESP_DEFAULT_MASTER_THERMOSTAT) && (device_id < 0x19) && ((actual_master_thermostat == EMSESP_DEFAULT_MASTER_THERMOSTAT) || (device_id < actual_master_thermostat)))) {
|
||||||
&& ((actual_master_thermostat == EMSESP_DEFAULT_MASTER_THERMOSTAT) || (device_id < actual_master_thermostat)))) {
|
|
||||||
EMSESP::actual_master_thermostat(device_id);
|
EMSESP::actual_master_thermostat(device_id);
|
||||||
actual_master_thermostat = device_id;
|
actual_master_thermostat = device_id;
|
||||||
reserve_telgram_functions(25); // reserve some space for the telegram registries, to avoid memory fragmentation
|
reserve_telgram_functions(25); // reserve some space for the telegram registries, to avoid memory fragmentation
|
||||||
@@ -1893,10 +1892,7 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
|||||||
// if we know what to send and to where, go and do it
|
// if we know what to send and to where, go and do it
|
||||||
if (offset != -1) {
|
if (offset != -1) {
|
||||||
char s[10];
|
char s[10];
|
||||||
LOG_INFO(F("Setting thermostat temperature to %s for heating circuit %d, mode %s"),
|
LOG_INFO(F("Setting thermostat temperature to %s for heating circuit %d, mode %s"), Helpers::render_value(s, temperature, 2), hc->hc_num(), mode_tostring(mode).c_str());
|
||||||
Helpers::render_value(s, temperature, 2),
|
|
||||||
hc->hc_num(),
|
|
||||||
mode_tostring(mode).c_str());
|
|
||||||
|
|
||||||
// add the write command to the Tx queue. value is *2
|
// add the write command to the Tx queue. value is *2
|
||||||
// post validate is the corresponding monitor or set type IDs as they can differ per model
|
// post validate is the corresponding monitor or set type IDs as they can differ per model
|
||||||
@@ -2070,107 +2066,43 @@ void Thermostat::register_device_values() {
|
|||||||
uint8_t model = this->model();
|
uint8_t model = this->model();
|
||||||
|
|
||||||
// Common for all thermostats
|
// Common for all thermostats
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &dateTime_, DeviceValueType::TEXT, nullptr, F("dateTime"), F("Date/Time"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &dateTime_, DeviceValueType::TEXT, nullptr, F("dateTime"), F("Date/Time"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &errorCode_, DeviceValueType::TEXT, nullptr, F("errorCode"), F("Error code"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &errorCode_, DeviceValueType::TEXT, nullptr, F("errorCode"), F("Error code"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &lastCode_, DeviceValueType::TEXT, nullptr, F("lastCode"), F("Last error"), DeviceValueUOM::NONE);
|
register_device_value(TAG_NONE, &lastCode_, DeviceValueType::TEXT, nullptr, F("lastCode"), F("Last error"), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &wwTemp_, DeviceValueType::UINT, nullptr, F("wwTemp"), F("Warm water high temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_NONE, &wwTemp_, DeviceValueType::UINT, nullptr, F("wwTemp"), F("Warm water high temperature"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(
|
register_device_value(TAG_NONE, &wwTempLow_, DeviceValueType::UINT, nullptr, F("wwTempLow"), F("Warm water low temperature"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueTAG::TAG_NONE, &wwTempLow_, DeviceValueType::UINT, nullptr, F("wwTempLow"), F("Warm water low temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_NONE, &wwExtra1_, DeviceValueType::UINT, nullptr, F("wwExtra1"), F("Warm water circuit 1 extra"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &wwExtra1_, DeviceValueType::UINT, nullptr, F("wwExtra1"), F("Warm water circuit 1 extra"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_NONE, &wwExtra2_, DeviceValueType::UINT, nullptr, F("wwExtra2"), F("Warm water circuit 2 extra"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &wwExtra2_, DeviceValueType::UINT, nullptr, F("wwExtra2"), F("Warm water circuit 2 extra"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_NONE, &tempsensor1_, DeviceValueType::USHORT, FL_(div10), F("inttemp1"), F("Temperature sensor 1"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(
|
register_device_value(TAG_NONE, &tempsensor2_, DeviceValueType::USHORT, FL_(div10), F("inttemp2"), F("Temperature sensor 2"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueTAG::TAG_NONE, &tempsensor1_, DeviceValueType::USHORT, FL_(div10), F("inttemp1"), F("Temperature sensor 1"), DeviceValueUOM::DEGREES);
|
register_device_value(TAG_NONE, &ibaCalIntTemperature_, DeviceValueType::INT, FL_(div2), F("intoffset"), F("Offset int. temperature"), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(
|
register_device_value(TAG_NONE, &ibaMinExtTemperature_, DeviceValueType::INT, nullptr, F("minexttemp"), F("Min ext. temperature"),
|
||||||
DeviceValueTAG::TAG_NONE, &tempsensor2_, DeviceValueType::USHORT, FL_(div10), F("inttemp2"), F("Temperature sensor 2"), DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&ibaCalIntTemperature_,
|
|
||||||
DeviceValueType::INT,
|
|
||||||
FL_(div2),
|
|
||||||
F("intoffset"),
|
|
||||||
F("Offset int. temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&ibaMinExtTemperature_,
|
|
||||||
DeviceValueType::INT,
|
|
||||||
nullptr,
|
|
||||||
F("minexttemp"),
|
|
||||||
F("Min ext. temperature"),
|
|
||||||
DeviceValueUOM::DEGREES); // min ext temp for heating curve, in deg.
|
DeviceValueUOM::DEGREES); // min ext temp for heating curve, in deg.
|
||||||
|
|
||||||
// RC30 only
|
// RC30 only
|
||||||
if (model == EMSdevice::EMS_DEVICE_FLAG_RC30_1) {
|
if (model == EMSdevice::EMS_DEVICE_FLAG_RC30_1) {
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
register_device_value(TAG_NONE, &ibaMainDisplay_, DeviceValueType::ENUM, FL_(enum_ibaMainDisplay), F("ibaMainDisplay"), F("Display"), DeviceValueUOM::NONE);
|
||||||
&ibaMainDisplay_,
|
register_device_value(TAG_NONE, &ibaLanguage_, DeviceValueType::ENUM, FL_(enum_ibaLanguage), F("ibaLanguage"), F("Language"), DeviceValueUOM::NONE);
|
||||||
DeviceValueType::ENUM,
|
register_device_value(TAG_NONE, &ibaClockOffset_, DeviceValueType::UINT, nullptr, F("ibaClockOffset"), F("Clock offset"),
|
||||||
FL_(enum_ibaMainDisplay),
|
|
||||||
F("ibaMainDisplay"),
|
|
||||||
F("Display"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_NONE, &ibaLanguage_, DeviceValueType::ENUM, FL_(enum_ibaLanguage), F("ibaLanguage"), F("Language"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&ibaClockOffset_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("ibaClockOffset"),
|
|
||||||
F("Clock offset"),
|
|
||||||
DeviceValueUOM::NONE); // offset (in sec) to clock, 0xff=-1s, 0x02=2s
|
DeviceValueUOM::NONE); // offset (in sec) to clock, 0xff=-1s, 0x02=2s
|
||||||
}
|
}
|
||||||
|
|
||||||
// RC300 and RC100
|
// RC300 and RC100
|
||||||
if (model == EMS_DEVICE_FLAG_RC300 || model == EMS_DEVICE_FLAG_RC100) {
|
if (model == EMS_DEVICE_FLAG_RC300 || model == EMS_DEVICE_FLAG_RC100) {
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
register_device_value(TAG_NONE, &floordrystatus_, DeviceValueType::ENUM, FL_(enum_floordrystatus), F("floordry"), F("Floor drying"), DeviceValueUOM::NONE);
|
||||||
&floordrystatus_,
|
register_device_value(TAG_NONE, &dampedoutdoortemp2_, DeviceValueType::SHORT, FL_(div10), F("dampedtemp"), F("Damped outdoor temperature"), DeviceValueUOM::DEGREES);
|
||||||
DeviceValueType::ENUM,
|
register_device_value(TAG_NONE, &floordrytemp_, DeviceValueType::UINT, nullptr, F("floordrytemp"), F("Floor drying temperature"), DeviceValueUOM::DEGREES);
|
||||||
FL_(enum_floordrystatus),
|
register_device_value(TAG_NONE, &ibaBuildingType_, DeviceValueType::ENUM, FL_(enum_ibaBuildingType), F("building"), F("Building"), DeviceValueUOM::NONE);
|
||||||
F("floordry"),
|
register_device_value(TAG_NONE, &wwMode_, DeviceValueType::ENUM, FL_(enum_wwMode), F("wwmode"), F("Warm water mode"), DeviceValueUOM::NONE);
|
||||||
F("Floor drying"),
|
register_device_value(TAG_NONE, &wwCircMode_, DeviceValueType::ENUM, FL_(enum_wwCircMode), F("wwcircmode"), F("Warm water circulation mode"), DeviceValueUOM::NONE);
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&dampedoutdoortemp2_,
|
|
||||||
DeviceValueType::SHORT,
|
|
||||||
FL_(div10),
|
|
||||||
F("dampedtemp"),
|
|
||||||
F("Damped outdoor temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&floordrytemp_,
|
|
||||||
DeviceValueType::UINT,
|
|
||||||
nullptr,
|
|
||||||
F("floordrytemp"),
|
|
||||||
F("Floor drying temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_NONE, &ibaBuildingType_, DeviceValueType::ENUM, FL_(enum_ibaBuildingType), F("building"), F("Building"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &wwMode_, DeviceValueType::ENUM, FL_(enum_wwMode), F("wwmode"), F("Warm water mode"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&wwCircMode_,
|
|
||||||
DeviceValueType::ENUM,
|
|
||||||
FL_(enum_wwCircMode),
|
|
||||||
F("wwcircmode"),
|
|
||||||
F("Warm water circulation mode"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RC30 and RC35
|
// RC30 and RC35
|
||||||
if (model == EMS_DEVICE_FLAG_RC35 || model == EMS_DEVICE_FLAG_RC30_1) {
|
if (model == EMS_DEVICE_FLAG_RC35 || model == EMS_DEVICE_FLAG_RC30_1) {
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
register_device_value(TAG_NONE, &dampedoutdoortemp_, DeviceValueType::SHORT, nullptr, F("dampedtemp"), F("Damped outdoor temperature"), DeviceValueUOM::DEGREES);
|
||||||
&dampedoutdoortemp_,
|
register_device_value(TAG_NONE, &ibaBuildingType_, DeviceValueType::ENUM, FL_(enum_ibaBuildingType2), F("building"), F("Building"), DeviceValueUOM::NONE);
|
||||||
DeviceValueType::SHORT,
|
register_device_value(TAG_NONE, &wwMode_, DeviceValueType::ENUM, FL_(enum_wwMode2), F("wwmode"), F("Warm water mode"), DeviceValueUOM::NONE);
|
||||||
nullptr,
|
register_device_value(TAG_NONE, &wwCircMode_, DeviceValueType::ENUM, FL_(enum_wwCircMode2), F("wwcircmode"), F("Warm water circulation mode"), DeviceValueUOM::NONE);
|
||||||
F("dampedtemp"),
|
|
||||||
F("Damped outdoor temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(
|
|
||||||
DeviceValueTAG::TAG_NONE, &ibaBuildingType_, DeviceValueType::ENUM, FL_(enum_ibaBuildingType2), F("building"), F("Building"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE, &wwMode_, DeviceValueType::ENUM, FL_(enum_wwMode2), F("wwmode"), F("Warm water mode"), DeviceValueUOM::NONE);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_NONE,
|
|
||||||
&wwCircMode_,
|
|
||||||
DeviceValueType::ENUM,
|
|
||||||
FL_(enum_wwCircMode2),
|
|
||||||
F("wwcircmode"),
|
|
||||||
F("Warm water circulation mode"),
|
|
||||||
DeviceValueUOM::NONE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2179,7 +2111,7 @@ void Thermostat::register_device_values_hc(std::shared_ptr<emsesp::Thermostat::H
|
|||||||
uint8_t model = hc->get_model();
|
uint8_t model = hc->get_model();
|
||||||
|
|
||||||
// heating circuit
|
// heating circuit
|
||||||
uint8_t tag = DeviceValueTAG::TAG_HC1 + hc->hc_num() - 1;
|
uint8_t tag = TAG_HC1 + hc->hc_num() - 1;
|
||||||
|
|
||||||
// different logic on how temperature values are stored, depending on model
|
// different logic on how temperature values are stored, depending on model
|
||||||
const __FlashStringHelper * const * setpoint_temp_divider;
|
const __FlashStringHelper * const * setpoint_temp_divider;
|
||||||
@@ -2195,8 +2127,7 @@ void Thermostat::register_device_values_hc(std::shared_ptr<emsesp::Thermostat::H
|
|||||||
setpoint_temp_divider = FL_(div2);
|
setpoint_temp_divider = FL_(div2);
|
||||||
curr_temp_divider = FL_(div10);
|
curr_temp_divider = FL_(div10);
|
||||||
}
|
}
|
||||||
register_device_value(
|
register_device_value(tag, &hc->setpoint_roomTemp, DeviceValueType::SHORT, setpoint_temp_divider, F("seltemp"), F("Setpoint room temperature"), DeviceValueUOM::DEGREES);
|
||||||
tag, &hc->setpoint_roomTemp, DeviceValueType::SHORT, setpoint_temp_divider, F("seltemp"), F("Setpoint room temperature"), DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(tag, &hc->curr_roomTemp, DeviceValueType::SHORT, curr_temp_divider, F("currtemp"), F("Current room temperature"), DeviceValueUOM::DEGREES);
|
register_device_value(tag, &hc->curr_roomTemp, DeviceValueType::SHORT, curr_temp_divider, F("currtemp"), F("Current room temperature"), DeviceValueUOM::DEGREES);
|
||||||
|
|
||||||
// special handling for Home Assistant
|
// special handling for Home Assistant
|
||||||
@@ -2206,13 +2137,7 @@ void Thermostat::register_device_values_hc(std::shared_ptr<emsesp::Thermostat::H
|
|||||||
if (option == Mqtt::HA_Climate_Format::CURRENT) {
|
if (option == Mqtt::HA_Climate_Format::CURRENT) {
|
||||||
register_device_value(tag, &hc->curr_roomTemp, DeviceValueType::SHORT, curr_temp_divider, F("hatemp"), nullptr, DeviceValueUOM::DEGREES);
|
register_device_value(tag, &hc->curr_roomTemp, DeviceValueType::SHORT, curr_temp_divider, F("hatemp"), nullptr, DeviceValueUOM::DEGREES);
|
||||||
} else if (option == Mqtt::HA_Climate_Format::SETPOINT) {
|
} else if (option == Mqtt::HA_Climate_Format::SETPOINT) {
|
||||||
register_device_value(tag,
|
register_device_value(tag, &hc->setpoint_roomTemp, DeviceValueType::SHORT, setpoint_temp_divider, F("hatemp"), F("HA current room temperature"), DeviceValueUOM::DEGREES);
|
||||||
&hc->setpoint_roomTemp,
|
|
||||||
DeviceValueType::SHORT,
|
|
||||||
setpoint_temp_divider,
|
|
||||||
F("hatemp"),
|
|
||||||
F("HA current room temperature"),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
} else if (option == Mqtt::HA_Climate_Format::ZERO) {
|
} else if (option == Mqtt::HA_Climate_Format::ZERO) {
|
||||||
register_device_value(tag, &zero_value_, DeviceValueType::UINT, nullptr, F("hatemp"), nullptr, DeviceValueUOM::DEGREES);
|
register_device_value(tag, &zero_value_, DeviceValueType::UINT, nullptr, F("hatemp"), nullptr, DeviceValueUOM::DEGREES);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -751,14 +751,13 @@ bool EMSdevice::generate_values_json(JsonObject & root, const uint8_t tag_filter
|
|||||||
return has_value;
|
return has_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the Home Assistant configs for each value as a sensor
|
// create the Home Assistant configs for each value
|
||||||
void EMSdevice::publish_mqtt_ha_sensor() {
|
void EMSdevice::publish_mqtt_ha_sensor() {
|
||||||
// for (const auto & dv : *devicevalues_) {
|
// for (const auto & dv : *devicevalues_) {
|
||||||
for (const auto & dv : devicevalues_) {
|
for (const auto & dv : devicevalues_) {
|
||||||
Mqtt::register_mqtt_ha_sensor(dv.type, dv.tag, dv.full_name, device_type_, dv.short_name, dv.uom);
|
Mqtt::register_mqtt_ha_sensor(dv.type, dv.tag, dv.full_name, device_type_, dv.short_name, dv.uom);
|
||||||
}
|
}
|
||||||
|
|
||||||
// publish it
|
|
||||||
bool ok = publish_ha_config();
|
bool ok = publish_ha_config();
|
||||||
ha_config_done(ok); // see if it worked
|
ha_config_done(ok); // see if it worked
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,7 +220,6 @@ void System::init() {
|
|||||||
|
|
||||||
EMSESP::esp8266React.getWiFiSettingsService()->read([&](WiFiSettings & settings) { hostname(settings.hostname.c_str()); });
|
EMSESP::esp8266React.getWiFiSettingsService()->read([&](WiFiSettings & settings) { hostname(settings.hostname.c_str()); });
|
||||||
|
|
||||||
// TODO power options
|
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
// setCpuFrequencyMhz(160); // default is 240
|
// setCpuFrequencyMhz(160); // default is 240
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user