mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
comment changes
This commit is contained in:
@@ -31,7 +31,7 @@ Connect::Connect(uint8_t device_type, uint8_t device_id, uint8_t product_id, con
|
|||||||
// 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(&Connect::cmd, this, _1));
|
// register_mqtt_topic("topic", std::bind(&Connect::cmd, this, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Connect::add_context_menu() {
|
void Connect::add_context_menu() {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Controller::Controller(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
|||||||
// 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("topic", std::bind(&Controller::cmd, this, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller::add_context_menu() {
|
void Controller::add_context_menu() {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Gateway::Gateway(uint8_t device_type, uint8_t device_id, uint8_t product_id, con
|
|||||||
// 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(&Gateway::cmd, this, _1));
|
// register_mqtt_topic("topic", std::bind(&Gateway::cmd, this, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gateway::add_context_menu() {
|
void Gateway::add_context_menu() {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
register_telegram_type(0x042B, F("HP2"), true, std::bind(&Heatpump::process_HPMonitor2, this, _1));
|
register_telegram_type(0x042B, F("HP2"), true, std::bind(&Heatpump::process_HPMonitor2, this, _1));
|
||||||
|
|
||||||
// MQTT callbacks
|
// MQTT callbacks
|
||||||
// register_mqtt_topic("cmd", std::bind(&Heatpump::cmd, this, _1));
|
// register_mqtt_topic("topic", std::bind(&Heatpump::cmd, this, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// context submenu
|
// context submenu
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Mixing::Mixing(uint8_t device_type, uint8_t device_id, uint8_t product_id, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MQTT callbacks
|
// MQTT callbacks
|
||||||
// register_mqtt_topic("cmd", std::bind(&Mixing::cmd, this, _1));
|
// register_mqtt_topic("topic", std::bind(&Mixing::cmd, this, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// add context submenu
|
// add context submenu
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Solar::Solar(uint8_t device_type, uint8_t device_id, uint8_t product_id, const s
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MQTT callbacks
|
// MQTT callbacks
|
||||||
// register_mqtt_topic("cmd", std::bind(&Solar::cmd, this, _1));
|
// register_mqtt_topic("topic", std::bind(&Solar::cmd, this, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// context submenu
|
// context submenu
|
||||||
@@ -103,11 +103,11 @@ void Solar::publish_values() {
|
|||||||
doc["pumpmodulation"] = pumpModulation_;
|
doc["pumpmodulation"] = pumpModulation_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Helpers::hasValue(pump_, true)) {
|
if (Helpers::hasValue(pump_, VALUE_BOOL)) {
|
||||||
doc["pump"] = Helpers::render_value(s, pump_, EMS_VALUE_BOOL);
|
doc["pump"] = Helpers::render_value(s, pump_, EMS_VALUE_BOOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Helpers::hasValue(valveStatus_, true)) {
|
if (Helpers::hasValue(valveStatus_, VALUE_BOOL)) {
|
||||||
doc["valvestatus"] = Helpers::render_value(s, valveStatus_, EMS_VALUE_BOOL);
|
doc["valvestatus"] = Helpers::render_value(s, valveStatus_, EMS_VALUE_BOOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,11 +115,11 @@ void Solar::publish_values() {
|
|||||||
doc["pumpWorkMin"] = (float)pumpWorkMin_;
|
doc["pumpWorkMin"] = (float)pumpWorkMin_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Helpers::hasValue(tankHeated_, true)) {
|
if (Helpers::hasValue(tankHeated_, VALUE_BOOL)) {
|
||||||
doc["tankHeated"] = Helpers::render_value(s, tankHeated_, EMS_VALUE_BOOL);
|
doc["tankHeated"] = Helpers::render_value(s, tankHeated_, EMS_VALUE_BOOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Helpers::hasValue(collectorOnOff_, true)) {
|
if (Helpers::hasValue(collectorOnOff_, VALUE_BOOL)) {
|
||||||
doc["collectorOnOff"] = Helpers::render_value(s, collectorOnOff_, EMS_VALUE_BOOL);
|
doc["collectorOnOff"] = Helpers::render_value(s, collectorOnOff_, EMS_VALUE_BOOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Switch::Switch(uint8_t device_type, uint8_t device_id, uint8_t product_id, const
|
|||||||
// 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(&Switch::cmd, this, _1));
|
// register_mqtt_topic("topic", std::bind(&Switch::cmd, this, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Switch::add_context_menu() {
|
void Switch::add_context_menu() {
|
||||||
|
|||||||
@@ -542,9 +542,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (command == "mqtt2") {
|
if (command == "mqtt2") {
|
||||||
// Mqtt::subscribe("cmd", std::bind(&EMSESP::dummy_EMSESP::mqtt_commands, this, _1));
|
|
||||||
for (uint8_t i = 0; i < 30; i++) {
|
for (uint8_t i = 0; i < 30; i++) {
|
||||||
Mqtt::subscribe("cmd", dummy_mqtt_commands);
|
Mqtt::subscribe("topic", dummy_mqtt_commands);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user