Skip to content

Fix RTL_433 duplicate detection swallowing rapid transmissions with differing payloads - #2357

Draft
NorthernMan54 with Copilot wants to merge 2 commits into
developmentfrom
copilot/fix-rtl433-duplicate-signals
Draft

Fix RTL_433 duplicate detection swallowing rapid transmissions with differing payloads#2357
NorthernMan54 with Copilot wants to merge 2 commits into
developmentfrom
copilot/fix-rtl433-duplicate-signals

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown

isAduplicateSignal() in rtl_433_Callback() used only id + temperature_C as the dedup key, so any device lacking temperature_C (e.g. WH51 moisture sensor) would have all messages within the 3-second window silently dropped regardless of payload changes.

Changes

  • Replace id + temperature_C hash with full-payload hash — iterates all JSON fields, hashing key+value for each, so any change in sensor data produces a distinct MQTTvalue
  • Exclude volatile per-transmission fieldstime, rssi, snr, noise_floor are skipped so retransmissions of the same physical signal still deduplicate correctly
  • Order-independent accumulation — per-key hashes are summed rather than chained, avoiding sensitivity to JsonObject iteration order
  • Consistent float serialization — uses serializeJson() per value instead of .as<String>() to avoid platform-dependent float formatting differences
  • Key/value separator0xFF byte injected between key and value bytes prevents "ab"+"c" colliding with "a"+"bc"
// Before: only id + temperature_C — breaks for any sensor without temperature_C
unsigned long MQTTvalue = (int)RFrtl_433_ESPdata["id"] + round((float)RFrtl_433_ESPdata["temperature_C"]);

// After: stable hash over all non-volatile fields
unsigned long MQTTvalue = 0;
for (JsonPair kv : RFrtl_433_ESPdata) {
  // skip time, rssi, snr, noise_floor ...
  unsigned long kvHash = hash(key) + 0xFF_separator + hash(serializeJson(value));
  MQTTvalue += kvHash; // order-independent
}

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

…mperature_C

Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix RTL_433 swallowing multiple rapid transmissions Fix RTL_433 duplicate detection swallowing rapid transmissions with differing payloads Aug 19, 2026
Copilot AI requested a review from NorthernMan54 August 19, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RTL_433 swallows multiple rapid transmissions from the same device even if payload differs

2 participants