From 2b95a0d125d9ada5a6e35930fe309c5cdf9fd395 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Thu, 29 Apr 2021 16:19:43 +0200 Subject: [PATCH] add boiler command selburnpow, update packages --- interface/package.json | 8 ++++---- src/devices/boiler.cpp | 16 +++++++++++++++- src/devices/boiler.h | 1 + 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/interface/package.json b/interface/package.json index 591f41fc3..0726d973c 100644 --- a/interface/package.json +++ b/interface/package.json @@ -3,11 +3,11 @@ "version": "0.1.0", "private": true, "dependencies": { - "@material-ui/core": "^4.11.3", + "@material-ui/core": "^4.11.4", "@material-ui/icons": "^4.11.2", "@types/lodash": "^4.14.168", - "@types/node": "^14.14.37", - "@types/react": "^17.0.3", + "@types/node": "^15.0.1", + "@types/react": "^17.0.4", "@types/react-dom": "^17.0.3", "@types/react-material-ui-form-validator": "^2.1.0", "@types/react-router": "^5.1.13", @@ -17,7 +17,7 @@ "jwt-decode": "^3.1.2", "lodash": "^4.17.21", "mime-types": "^2.1.30", - "notistack": "^1.0.5", + "notistack": "^1.0.6", "parse-ms": "^3.0.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index facb0c586..07aa719dd 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -98,7 +98,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const register_device_value(TAG_BOILER_DATA, &heatingActive_, DeviceValueType::BOOL, nullptr, FL_(heatingActive), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA, &tapwaterActive_, DeviceValueType::BOOL, nullptr, FL_(tapwaterActive), DeviceValueUOM::NONE); register_device_value(TAG_BOILER_DATA, &selFlowTemp_, DeviceValueType::UINT, nullptr, FL_(selFlowTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_flow_temp)); - register_device_value(TAG_BOILER_DATA, &selBurnPow_, DeviceValueType::UINT, nullptr, FL_(selBurnPow), DeviceValueUOM::PERCENT); + register_device_value(TAG_BOILER_DATA, &selBurnPow_, DeviceValueType::UINT, nullptr, FL_(selBurnPow), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_burn_power)); register_device_value(TAG_BOILER_DATA, &heatingPumpMod_, DeviceValueType::UINT, nullptr, FL_(heatingPumpMod), DeviceValueUOM::PERCENT); register_device_value(TAG_BOILER_DATA, &heatingPump2Mod_, DeviceValueType::UINT, nullptr, FL_(heatingPump2Mod), DeviceValueUOM::PERCENT); register_device_value(TAG_BOILER_DATA, &outdoorTemp_, DeviceValueType::SHORT, FL_(div10), FL_(outdoorTemp), DeviceValueUOM::DEGREES); @@ -765,6 +765,20 @@ bool Boiler::set_flow_temp(const char * value, const int8_t id) { return true; } +// set selected burner power +bool Boiler::set_burn_power(const char * value, const int8_t id) { + int v = 0; + if (!Helpers::value2number(value, v)) { + LOG_WARNING(F("Set burner max. power: Invalid value")); + return false; + } + + LOG_INFO(F("Setting burner max. power to %d %"), v); + write_command(EMS_TYPE_UBASetPoints, 1, v, EMS_TYPE_UBASetPoints); + + return true; +} + // Set the warm water flow temperature offset 0x33 bool Boiler::set_wWFlowTempOffset(const char * value, const int8_t id) { int v = 0; diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 87a239192..deeb3585c 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -207,6 +207,7 @@ class Boiler : public EMSdevice { bool set_warmwater_maxpower(const char * value, const int8_t id); bool set_wWFlowTempOffset(const char * value, const int8_t id); bool set_flow_temp(const char * value, const int8_t id); + bool set_burn_power(const char * value, const int8_t id); bool set_heating_activated(const char * value, const int8_t id); bool set_heating_temp(const char * value, const int8_t id); bool set_min_power(const char * value, const int8_t id);