New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IDM and NetIDM support #1421
Conversation
How about merging both decoders? They seem very similar. |
yea, I was thinking about that. I'll update it now, other then that I've gone as far as I can go (and I am sick of looking for clues by reading patents) If I had a method to tell them apart they could even co-exist in the same callback, |
And maybe it would be possible to classify the decoder based on the intervals content. I theorise that the msb count will indicate clearly what mode is used. |
Might be good enough heuristic. But we need a good set of samples to see if that holds. |
Ok.... done... files merged regarding Samples, unfortunately I do not have a local source for data samples, and the samples captured with rtlamr typically need minor processing before they will be read by rtl_433 ( the rtlamr samples need to be amplified and add some leading noise else the signal will not be detected ) |
@merbanan When I merged the files I set both decoders use the same output_fields array as a superset for the fields used in both IDM and NetIDM. |
…a from same endpoint )
From my notes. (may help when reading the code): maybe able to detect the difference by looking at byte offset 19. ??
|
Can you post some output from IDM and NetIDM signals. I am convinced there is some kind of heuristic that can be used to differentiate between the types. |
@zuckschwerdt should we merge the code with the logic of emitting 2 messages? Or maybe disable both and let people enable the one they need? |
I didn't follow the IDM topic. If I understand correctly there are no false positives but (currently) there is no obvious way to decide if it's IDM or NetIDM? Then I guess it can reasonably be default enabled with both outputs, perhaps we'll discover a way to discern the two or maybe consumers do a plausibility check. |
I get the impression the rtlamr seems to do it but I do not see logic in the code to do so (unless there is sone field unseen validation ) take a look in at a comment in 1378, there is a line to a zip'ed sample file form rtlamr with attached json that where it appears to be able to differentiate the idm and netidm without duplicates my meter does not generate idm reports, I've been relying on @phrrngtn to make samples and link them to the #1378 thread |
I found these messages in the source. My theory is that if you add all the differential values together based on the 14bit vs 9 bit layout. The one with the lowest sum would be type used. The IDM message below has 3 bits set. The 9bit sum would be 3. The 14 bit sum would be more. Then the type is likely IDM. Anyway I agree with @zuckschwerdt, it is best to enable it by default. Can you do a review of the code? @evilpete can you rebase the code against the main tree? IDM: "AsynchronousCounters":0,"PowerOutageFlags":"QUgmCEEF","LastConsumptionCount":339972,"DifferentialConsumptionIntervals":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0],"TransmitTimeOffset":476,"SerialNumberCRC":60090,"PacketCRC":31799}} |
@merbanan done |
For future commits and merges please make sure the commit message is sensible, e.g. "Add LDM support". |
Ok, I get it now. The PR name will be the squash commit subject and the squash edit will be the body. That was not obvious to me before. |
Protocol support for both IDM and NetIDM
Both Protocols are functional and report the same data as rtlamr in json format.
Currently the code is unable to differentiate between the the two similar protocols thus both will respond to the same packet. As of this time.I am unable to find any documentation on how to differentiate IDM and NetIDM packets as both use identical Sync ID / Packet Type / length / App Version ID and CRC
Superfluous debugging statements have been left intact in the code incase needed in resolving the above mentioned shortcoming.
Test files samples have been submitted in pull request rtl_433_tests # 348