mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
text formatting
This commit is contained in:
@@ -27,14 +27,13 @@ REGISTER_FACTORY(Controller, EMSdevice::DeviceType::CONTROLLER);
|
|||||||
MAKE_PSTR(logger_name, "controller")
|
MAKE_PSTR(logger_name, "controller")
|
||||||
uuid::log::Logger Controller::logger_{F_(logger_name), uuid::log::Facility::CONSOLE};
|
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) {
|
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
||||||
// telegram handlers
|
// telegram handlers
|
||||||
// register_telegram_type(EMS_TYPE_XX, "XX", false, std::bind(&Controller::process_XX, this, _1));
|
// register_telegram_type(EMS_TYPE_XX, "XX", false, std::bind(&Controller::process_XX, this, _1));
|
||||||
|
|
||||||
// MQTT callbacks
|
// MQTT callbacks
|
||||||
// register_mqtt_topic("cmd", std::bind(&Controller::cmd, this, _1));
|
// register_mqtt_topic("cmd", std::bind(&Controller::cmd, this, _1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller::add_context_menu() {
|
void Controller::add_context_menu() {
|
||||||
|
|||||||
@@ -155,14 +155,14 @@ void Mixing::process_MMPLUSStatusMessage_WWC(std::shared_ptr<const Telegram> tel
|
|||||||
// e.g. A0 00 FF 00 00 0C 01 00 00 00 00 00 54
|
// 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
|
// A1 00 FF 00 00 0C 02 04 00 01 1D 00 82
|
||||||
void Mixing::process_IPMStatusMessage(std::shared_ptr<const Telegram> telegram) {
|
void Mixing::process_IPMStatusMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
type_ = Type::HC;
|
type_ = Type::HC;
|
||||||
hc_ = device_id() - 0x20 + 1;
|
hc_ = device_id() - 0x20 + 1;
|
||||||
uint8_t ismixed = 0;
|
uint8_t ismixed = 0;
|
||||||
telegram->read_value(ismixed, 0); // check if circuit is active, 0-off, 1-unmixed, 2-mixed
|
telegram->read_value(ismixed, 0); // check if circuit is active, 0-off, 1-unmixed, 2-mixed
|
||||||
if (ismixed == 0) {
|
if (ismixed == 0) {
|
||||||
return;
|
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(flowTemp_, 3); // is * 10
|
||||||
telegram->read_value(flowSetTemp_, 5);
|
telegram->read_value(flowSetTemp_, 5);
|
||||||
telegram->read_value(status_, 2); // valve status
|
telegram->read_value(status_, 2); // valve status
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ void Solar::process_SM100Status(std::shared_ptr<const Telegram> telegram) {
|
|||||||
uint8_t pumpmod = pumpModulation_;
|
uint8_t pumpmod = pumpModulation_;
|
||||||
telegram->read_value(pumpModulation_, 9);
|
telegram->read_value(pumpModulation_, 9);
|
||||||
if (pumpmod == 0 && pumpModulation_ == 100) { // mask out boosts
|
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<const Telegram> telegram) {
|
|||||||
* e.g. B0 00 FF 00 00 03 32 00 00 00 00 13 00 D6 00 00 00 FB D0 F0
|
* 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<const Telegram> telegram) {
|
void Solar::process_ISM1StatusMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
telegram->read_value(collectorTemp_, 4); // Collector Temperature
|
telegram->read_value(collectorTemp_, 4); // Collector Temperature
|
||||||
telegram->read_value(bottomTemp_, 6); // Temperature Bottom of Solar Boiler
|
telegram->read_value(bottomTemp_, 6); // Temperature Bottom of Solar Boiler
|
||||||
uint16_t Wh = 0xFFFF;
|
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) {
|
if (Wh != 0xFFFF) {
|
||||||
energyLastHour_ = Wh * 10; // set to *10
|
energyLastHour_ = Wh * 10; // set to *10
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1042,9 +1042,12 @@ void Thermostat::process_IBASettings(std::shared_ptr<const Telegram> telegram) {
|
|||||||
|
|
||||||
// type 0x6F - FR10/FR50/FR100 Junkers
|
// type 0x6F - FR10/FR50/FR100 Junkers
|
||||||
void Thermostat::process_JunkersMonitor(std::shared_ptr<const Telegram> telegram) {
|
void Thermostat::process_JunkersMonitor(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
|
||||||
|
// ignore single byte telegram messages
|
||||||
if (telegram->message_length <= 1) {
|
if (telegram->message_length <= 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||||
|
|
||||||
telegram->read_value(hc->curr_roomTemp, 4); // value is * 10
|
telegram->read_value(hc->curr_roomTemp, 4); // value is * 10
|
||||||
|
|||||||
Reference in New Issue
Block a user