|
|
|
|
@@ -76,10 +76,6 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|
|
|
|
Command::add_with_json(this->device_type(), F("info"), [&](const char * value, const int8_t id, JsonObject & object) {
|
|
|
|
|
return command_info(value, id, object);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (Mqtt::mqtt_format() == Mqtt::Format::HA) {
|
|
|
|
|
register_mqtt_ha_config();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// create the config topics for Home Assistant MQTT Discovery
|
|
|
|
|
@@ -117,15 +113,12 @@ void Boiler::register_mqtt_ha_config() {
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWType), this->device_type(), "wWType", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWChargeType), this->device_type(), "wWChargeType", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCircPump), this->device_type(), "wWCircPump", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCiPuMode), this->device_type(), "wWCiPuMode", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCircPumpMode), this->device_type(), "wWCircPumpMode", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCirc), this->device_type(), "wWCirc", nullptr, nullptr);
|
|
|
|
|
|
|
|
|
|
// TODO add remaining values to MQTT
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(outdoorTemp), this->device_type(), "outdoorTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCurTmp), this->device_type(), "wWCurTmp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCurTmp2), this->device_type(), "wWCurTmp2", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCurTemp), this->device_type(), "wWCurTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCurTemp2), this->device_type(), "wWCurTemp2", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCurFlow), this->device_type(), "wWCurFlow", F("l/min"), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(curFlowTemp), this->device_type(), "curFlowTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(retTemp), this->device_type(), "retTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
@@ -133,129 +126,109 @@ void Boiler::register_mqtt_ha_config() {
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(sysPress), this->device_type(), "sysPress", F_(bar), nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(boilTemp), this->device_type(), "boilTemp", F_(degrees), nullptr);
|
|
|
|
|
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(burnGas), this->device_type(), "burnGas", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(flameCurr), this->device_type(), "flameCurr", F_(uA), nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(heatPump), this->device_type(), "heatPump", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(fanWork), this->device_type(), "fanWork", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(ignWork), this->device_type(), "ignWork", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWHeat), this->device_type(), "wWHeat", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(burnGas), this->device_type(), "burnGas", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(flameCurr), this->device_type(), "flameCurr", F_(uA), nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(heatPump), this->device_type(), "heatPump", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(fanWork), this->device_type(), "fanWork", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(ignWork), this->device_type(), "ignWork", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWHeat), this->device_type(), "wWHeat", nullptr, nullptr);
|
|
|
|
|
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wwStorageTemp1), this->device_type(), "wwStorageTemp1", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wwStorageTemp2), this->device_type(), "wwStorageTemp2", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(exhaustTemp), this->device_type(), "exhaustTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWActivated), this->device_type(), "wWActivated", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWOnetime), this->device_type(), "wWOnetime", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wwStorageTemp1), this->device_type(), "wwStorageTemp1", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wwStorageTemp2), this->device_type(), "wwStorageTemp2", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(exhaustTemp), this->device_type(), "exhaustTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWActivated), this->device_type(), "wWActivated", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWOneTime), this->device_type(), "wWOneTime", nullptr, nullptr);
|
|
|
|
|
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWDisinfecting), this->device_type(), "wWDisinfecting", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWCharge), this->device_type(), "wWCharge", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWRecharge), this->device_type(), "wWRecharge", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWTempOK), this->device_type(), "wWTempOK", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWActive), this->device_type(), "wWActive", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWDisinfecting), this->device_type(), "wWDisinfecting", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWCharging), this->device_type(), "wWCharging", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWRecharging), this->device_type(), "wWRecharging", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWTempOK), this->device_type(), "wWTempOK", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWActive), this->device_type(), "wWActive", nullptr, nullptr);
|
|
|
|
|
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(heatingActivated), this->device_type(), "heatingActivated", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(heatingTemp), this->device_type(), "heatingTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(pumpModMax), this->device_type(), "pumpModMax", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(pumpModMin), this->device_type(), "pumpModMin", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(pumpDelay), this->device_type(), "pumpDelay", F_(min), nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(burnMinPeriod), this->device_type(), "burnMinPeriod", F_(min), nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(burnMinPower), this->device_type(), "burnMinPower", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(burnMaxPower), this->device_type(), "burnMaxPower", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(boilHystOn), this->device_type(), "boilHystOn", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(boilHystOff), this->device_type(), "boilHystOff", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(setFlowTemp), this->device_type(), "setFlowTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWSetPumpPower), this->device_type(), "wWSetPumpPower", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wwMixTemperature), this->device_type(), "wwMixTemperature", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wwBufferBoilerTemperature), this->device_type(), "wwBufferBoilerTemperature", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWStarts), this->device_type(), "wWStarts", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(wWWorkM), this->device_type(), "wWWorkM", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(setBurnPow), this->device_type(), "setBurnPow", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(F_(burnStarts), this->device_type(), "burnStarts", nullptr, nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(heatingActivated), this->device_type(), "heatingActivated", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(heatingTemp), this->device_type(), "heatingTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(pumpModMax), this->device_type(), "pumpModMax", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(pumpModMin), this->device_type(), "pumpModMin", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(pumpDelay), this->device_type(), "pumpDelay", F_(min), nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(burnMinPeriod), this->device_type(), "burnMinPeriod", F_(min), nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(burnMinPower), this->device_type(), "burnMinPower", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(burnMaxPower), this->device_type(), "burnMaxPower", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(boilHystOn), this->device_type(), "boilHystOn", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(boilHystOff), this->device_type(), "boilHystOff", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(setFlowTemp), this->device_type(), "setFlowTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWSetPumpPower), this->device_type(), "wWSetPumpPower", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wwMixTemperature), this->device_type(), "wwMixTemperature", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wwBufferBoilerTemperature), this->device_type(), "wwBufferBoilerTemperature", F_(degrees), F_(icontemperature));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWStarts), this->device_type(), "wWStarts", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(wWWorkM), this->device_type(), "wWWorkM", nullptr, nullptr);
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(setBurnPow), this->device_type(), "setBurnPow", F_(percent), F_(iconpercent));
|
|
|
|
|
Mqtt::register_mqtt_ha_sensor(nullptr, F_(burnStarts), this->device_type(), "burnStarts", nullptr, nullptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// send stuff to the Web UI
|
|
|
|
|
void Boiler::device_info_web(JsonArray & root) {
|
|
|
|
|
JsonObject dataElement;
|
|
|
|
|
|
|
|
|
|
render_value_json(root, "", F_(serviceCode), serviceCodeChar_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(serviceCodeNumber), serviceCode_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(tapwaterActive), tap_water_active_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(heatingActive), heating_active_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(selFlowTemp), selFlowTemp_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(curFlowTemp), curFlowTemp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(heatingActive), heatingActive_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(tapwaterActive), tapwaterActive_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(serviceCode), serviceCode_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(serviceCodeNumber), serviceCodeNumber_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWSelTemp), wWSelTemp_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(wWSetTemp), wWSetTmp_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(wWCurTmp), wWCurTmp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(wWCurTmp2), wWCurTmp2_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(wWSetTemp), wWSetTemp_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(wWDisinfectionTemp), wWDisinfectionTemp_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(selFlowTemp), selFlowTemp_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(selBurnPow), selBurnPow_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(curBurnPow), curBurnPow_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(pumpMod), pumpMod_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(pumpMod2), pumpMod2_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(wWType), wWType_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWChargeType), wWChargeType_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWCircPump), wWCircPump_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWCircPumpMode), wWCircPumpMode_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWCirc), wWCirc_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(outdoorTemp), outdoorTemp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(wWCurTemp), wWCurTemp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(wWCurTemp2), wWCurTemp2_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(wWCurFlow), wWCurFlow_, F("l/min"), 10);
|
|
|
|
|
render_value_json(root, "", F_(curFlowTemp), curFlowTemp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(retTemp), retTemp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(switchTemp), switchTemp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(sysPress), sysPress_, F_(bar), 10);
|
|
|
|
|
|
|
|
|
|
// TODO add remaining values to web
|
|
|
|
|
/*
|
|
|
|
|
render_value_json(root, "", F_(heatingActive), "heatingActive", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(tapwaterActive), "tapwaterActive", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(serviceCode), "serviceCode", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(serviceCodeNumber), "serviceCodeNumber", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWSelTemp), "wWSelTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wWSetTemp), "wWSetTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wWDisinfectionTemp), "wWDisinfectionTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(selFlowTemp), "selFlowTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(selBurnPow), "selBurnPow", F_(percent), nullptr);
|
|
|
|
|
render_value_json(root, "", F_(curBurnPow), "curBurnPow", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(pumpMod), "pumpMod", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(pumpMod2), "pumpMod2", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(wWType), "wWType", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWChargeType), "wWChargeType", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWCircPump), "wWCircPump", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWCiPuMode), "wWCiPuMode", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWCirc), "wWCirc", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(outdoorTemp), "outdoorTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wWCurTmp), "wWCurTmp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wWCurTmp2), "wWCurTmp2", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wWCurFlow), "wWCurFlow", F("l/min"), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(curFlowTemp), "curFlowTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(retTemp), "retTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(switchTemp), "switchTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(sysPress), "sysPress", F_(bar), nullptr);
|
|
|
|
|
render_value_json(root, "", F_(boilTemp), "boilTemp", F_(degrees), nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wwStorageTemp1), "wwStorageTemp1", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wwStorageTemp2), "wwStorageTemp2", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(exhaustTemp), "exhaustTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wWActivated), "wWActivated", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWOnetime), "wWOnetime", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWDisinfecting), "wWDisinfecting", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWCharge), "wWCharge", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWRecharge), "wWRecharge", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWTempOK), "wWTempOK", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWActive), "wWActive", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(burnGas), "burnGas", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(flameCurr), "flameCurr", F_(uA), nullptr);
|
|
|
|
|
render_value_json(root, "", F_(heatPump), "heatPump", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(fanWork), "fanWork", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(ignWork), "ignWork", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWHeat), "wWHeat", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(heatingActivated), "heatingActivated", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(heatingTemp), "heatingTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(pumpModMax), "pumpModMax", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(pumpModMin), "pumpModMin", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(pumpDelay), "pumpDelay", F_(min), nullptr);
|
|
|
|
|
render_value_json(root, "", F_(burnMinPeriod), "burnMinPeriod", F_(min), nullptr);
|
|
|
|
|
render_value_json(root, "", F_(burnMinPower), "burnMinPower", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(burnMaxPower), "burnMaxPower", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(boilHystOn), "boilHystOn", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(boilHystOff), "boilHystOff", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(setFlowTemp), "setFlowTemp", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wWSetPumpPower), "wWSetPumpPower", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(wwMixTemperature), "wwMixTemperature", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wwBufferBoilerTemperature), "wwBufferBoilerTemperature", F_(degrees), F_(icontemperature));
|
|
|
|
|
render_value_json(root, "", F_(wWStarts), "wWStarts", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWWorkM), "wWWorkM", nullptr, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(setBurnPow), "setBurnPow", F_(percent), F_(iconpercent));
|
|
|
|
|
render_value_json(root, "", F_(burnStarts), "burnStarts", nullptr, nullptr);
|
|
|
|
|
*/
|
|
|
|
|
render_value_json(root, "", F_(boilTemp), boilTemp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(wwStorageTemp1), wwStorageTemp1_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(wwStorageTemp2), wwStorageTemp2_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(exhaustTemp), exhaustTemp_, F_(degrees), 10);
|
|
|
|
|
render_value_json(root, "", F_(wWActivated), wWActivated_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(wWOneTime), wWOneTime_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(wWDisinfecting), wWDisinfecting_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(wWCharging), wWCharging_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(wWRecharging), wWRecharging_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(wWTempOK), wWTempOK_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(wWActive), wWActive_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(burnGas), burnGas_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(flameCurr), flameCurr_, F_(uA), 10);
|
|
|
|
|
render_value_json(root, "", F_(heatPump), heatPump_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(fanWork), fanWork_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(ignWork), ignWork_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(wWHeat), wWHeat_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(heatingActivated), heatingActivated_, nullptr, EMS_VALUE_BOOL);
|
|
|
|
|
render_value_json(root, "", F_(heatingTemp), heatingTemp_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(pumpModMax), pumpModMax_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(pumpModMin), pumpModMin_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(pumpDelay), pumpDelay_, F_(min));
|
|
|
|
|
render_value_json(root, "", F_(burnMinPeriod), burnMinPeriod_, F_(min));
|
|
|
|
|
render_value_json(root, "", F_(burnMinPower), burnMinPower_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(burnMaxPower), burnMaxPower_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(boilHystOn), boilHystOn_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(boilHystOff), boilHystOff_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(setFlowTemp), setFlowTemp_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(wWSetPumpPower), wWSetPumpPower_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(wwMixTemperature), wwMixTemperature_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(wwBufferBoilerTemperature), wwBufferBoilerTemperature_, F_(degrees));
|
|
|
|
|
render_value_json(root, "", F_(wWStarts), wWStarts_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(wWWorkM), wWWorkM_, nullptr);
|
|
|
|
|
render_value_json(root, "", F_(setBurnPow), setBurnPow_, F_(percent));
|
|
|
|
|
render_value_json(root, "", F_(burnStarts), burnStarts_, nullptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Boiler::command_info(const char * value, const int8_t id, JsonObject & output) {
|
|
|
|
|
@@ -268,13 +241,13 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
char s[10]; // for formatting strings
|
|
|
|
|
|
|
|
|
|
// Hot tap water bool
|
|
|
|
|
if (Helpers::hasValue(heating_active_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["heatingActive"] = Helpers::render_value(s, heating_active_, EMS_VALUE_BOOL);
|
|
|
|
|
if (Helpers::hasValue(heatingActive_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["heatingActive"] = Helpers::render_value(s, heatingActive_, EMS_VALUE_BOOL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Central heating bool
|
|
|
|
|
if (Helpers::hasValue(tap_water_active_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["tapwaterActive"] = Helpers::render_value(s, tap_water_active_, EMS_VALUE_BOOL);
|
|
|
|
|
if (Helpers::hasValue(tapwaterActive_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["tapwaterActive"] = Helpers::render_value(s, tapwaterActive_, EMS_VALUE_BOOL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm Water comfort setting
|
|
|
|
|
@@ -294,13 +267,13 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm Water set temperature
|
|
|
|
|
if (Helpers::hasValue(wWSetTmp_)) {
|
|
|
|
|
output["wWSetTemp"] = wWSetTmp_;
|
|
|
|
|
if (Helpers::hasValue(wWSetTemp_)) {
|
|
|
|
|
output["wWSetTemp"] = wWSetTemp_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm Water disinfection temperature
|
|
|
|
|
if (Helpers::hasValue(wWDisinfectTemp_)) {
|
|
|
|
|
output["wWDisinfectionTemp"] = wWDisinfectTemp_;
|
|
|
|
|
if (Helpers::hasValue(wWDisinfectionTemp_)) {
|
|
|
|
|
output["wWDisinfectionTemp"] = wWDisinfectionTemp_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Selected flow temperature deg
|
|
|
|
|
@@ -354,7 +327,7 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
// Warm Water circulation pump freq
|
|
|
|
|
if (Helpers::hasValue(wWCircPumpMode_)) {
|
|
|
|
|
if (wWCircPumpMode_ == 7) {
|
|
|
|
|
output["wWCiPuMode"] = F("continuous");
|
|
|
|
|
output["wWCircPumpMode"] = F("continuous");
|
|
|
|
|
} else {
|
|
|
|
|
char s[7];
|
|
|
|
|
char buffer[2];
|
|
|
|
|
@@ -362,7 +335,7 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
buffer[1] = '\0';
|
|
|
|
|
strlcpy(s, buffer, 7);
|
|
|
|
|
strlcat(s, "x3min", 7);
|
|
|
|
|
output["wWCiPuMode"] = s;
|
|
|
|
|
output["wWCircPumpMode"] = s;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -372,18 +345,18 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Outside temperature
|
|
|
|
|
if (Helpers::hasValue(extTemp_)) {
|
|
|
|
|
output["outdoorTemp"] = (float)extTemp_ / 10;
|
|
|
|
|
if (Helpers::hasValue(outdoorTemp_)) {
|
|
|
|
|
output["outdoorTemp"] = (float)outdoorTemp_ / 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm Water current temperature (intern)
|
|
|
|
|
if (Helpers::hasValue(wWCurTmp_)) {
|
|
|
|
|
output["wWCurTmp"] = (float)wWCurTmp_ / 10;
|
|
|
|
|
if (Helpers::hasValue(wWCurTemp_)) {
|
|
|
|
|
output["wWCurTemp"] = (float)wWCurTemp_ / 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm Water current temperature (extern)
|
|
|
|
|
if (Helpers::hasValue(wWCurTmp2_)) {
|
|
|
|
|
output["wWCurTmp2"] = (float)wWCurTmp2_ / 10;
|
|
|
|
|
if (Helpers::hasValue(wWCurTemp2_)) {
|
|
|
|
|
output["wWCurTemp2"] = (float)wWCurTemp2_ / 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm Water current tap water flow l/min
|
|
|
|
|
@@ -438,7 +411,7 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
|
|
|
|
|
// Warm Water one time charging bool
|
|
|
|
|
if (Helpers::hasValue(wWOneTime_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["wWOnetime"] = Helpers::render_value(s, wWOneTime_, EMS_VALUE_BOOL);
|
|
|
|
|
output["wWOneTime"] = Helpers::render_value(s, wWOneTime_, EMS_VALUE_BOOL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm Water disinfecting bool
|
|
|
|
|
@@ -448,17 +421,17 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
|
|
|
|
|
// Warm water charging bool
|
|
|
|
|
if (Helpers::hasValue(wWCharging_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["wWCharge"] = Helpers::render_value(s, wWCharging_, EMS_VALUE_BOOL);
|
|
|
|
|
output["wWCharging"] = Helpers::render_value(s, wWCharging_, EMS_VALUE_BOOL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm water recharge bool
|
|
|
|
|
if (Helpers::hasValue(wWRecharging_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["wWRecharge"] = Helpers::render_value(s, wWRecharging_, EMS_VALUE_BOOL);
|
|
|
|
|
output["wWRecharging"] = Helpers::render_value(s, wWRecharging_, EMS_VALUE_BOOL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm water temperature ok bool
|
|
|
|
|
if (Helpers::hasValue(wWTemperatureOK_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["wWTempOK"] = Helpers::render_value(s, wWTemperatureOK_, EMS_VALUE_BOOL);
|
|
|
|
|
if (Helpers::hasValue(wWTempOK_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["wWTempOK"] = Helpers::render_value(s, wWTempOK_, EMS_VALUE_BOOL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm water active bool
|
|
|
|
|
@@ -477,8 +450,8 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler pump bool
|
|
|
|
|
if (Helpers::hasValue(heatPmp_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["heatPump"] = Helpers::render_value(s, heatPmp_, EMS_VALUE_BOOL);
|
|
|
|
|
if (Helpers::hasValue(heatPump_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["heatPump"] = Helpers::render_value(s, heatPump_, EMS_VALUE_BOOL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Fan bool
|
|
|
|
|
@@ -497,23 +470,23 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// heating activated bool
|
|
|
|
|
if (Helpers::hasValue(heating_activated_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["heatingActivated"] = Helpers::render_value(s, heating_activated_, EMS_VALUE_BOOL);
|
|
|
|
|
if (Helpers::hasValue(heatingActivated_, EMS_VALUE_BOOL)) {
|
|
|
|
|
output["heatingActivated"] = Helpers::render_value(s, heatingActivated_, EMS_VALUE_BOOL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Heating temperature setting on the boiler
|
|
|
|
|
if (Helpers::hasValue(heating_temp_)) {
|
|
|
|
|
output["heatingTemp"] = heating_temp_;
|
|
|
|
|
if (Helpers::hasValue(heatingTemp_)) {
|
|
|
|
|
output["heatingTemp"] = heatingTemp_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler circuit pump modulation max power %
|
|
|
|
|
if (Helpers::hasValue(pump_mod_max_)) {
|
|
|
|
|
output["pumpModMax"] = pump_mod_max_;
|
|
|
|
|
if (Helpers::hasValue(pumpModMax_)) {
|
|
|
|
|
output["pumpModMax"] = pumpModMax_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler circuit pump modulation min power %
|
|
|
|
|
if (Helpers::hasValue(pump_mod_min_)) {
|
|
|
|
|
output["pumpModMin"] = pump_mod_min_;
|
|
|
|
|
if (Helpers::hasValue(pumpModMin_)) {
|
|
|
|
|
output["pumpModMin"] = pumpModMin_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler circuit pump delay time min
|
|
|
|
|
@@ -522,28 +495,28 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler burner min period min
|
|
|
|
|
if (Helpers::hasValue(burnPeriod_)) {
|
|
|
|
|
output["burnMinPeriod"] = burnPeriod_;
|
|
|
|
|
if (Helpers::hasValue(burnMinPeriod_)) {
|
|
|
|
|
output["burnMinPeriod"] = burnMinPeriod_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler burner min power %
|
|
|
|
|
if (Helpers::hasValue(burnPowermin_)) {
|
|
|
|
|
output["burnMinPower"] = burnPowermin_;
|
|
|
|
|
if (Helpers::hasValue(burnMinPower_)) {
|
|
|
|
|
output["burnMinPower"] = burnMinPower_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler burner max power %
|
|
|
|
|
if (Helpers::hasValue(burnPowermax_)) {
|
|
|
|
|
output["burnMaxPower"] = burnPowermax_;
|
|
|
|
|
if (Helpers::hasValue(burnMaxPower_)) {
|
|
|
|
|
output["burnMaxPower"] = burnMaxPower_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler temp hysteresis on degrees
|
|
|
|
|
if (Helpers::hasValue(boilTemp_on_)) {
|
|
|
|
|
output["boilHystOn"] = boilTemp_on_;
|
|
|
|
|
if (Helpers::hasValue(boilHystOn_)) {
|
|
|
|
|
output["boilHystOn"] = boilHystOn_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Boiler temp hysteresis off degrees
|
|
|
|
|
if (Helpers::hasValue(boilTemp_off_)) {
|
|
|
|
|
output["boilHystOff"] = boilTemp_off_;
|
|
|
|
|
if (Helpers::hasValue(boilHystOff_)) {
|
|
|
|
|
output["boilHystOff"] = boilHystOff_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set Flow temperature
|
|
|
|
|
@@ -552,8 +525,8 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm Water pump set power %
|
|
|
|
|
if (Helpers::hasValue(setWWPumpPow_)) {
|
|
|
|
|
output["wWSetPumpPower"] = setWWPumpPow_;
|
|
|
|
|
if (Helpers::hasValue(wWSetPumpPower_)) {
|
|
|
|
|
output["wWSetPumpPower"] = wWSetPumpPower_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warm water mix temperature
|
|
|
|
|
@@ -603,9 +576,9 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
|
|
|
|
|
// Service Code
|
|
|
|
|
// Service Code Number
|
|
|
|
|
if (Helpers::hasValue(serviceCode_)) {
|
|
|
|
|
output["serviceCode"] = serviceCodeChar_;
|
|
|
|
|
output["serviceCodeNumber"] = serviceCode_;
|
|
|
|
|
if (Helpers::hasValue(serviceCodeNumber_)) {
|
|
|
|
|
output["serviceCode"] = serviceCode_;
|
|
|
|
|
output["serviceCodeNumber"] = serviceCodeNumber_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (output.size());
|
|
|
|
|
@@ -613,9 +586,16 @@ bool Boiler::export_values(JsonObject & output) {
|
|
|
|
|
|
|
|
|
|
// publish values via MQTT
|
|
|
|
|
void Boiler::publish_values() {
|
|
|
|
|
StaticJsonDocument<EMSESP_MAX_JSON_SIZE_LARGE> doc;
|
|
|
|
|
// must make sure this doesn't exist 1000. Currently (2.1.0) its 950b.
|
|
|
|
|
// otheerwise use DynamicJsonDocument with max size and use .shrinkToFit()
|
|
|
|
|
StaticJsonDocument<1024> doc;
|
|
|
|
|
JsonObject output = doc.to<JsonObject>();
|
|
|
|
|
if (export_values(output)) {
|
|
|
|
|
// see if we need to send out HA MQTT Discovery topics
|
|
|
|
|
if ((Mqtt::mqtt_format() == Mqtt::Format::HA) && (!mqtt_ha_config_)) {
|
|
|
|
|
register_mqtt_ha_config();
|
|
|
|
|
mqtt_ha_config_ = true;
|
|
|
|
|
}
|
|
|
|
|
Mqtt::publish(F("boiler_data"), doc.as<JsonObject>());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -658,11 +638,11 @@ void Boiler::show_values(uuid::console::Shell & shell) {
|
|
|
|
|
print_value_json(shell, F("wWType"), F_(wWType), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWChargeType"), F_(wWChargeType), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWCircPump"), F_(wWCircPump), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWCiPuMode"), F_(wWCiPuMode), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWCircPumpMode"), F_(wWCircPumpMode), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWCirc"), F_(wWCirc), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("outdoorTemp"), F_(outdoorTemp), F_(degrees), output);
|
|
|
|
|
print_value_json(shell, F("wWCurTmp"), F_(wWCurTmp), F_(degrees), output);
|
|
|
|
|
print_value_json(shell, F("wWCurTmp2"), F_(wWCurTmp2), F_(degrees), output);
|
|
|
|
|
print_value_json(shell, F("wWCurTemp"), F_(wWCurTemp), F_(degrees), output);
|
|
|
|
|
print_value_json(shell, F("wWCurTemp2"), F_(wWCurTemp2), F_(degrees), output);
|
|
|
|
|
print_value_json(shell, F("wWCurFlow"), F_(wWCurFlow), F("l/min"), output);
|
|
|
|
|
print_value_json(shell, F("curFlowTemp"), F_(curFlowTemp), F_(degrees), output);
|
|
|
|
|
print_value_json(shell, F("retTemp"), F_(retTemp), F_(degrees), output);
|
|
|
|
|
@@ -673,10 +653,10 @@ void Boiler::show_values(uuid::console::Shell & shell) {
|
|
|
|
|
print_value_json(shell, F("wwStorageTemp2"), F_(wwStorageTemp2), F_(degrees), output);
|
|
|
|
|
print_value_json(shell, F("exhaustTemp"), F_(exhaustTemp), F_(degrees), output);
|
|
|
|
|
print_value_json(shell, F("wWActivated"), F_(wWActivated), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWOnetime"), F_(wWOnetime), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWOneTime"), F_(wWOneTime), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWDisinfecting"), F_(wWDisinfecting), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWCharge"), F_(wWCharge), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWRecharge"), F_(wWRecharge), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWCharging"), F_(wWCharging), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWRecharging"), F_(wWRecharging), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWTempOK"), F_(wWTempOK), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("wWActive"), F_(wWActive), nullptr, output);
|
|
|
|
|
print_value_json(shell, F("burnGas"), F_(burnGas), nullptr, output);
|
|
|
|
|
@@ -730,14 +710,14 @@ void Boiler::check_active() {
|
|
|
|
|
char s[7];
|
|
|
|
|
bool b = ((boilerState_ & 0x09) == 0x09);
|
|
|
|
|
Mqtt::publish(F("heating_active"), Helpers::render_boolean(s, b));
|
|
|
|
|
heating_active_ = b ? EMS_VALUE_BOOL_ON : EMS_VALUE_BOOL_OFF;
|
|
|
|
|
heatingActive_ = b ? EMS_VALUE_BOOL_ON : EMS_VALUE_BOOL_OFF;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((boilerState_ & 0x0A) != (last_boilerState & 0x0A)) {
|
|
|
|
|
char s[7];
|
|
|
|
|
bool b = ((boilerState_ & 0x0A) == 0x0A);
|
|
|
|
|
Mqtt::publish(F("tapwater_active"), Helpers::render_boolean(s, b));
|
|
|
|
|
tap_water_active_ = b ? EMS_VALUE_BOOL_ON : EMS_VALUE_BOOL_OFF;
|
|
|
|
|
tapwaterActive_ = b ? EMS_VALUE_BOOL_ON : EMS_VALUE_BOOL_OFF;
|
|
|
|
|
EMSESP::tap_water_active(b); // let EMS-ESP know, used in the Shower class
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -777,7 +757,7 @@ void Boiler::process_UBAParameterWW(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_value(wWCircPumpMode_, 7); // 1=1x3min... 6=6x3min, 7=continuous
|
|
|
|
|
changed_ |= telegram->read_value(wWChargeType_, 10); // 0 = charge pump, 0xff = 3-way valve
|
|
|
|
|
changed_ |= telegram->read_value(wWSelTemp_, 2);
|
|
|
|
|
changed_ |= telegram->read_value(wWDisinfectTemp_, 8);
|
|
|
|
|
changed_ |= telegram->read_value(wWDisinfectionTemp_, 8);
|
|
|
|
|
changed_ |= telegram->read_value(wWComfort_, 9);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -792,7 +772,7 @@ void Boiler::process_UBAMonitorFast(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_bitvalue(burnGas_, 7, 0);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(fanWork_, 7, 2);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(ignWork_, 7, 3);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(heatPmp_, 7, 5);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(heatPump_, 7, 5);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWHeat_, 7, 6);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWCirc_, 7, 7);
|
|
|
|
|
|
|
|
|
|
@@ -803,18 +783,19 @@ void Boiler::process_UBAMonitorFast(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
|
|
|
|
|
changed_ |= telegram->read_value(retTemp_, 13);
|
|
|
|
|
changed_ |= telegram->read_value(flameCurr_, 15);
|
|
|
|
|
changed_ |= telegram->read_value(serviceCode_, 20);
|
|
|
|
|
|
|
|
|
|
// system pressure. FF means missing
|
|
|
|
|
changed_ |= telegram->read_value(sysPress_, 17); // is *10
|
|
|
|
|
|
|
|
|
|
// read the service code / installation status as appears on the display
|
|
|
|
|
if ((telegram->message_length > 18) && (telegram->offset == 0)) {
|
|
|
|
|
changed_ |= telegram->read_value(serviceCodeChar_[0], 18);
|
|
|
|
|
changed_ |= telegram->read_value(serviceCodeChar_[1], 19);
|
|
|
|
|
serviceCodeChar_[2] = '\0'; // null terminate string
|
|
|
|
|
changed_ |= telegram->read_value(serviceCode_[0], 18);
|
|
|
|
|
changed_ |= telegram->read_value(serviceCode_[1], 19);
|
|
|
|
|
serviceCode_[2] = '\0'; // null terminate string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
changed_ |= telegram->read_value(serviceCodeNumber_, 20);
|
|
|
|
|
|
|
|
|
|
// at this point do a quick check to see if the hot water or heating is active
|
|
|
|
|
check_active();
|
|
|
|
|
}
|
|
|
|
|
@@ -831,16 +812,16 @@ void Boiler::process_UBATotalUptime(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
* UBAParameters - type 0x16
|
|
|
|
|
*/
|
|
|
|
|
void Boiler::process_UBAParameters(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_value(heating_activated_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(heating_temp_, 1);
|
|
|
|
|
changed_ |= telegram->read_value(burnPowermax_, 2);
|
|
|
|
|
changed_ |= telegram->read_value(burnPowermin_, 3);
|
|
|
|
|
changed_ |= telegram->read_value(boilTemp_off_, 4);
|
|
|
|
|
changed_ |= telegram->read_value(boilTemp_on_, 5);
|
|
|
|
|
changed_ |= telegram->read_value(burnPeriod_, 6);
|
|
|
|
|
changed_ |= telegram->read_value(heatingActivated_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(heatingTemp_, 1);
|
|
|
|
|
changed_ |= telegram->read_value(burnMaxPower_, 2);
|
|
|
|
|
changed_ |= telegram->read_value(burnMinPower_, 3);
|
|
|
|
|
changed_ |= telegram->read_value(boilHystOff_, 4);
|
|
|
|
|
changed_ |= telegram->read_value(boilHystOn_, 5);
|
|
|
|
|
changed_ |= telegram->read_value(burnMinPeriod_, 6);
|
|
|
|
|
changed_ |= telegram->read_value(pumpDelay_, 8);
|
|
|
|
|
changed_ |= telegram->read_value(pump_mod_max_, 9);
|
|
|
|
|
changed_ |= telegram->read_value(pump_mod_min_, 10);
|
|
|
|
|
changed_ |= telegram->read_value(pumpModMax_, 9);
|
|
|
|
|
changed_ |= telegram->read_value(pumpModMin_, 10);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@@ -848,9 +829,9 @@ void Boiler::process_UBAParameters(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
* received every 10 seconds
|
|
|
|
|
*/
|
|
|
|
|
void Boiler::process_UBAMonitorWW(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_value(wWSetTmp_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurTmp_, 1);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurTmp2_, 3);
|
|
|
|
|
changed_ |= telegram->read_value(wWSetTemp_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurTemp_, 1);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurTemp2_, 3);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurFlow_, 9);
|
|
|
|
|
changed_ |= telegram->read_value(wWType_, 8);
|
|
|
|
|
|
|
|
|
|
@@ -861,7 +842,7 @@ void Boiler::process_UBAMonitorWW(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWDisinfecting_, 5, 2);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWCharging_, 5, 3);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWRecharging_, 5, 4);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWTemperatureOK_, 5, 5);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWTempOK_, 5, 5);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWActive_, 5, 6);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -880,9 +861,9 @@ void Boiler::process_UBAMonitorFastPlus(std::shared_ptr<const Telegram> telegram
|
|
|
|
|
|
|
|
|
|
// read the service code / installation status as appears on the display
|
|
|
|
|
if ((telegram->message_length > 4) && (telegram->offset == 0)) {
|
|
|
|
|
changed_ |= telegram->read_value(serviceCodeChar_[0], 4);
|
|
|
|
|
changed_ |= telegram->read_value(serviceCodeChar_[1], 5);
|
|
|
|
|
serviceCodeChar_[2] = '\0';
|
|
|
|
|
changed_ |= telegram->read_value(serviceCode_[0], 4);
|
|
|
|
|
changed_ |= telegram->read_value(serviceCode_[1], 5);
|
|
|
|
|
serviceCode_[2] = '\0';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// at this point do a quick check to see if the hot water or heating is active
|
|
|
|
|
@@ -897,7 +878,7 @@ void Boiler::process_UBAMonitorFastPlus(std::shared_ptr<const Telegram> telegram
|
|
|
|
|
* 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 17 19 20 21 22 23 24
|
|
|
|
|
*/
|
|
|
|
|
void Boiler::process_UBAMonitorSlow(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_value(extTemp_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(outdoorTemp_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(boilTemp_, 2);
|
|
|
|
|
changed_ |= telegram->read_value(exhaustTemp_, 4);
|
|
|
|
|
changed_ |= telegram->read_value(switchTemp_, 25); // only if there is a mixing module present
|
|
|
|
|
@@ -920,7 +901,7 @@ void Boiler::process_UBAMonitorSlowPlus2(std::shared_ptr<const Telegram> telegra
|
|
|
|
|
void Boiler::process_UBAMonitorSlowPlus(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_bitvalue(fanWork_, 2, 2);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(ignWork_, 2, 3);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(heatPmp_, 2, 5);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(heatPump_, 2, 5);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWCirc_, 2, 7);
|
|
|
|
|
changed_ |= telegram->read_value(burnStarts_, 10, 3); // force to 3 bytes
|
|
|
|
|
changed_ |= telegram->read_value(burnWorkMin_, 13, 3); // force to 3 bytes
|
|
|
|
|
@@ -932,13 +913,13 @@ void Boiler::process_UBAMonitorSlowPlus(std::shared_ptr<const Telegram> telegram
|
|
|
|
|
* UBAParametersPlus - type 0xe6
|
|
|
|
|
*/
|
|
|
|
|
void Boiler::process_UBAParametersPlus(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_value(heating_activated_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(heating_temp_, 1);
|
|
|
|
|
changed_ |= telegram->read_value(burnPowermax_, 6);
|
|
|
|
|
changed_ |= telegram->read_value(burnPowermin_, 7);
|
|
|
|
|
changed_ |= telegram->read_value(boilTemp_off_, 8);
|
|
|
|
|
changed_ |= telegram->read_value(boilTemp_on_, 9);
|
|
|
|
|
changed_ |= telegram->read_value(burnPeriod_, 10);
|
|
|
|
|
changed_ |= telegram->read_value(heatingActivated_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(heatingTemp_, 1);
|
|
|
|
|
changed_ |= telegram->read_value(burnMaxPower_, 6);
|
|
|
|
|
changed_ |= telegram->read_value(burnMinPower_, 7);
|
|
|
|
|
changed_ |= telegram->read_value(boilHystOff_, 8);
|
|
|
|
|
changed_ |= telegram->read_value(boilHystOn_, 9);
|
|
|
|
|
changed_ |= telegram->read_value(burnMinPeriod_, 10);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 0xEA
|
|
|
|
|
@@ -953,9 +934,9 @@ void Boiler::process_UBAParameterWWPlus(std::shared_ptr<const Telegram> telegram
|
|
|
|
|
// 0xE9 - DHW Status
|
|
|
|
|
// e.g. 08 00 E9 00 37 01 F6 01 ED 00 00 00 00 41 3C 00 00 00 00 00 00 00 00 00 00 00 00 37 00 00 00 (CRC=77) #data=27
|
|
|
|
|
void Boiler::process_UBADHWStatus(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_value(wWSetTmp_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurTmp_, 1);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurTmp2_, 3);
|
|
|
|
|
changed_ |= telegram->read_value(wWSetTemp_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurTemp_, 1);
|
|
|
|
|
changed_ |= telegram->read_value(wWCurTemp2_, 3);
|
|
|
|
|
|
|
|
|
|
changed_ |= telegram->read_value(wWWorkM_, 17, 3); // force to 3 bytes
|
|
|
|
|
changed_ |= telegram->read_value(wWStarts_, 14, 3); // force to 3 bytes
|
|
|
|
|
@@ -964,12 +945,12 @@ void Boiler::process_UBADHWStatus(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWDisinfecting_, 12, 3);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWCharging_, 12, 4);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWRecharging_, 13, 4);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWTemperatureOK_, 13, 5);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWTempOK_, 13, 5);
|
|
|
|
|
changed_ |= telegram->read_bitvalue(wWCircPump_, 13, 2);
|
|
|
|
|
|
|
|
|
|
// changed_ |= telegram->read_value(wWActivated_, 20); // Activated is in 0xEA, this is something other 0/100%
|
|
|
|
|
changed_ |= telegram->read_value(wWSelTemp_, 10);
|
|
|
|
|
changed_ |= telegram->read_value(wWDisinfectTemp_, 9);
|
|
|
|
|
changed_ |= telegram->read_value(wWDisinfectionTemp_, 9);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 0x2A - MC10Status
|
|
|
|
|
@@ -984,14 +965,14 @@ void Boiler::process_MC10Status(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
* UBAOutdoorTemp - type 0xD1 - external temperature EMS+
|
|
|
|
|
*/
|
|
|
|
|
void Boiler::process_UBAOutdoorTemp(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_value(extTemp_, 0);
|
|
|
|
|
changed_ |= telegram->read_value(outdoorTemp_, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UBASetPoint 0x1A
|
|
|
|
|
void Boiler::process_UBASetPoints(std::shared_ptr<const Telegram> telegram) {
|
|
|
|
|
changed_ |= telegram->read_value(setFlowTemp_, 0); // boiler set temp from thermostat
|
|
|
|
|
changed_ |= telegram->read_value(setBurnPow_, 1); // max output power in %
|
|
|
|
|
changed_ |= telegram->read_value(setWWPumpPow_, 2); // ww pump speed/power?
|
|
|
|
|
changed_ |= telegram->read_value(wWSetPumpPower_, 2); // ww pump speed/power?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#pragma GCC diagnostic push
|
|
|
|
|
|