mathdon wrote:This is where I need help, not in implementation but in what to implement.
That is a hard question in these situations. I'm always guessing and my guess isn't going to be much better than your guess.
There is no other 40-bit "Gap" decode in DecodeIR, so I could make ANY 40-bit Gap code with a (16, -8) leadin show up as IODATA.
The first value (the 16 in that leadin) is often very badly learned, so I avoid qualifying decodes on that value unless there is no other reasonably choice. The roughly -8 part of the leadin might be good to qualify on, but it wouldn't qualify much. I expect some other 40 bit protocol we've never seen would duplicate that as well.
I'm not thrilled with casting such a wide net, but I also don't have a better idea.
Should I also check the 38k frequency and 550 base timing within 10%, say?
Checking frequency at all or checking base timing anywhere near as tight as 10% tend to be counterproductive ideas. Lots of learning is bad. Some learning devices lose the frequency info entirely. Some even lose the pulse durations and have only gap durations (some substitute 0000 for all short pulse durations). DecodeIr gets the right decode from all those flawed captures as long as the protocol has enough internal structure to be unambiguous.
I could make the two 7-bit zero bytes into OEM1 and OEM2 and make them display in the Misc field - or do so only if they are nonzero,
I'm not exactly consistent, but I try to format OEM codes and such things that are thought to be less variable than device numbers into the protocol name itself, while formatting T bits and X codes and things that are more variable than device codes (especially things more variable than function codes) into the misc field. Doing so only if they are nonzero is a good idea.
But what about the checksum? I want to check its validity but I suspect the formula could be different with nonzero OEM1 and OEM2.
If we knew the checksum formula, that is the best way to qualify the signal (distinguish it from other 40 bit codes with leadin).
But I don't think we know the formula. I can't think of a way that mixing in the device code would make the checksum more plausible, but I suspect the device code is mixed in and we just can't see it, because we've only seen one device number. The same applies to the "OEM" codes or whatever those values actually are.
Is this the sort of thing you mean? It might not be the best precognition but it would be a start.
I suggest you "cast a wide net" and decode anything with 40 bit gap structure and a leadin. Load both the "OEM" values (only if nonzero) and the checksum result (I think only if non 1) into the protocol name.
When we find IODATA with a different device or OEM code we can refine that.
When we find a different 40 bit gap with leadin protocol, we can restrict IODATA.
In each case, we would have some wrong (but probably helpful) decodes when we first discover the cases we failed to exactly predict.