Report Bugs Here

Moderator: Mmiscool

User avatar
By dom53284
#60840 Hi.

First, thank you for this fantastic project. Incredibly easy. :D

Next, i have been playing with the ir.recv.xxxx() function.

I use two of the cheap $ 1 remote from eBay, and a YS-IRTM Modul, to compare the output.

I have made this code:
Code: Select allir.recv.setup(2)
irbranch [ir_input]
wait

[ir_input]
let s = ir.recv.full()
print s
return

When i press the "OK"-button i get from YS-IRTM: (I guess that it supress the inverse command).
00FF40

From ESP i get:
d7e84b1b:UNKNOWN:32

And if i hold the button:
d7e84b1b:UNKNOWN:32
ffffffff:NEC:0
ffffffff:NEC:0
ffffffff:NEC:0
ffffffff:NEC:0

If i press the "2"-button then from the YS-IRTM i get:
00FF18

but from ESP:
3d9ae3f7:UNKNOWN:32

I believe, that the address from the sender should be equal from all buttons, just as they are from YS-IRTM. ?

If i change the code to ir.recv.dump(), then from the "OK"-button:
Unknown encoding: D7E84B1B (32 bits)
Raw (68): 8950 -4550 550 -650 550 -650 550 -650 550 -650 550 -650 550 -650 550 -650 550 -650 550 -1700 550 -1700 550 -1700 550 -1700 550 -1700 550 -1750 550 -1700 550 -1700 550 -650 550 -650 550 -650 550 -650 550 -650 550 -650 550 -1700 550 -650 550 -1700 550 -1700 550 -1700 550 -1700 550 -1700 550 -1700 550 -650 550 -1700 550
d7e84b1b

Looking at the Raw, i think it looks prette close to the output from YS.IRTM, and NEC-specs :?:

Any idea, what is wrong?


And what is the chance that there will be a ir.send.raw () function in the near future?
I plan to make a project like https://github.com/ToniA/arduino-heatpumpir but would like to get rid of the Arduino. :lol:
User avatar
By bugs
#60879 Hi,

Are you using the lastest version 3 BASIC?
I did have similar problem some months ago when the decoding done by the library produced the wrong code, as it was missing the first data bit.

I have just tried your simple code on a nodemcu with an IR detector and the correct code is shown from an NEC remote (although leading zeros are suppressed).
eg remote sends NEC 01FC6897 and the printed output is:-
1fc6897:NEC:32
ffffffff:NEC:0
ffffffff:NEC:0

The fffffff is returned by the library when the last key is repeated.
User avatar
By bugs
#60909 The decoded hex strings are obviously wrong as there are no complements - but the raw received codes look reasonable and can be decoded by hand - so the fault is in the software decode.

Just for interest - what IR receiver are you using with ESP and what supply voltage and resistor?
I found that some did not give good signals at 3.3 volt - but as your raw looks ok I don't think that is the problem.
I may be able to try an ESP-01 tomorrow.