Don't treat different broadcast msgs from same device as duplicate #256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a problem that I noticed recently where when some broadcast messages aren't received by my PLM and the corresponding cleanup message is received, the cleanup message is being dropped by Insteon-MQTT. Upon digging in to the code, I noticed that the Broadcast handler had been written to attempt to avoid double-handling broadcasts and their corresponding cleanup messages by dropping any cleanup messages that follow a broadcast from the same device. In the case of my i2cs devices, this meant that even if a Success Report Broadcast message from a previous button press had been received, then a cleanup message for a subsequent button press would be treated as a duplicate of the Success Report Broadcast message.
To fix, I made the Broadcast handler's duplicate check also consider whether the broadcast messages have the same command and group number.
Tests performed: (see attached test log - cleanup-fix-testing.txt)
Attachments:
cleanup-fix-testing.txt