truma_inetbox: enhance device discovery with targeted queries and logging
This commit is contained in:
parent
a0837070e2
commit
4c097a576d
@ -480,22 +480,31 @@ void TrumaiNetBoxApp::trigger_discovery() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Start targeted device discovery like CP Plus does
|
||||
// Query known Truma device identifiers instead of full scan
|
||||
ESP_LOGI(TAG, "=== ENHANCED DISCOVERY SEQUENCE STARTED ===");
|
||||
|
||||
// Query identifier 0x23 - typical for Truma heaters
|
||||
std::vector<uint8_t> heater_query = {0xB2, 0x23, 0x17, 0x46, 0x01, 0x03};
|
||||
this->master_send_diag_single(0x7F, heater_query);
|
||||
// Try multiple NAD addresses - broadcast and specific
|
||||
std::vector<uint8_t> nad_addresses = {0x7F, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05};
|
||||
|
||||
// Query identifier 0x00 - LIN Product Identification
|
||||
std::vector<uint8_t> prod_id_query = {0xB2, 0x00, 0x17, 0x46, 0x00, 0x1F};
|
||||
this->master_send_diag_single(0x7F, prod_id_query);
|
||||
for (uint8_t nad : nad_addresses) {
|
||||
ESP_LOGI(TAG, "Trying NAD 0x%02X:", nad);
|
||||
|
||||
// Query identifier 0x00 with different device signatures
|
||||
std::vector<uint8_t> heater_prod_query = {0xB2, 0x00, 0x17, 0x46, 0x40, 0x03}; // Heater signature
|
||||
this->master_send_diag_single(0x7F, heater_prod_query);
|
||||
// 1. Query identifier 0x23 - from CP Plus log analysis
|
||||
std::vector<uint8_t> heater_23_query = {0xB2, 0x23, 0x17, 0x46, 0x01, 0x03};
|
||||
this->master_send_diag_single(nad, heater_23_query);
|
||||
ESP_LOGD(TAG, " -> Sent B2 23 query to NAD 0x%02X", nad);
|
||||
|
||||
ESP_LOGI(TAG, "Manual discovery triggered - sending CP Plus style discovery commands");
|
||||
// 2. Query identifier 0x00 with heater signature (17 46 40 03)
|
||||
std::vector<uint8_t> heater_00_query = {0xB2, 0x00, 0x17, 0x46, 0x40, 0x03};
|
||||
this->master_send_diag_single(nad, heater_00_query);
|
||||
ESP_LOGD(TAG, " -> Sent B2 00 heater sig query to NAD 0x%02X", nad);
|
||||
|
||||
// 3. Query identifier 0x00 with CP Plus signature (as reference)
|
||||
std::vector<uint8_t> cpplus_00_query = {0xB2, 0x00, 0x17, 0x46, 0x00, 0x04};
|
||||
this->master_send_diag_single(nad, cpplus_00_query);
|
||||
ESP_LOGD(TAG, " -> Sent B2 00 CP Plus sig query to NAD 0x%02X", nad);
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "=== DISCOVERY SEQUENCE COMPLETED - Monitor PID 3D for responses ===");
|
||||
}
|
||||
|
||||
} }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user