read fragmented telegram 0x484, #3017

This commit is contained in:
MichaelDvP
2026-04-13 14:00:12 +02:00
parent 909bea00df
commit b6c3fc5bee
3 changed files with 8 additions and 6 deletions

View File

@@ -368,7 +368,7 @@ void EMSdevice::fetch_values() {
for (const auto & tf : telegram_functions_) {
if (tf.fetch_) {
read_command(tf.telegram_type_id_);
read_command(tf.telegram_type_id_, 0, tf.length_);
}
}
}
@@ -547,8 +547,8 @@ void EMSdevice::show_mqtt_handlers(uuid::console::Shell & shell) const {
}
// register a callback function for a specific telegram type
void EMSdevice::register_telegram_type(const uint16_t telegram_type_id, const char * telegram_type_name, bool fetch, const process_function_p f) {
telegram_functions_.emplace_back(telegram_type_id, telegram_type_name, fetch, false, f);
void EMSdevice::register_telegram_type(const uint16_t telegram_type_id, const char * telegram_type_name, bool fetch, const process_function_p f, uint8_t length) {
telegram_functions_.emplace_back(telegram_type_id, telegram_type_name, fetch, false, length, f);
}
// add to device value library, also know now as a "device entity"

View File

@@ -259,7 +259,7 @@ class EMSdevice {
void setCustomizationEntity(const std::string & entity_id);
void getCustomizationEntities(std::vector<std::string> & entity_ids);
void register_telegram_type(const uint16_t telegram_type_id, const char * telegram_type_name, bool fetch, const process_function_p cb);
void register_telegram_type(const uint16_t telegram_type_id, const char * telegram_type_name, bool fetch, const process_function_p cb, uint8_t length = 0);
bool handle_telegram(std::shared_ptr<const Telegram> telegram);
std::string get_value_uom(const std::string & shortname) const;
@@ -555,13 +555,15 @@ class EMSdevice {
const char * telegram_type_name_; // e.g. RC20Message
bool fetch_; // if this type_id be queried automatically
bool received_;
uint8_t length_;
const process_function_p process_function_;
TelegramFunction(uint16_t telegram_type_id, const char * telegram_type_name, bool fetch, bool received, const process_function_p process_function)
TelegramFunction(uint16_t telegram_type_id, const char * telegram_type_name, bool fetch, bool received, uint8_t length, const process_function_p process_function)
: telegram_type_id_(telegram_type_id)
, telegram_type_name_(telegram_type_name)
, fetch_(fetch)
, received_(received)
, length_(length)
, process_function_(process_function) {
}
};

View File

@@ -83,7 +83,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_telegram_type(0x492, "HpHeaterConfig", true, MAKE_PF_CB(process_HpHeaterConfig));
register_telegram_type(0x488, "HPValve", true, MAKE_PF_CB(process_HpValve));
register_telegram_type(0x484, "HPSilentMode", true, MAKE_PF_CB(process_HpSilentMode));
register_telegram_type(0x484, "HPSilentMode", true, MAKE_PF_CB(process_HpSilentMode), 65);
register_telegram_type(0x48B, "HPPumps", true, MAKE_PF_CB(process_HpPumps));
register_telegram_type(0x491, "HPAdditionalHeater", true, MAKE_PF_CB(process_HpAdditionalHeater));
register_telegram_type(0x499, "HPDhwSettings", true, MAKE_PF_CB(process_HpDhwSettings));