Closed njoyard closed 9 months ago
It is a tolerance issue. There are values (e.g. 578
) which are slightly out of spec/expected.
If you increase the tolerance by about 7
or more. It will match correctly.
I've tested that with your above data.
Indeed. However it's not enough to decode all messages.
I ended up changing the excess parameter, from 50us to 25us (marks are not really shorter than expected, and spaces not longer than expected) and I have yet to find a single case where the signal is not properly decoded.
Thanks!
Hi @njoyard
Could you hint at where this excess parameter is in the code? 😁 I'm trying to get my Toshiba HVAC with a similar looking remote to work with tasmota-ir. I believe it uses this library.
Thanks, Rune
Update: Nvm, found it 😊
For reference for other people:
diff --git a/src/ir_Toshiba.cpp b/src/ir_Toshiba.cpp
index c9672bca..1557f5ba 100644
--- a/src/ir_Toshiba.cpp
+++ b/src/ir_Toshiba.cpp
@@ -32,6 +32,8 @@ const uint16_t kToshibaAcZeroSpace = 490;
const uint16_t kToshibaAcMinGap = 4600; // WH-UB03NJ remote
const uint16_t kToshibaAcUsualGap = 7400; // Others
+const uint16_t kToshibaAcMarkExcess = 25;
+
using irutils::addBoolToString;
using irutils::addFanToString;
using irutils::addIntToString;
@@ -523,7 +546,7 @@ bool IRrecv::decodeToshibaAC(decode_results* results, uint16_t offset,
kToshibaAcBitMark, kToshibaAcOneSpace,
kToshibaAcBitMark, kToshibaAcZeroSpace,
kToshibaAcBitMark, kToshibaAcMinGap, true,
- _tolerance, kMarkExcess)) return false;
+ _tolerance, kToshibaAcMarkExcess)) return false;
// Compliance
if (strict) {
// Check that the checksum of the message is correct.
I have a PR cooking to add support for some features, I'll add this inside (but keeping the default 50us values, just to make it easier for people to change it)
Great, thanks!
After trying a bunch of things, I upgraded to tasmota-ir 13.x from 10.x that the Athom AR01 came with. It now reads the messages from my remote flawlessly, woho! Although I can't be sure if it's that upgrade, or if Athom had made other changes to the original firmware, I guess.
I also changed SetOption48 to 50 before the upgrade, which didn't help. I haven't changed it back yet with the upgraded firmware to check if that changes anything.
Out of curiosity, what features have you added? :)
Version/revision of the library used
v2.8.6
Describe the bug
I'm trying to understand (and ideally fix) issues decoding messages sent by my Toshiba AC remote (WH-TA12LE - not currently listed as supported).
From what I understand, apart from some specific features that generate unsupported messages (eg. weekly scheduling), this remote generates correct (ie. supported) 72 bit messages. When testing with
IRrecvDumpV2
compiled with-DDECODE_HASH -DDECODE_TOSHIBA_AC
, using the same controls repeatedly on the remote, some messages are correctly decoded while some others are not.Here is an example serial output. Those two messages have identical payloads (they were generated by repeatedly pressing the on/off button on the remote, and I'm omitting an 'off' message in between those two 'on' messages):
I was initially thinking that there could be a tolerance issue when decoding, but manually decoding the raw data using the same parameters as
IRrecv::decodeToshibaAC
does produces the same results for both messages.Here is a google sheet with the decoding, using (hopefully correct) values from
ir_Toshiba
: https://docs.google.com/spreadsheets/d/1FiUfnScaGxqL5kcyYkxIEdsQ-onuoPvEDNaQlR4xVXY/edit?usp=sharingComputing some stats from the
auto_analyse_raw_data.py
script over many messages gives the following values (ref
are values fromir_Toshiba.cpp
,dev/ref
is the std deviation from that reference):Overall unrecognized messages are spread further apart from the average but that's still minuscule compared to the 25% tolerance.
I will dig a bit more into it, but in the mean time if anyone has an idea what could be going wrong here...