diff --git a/src/devices/controller.cpp b/src/devices/controller.cpp index 37f4c0128..1a48381f3 100644 --- a/src/devices/controller.cpp +++ b/src/devices/controller.cpp @@ -27,14 +27,13 @@ REGISTER_FACTORY(Controller, EMSdevice::DeviceType::CONTROLLER); MAKE_PSTR(logger_name, "controller") uuid::log::Logger Controller::logger_{F_(logger_name), uuid::log::Facility::CONSOLE}; -Controller::Controller(uint8_t device_type, uint8_t device_id, uint8_t product_id, const std::string &version, const std::string &name, uint8_t flags, uint8_t brand) +Controller::Controller(uint8_t device_type, uint8_t device_id, uint8_t product_id, const std::string & version, const std::string & name, uint8_t flags, uint8_t brand) : EMSdevice(device_type, device_id, product_id, version, name, flags, brand) { // telegram handlers // register_telegram_type(EMS_TYPE_XX, "XX", false, std::bind(&Controller::process_XX, this, _1)); // MQTT callbacks // register_mqtt_topic("cmd", std::bind(&Controller::cmd, this, _1)); - } void Controller::add_context_menu() { diff --git a/src/devices/mixing.cpp b/src/devices/mixing.cpp index 96351ab14..09d33a1a5 100644 --- a/src/devices/mixing.cpp +++ b/src/devices/mixing.cpp @@ -155,14 +155,14 @@ void Mixing::process_MMPLUSStatusMessage_WWC(std::shared_ptr tel // e.g. A0 00 FF 00 00 0C 01 00 00 00 00 00 54 // A1 00 FF 00 00 0C 02 04 00 01 1D 00 82 void Mixing::process_IPMStatusMessage(std::shared_ptr telegram) { - type_ = Type::HC; - hc_ = device_id() - 0x20 + 1; + type_ = Type::HC; + hc_ = device_id() - 0x20 + 1; uint8_t ismixed = 0; telegram->read_value(ismixed, 0); // check if circuit is active, 0-off, 1-unmixed, 2-mixed if (ismixed == 0) { return; } - if (ismixed == 2) { // we have a mixed circuit + if (ismixed == 2) { // we have a mixed circuit telegram->read_value(flowTemp_, 3); // is * 10 telegram->read_value(flowSetTemp_, 5); telegram->read_value(status_, 2); // valve status diff --git a/src/devices/solar.cpp b/src/devices/solar.cpp index 716ee8b70..12fd8492d 100644 --- a/src/devices/solar.cpp +++ b/src/devices/solar.cpp @@ -184,7 +184,7 @@ void Solar::process_SM100Status(std::shared_ptr telegram) { uint8_t pumpmod = pumpModulation_; telegram->read_value(pumpModulation_, 9); if (pumpmod == 0 && pumpModulation_ == 100) { // mask out boosts - pumpModulation_ = 15; // set to minimum, + pumpModulation_ = 15; // set to minimum } } @@ -214,10 +214,10 @@ void Solar::process_SM100Energy(std::shared_ptr telegram) { * e.g. B0 00 FF 00 00 03 32 00 00 00 00 13 00 D6 00 00 00 FB D0 F0 */ void Solar::process_ISM1StatusMessage(std::shared_ptr telegram) { - telegram->read_value(collectorTemp_, 4); // Collector Temperature - telegram->read_value(bottomTemp_, 6); // Temperature Bottom of Solar Boiler + telegram->read_value(collectorTemp_, 4); // Collector Temperature + telegram->read_value(bottomTemp_, 6); // Temperature Bottom of Solar Boiler uint16_t Wh = 0xFFFF; - telegram->read_value(Wh, 2); // Solar Energy produced in last hour only ushort, is not * 10 + telegram->read_value(Wh, 2); // Solar Energy produced in last hour only ushort, is not * 10 if (Wh != 0xFFFF) { energyLastHour_ = Wh * 10; // set to *10 } diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 36005333a..f00d36c02 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1042,9 +1042,12 @@ void Thermostat::process_IBASettings(std::shared_ptr telegram) { // type 0x6F - FR10/FR50/FR100 Junkers void Thermostat::process_JunkersMonitor(std::shared_ptr telegram) { - if (telegram->message_length <= 1) { + + // ignore single byte telegram messages + if (telegram->message_length <= 1) { return; } + std::shared_ptr hc = heating_circuit(telegram); telegram->read_value(hc->curr_roomTemp, 4); // value is * 10