Page 1 of 1

TSOP4838 no data read IR

Posted: 27 Aug 2018, 18:50
by riker1
Hi
I did connect the TSOP receiver
but it does not catch and data.

What could be wrong?

thanks

running: ESP_Easy_mega-20180516_test_ESP8266_4096_VCC.bin
on wemos mini

I followed: https://www.letscontrolit.com/wiki/index.php/IR

Re: TSOP4838 no data read IR

Posted: 27 Aug 2018, 19:58
by TD-er
To what pin do you connect the receiver?
And have you selected the pull-up?
Not all pins support pull-up and for some it may be on a board which has a pull-down resistor?

Also the TSOP4838 is for 38 kHz applications. Make sure your remote uses that frequency.
From the datasheet:
The TSOP22.., TSOP48.. series devices are provided
primarily for compatibility with old AGC2 designs. New
designs should prefer the TSOP24.., TSOP44.. series
containing the newer AGC4.

Re: TSOP4838 no data read IR

Posted: 27 Aug 2018, 20:33
by riker1
Hi
I connected it to D4 with pull up.

I just tried irdump in arduino , same ir receiver, there it works

Re: TSOP4838 no data read IR

Posted: 28 Aug 2018, 09:05
by riker1
finaly I got a value, but what is this?
3775222700

would have expected something like
protocol,
data
bit
etc.

as in LIRC

Re: TSOP4838 no data read IR

Posted: 29 Aug 2018, 13:24
by TD-er
In the last update, the IR library has been updated.
This allows for a lot more devices to be decoded. Even so many you will probably have to disable the ones you don't use to get the resources manageable and some decoding functions may affect eachother. (as stated in the readme of that library)
I also moved the IR plugin to a separate build (with IR in the name).

I guess showing such a decimal value means it wasn't able to decode it properly?

Re: TSOP4838 no data read IR

Posted: 29 Aug 2018, 16:48
by riker1
hi,
do you have a exapmle output for a correct decoded IR signal?
will it be similar to IRDUMP.ino?
Thanks

Re: TSOP4838 no data read IR

Posted: 29 Aug 2018, 17:20
by TD-er
I don't have one. I just merged the pull request made by someone else.
I don't use IR myself at this moment.

Re: TSOP4838 no data read IR

Posted: 29 Aug 2018, 18:02
by Shardan
riker1 wrote: 28 Aug 2018, 09:05 finaly I got a value, but what is this?
3775222700

would have expected something like
protocol,
data
bit
etc.

as in LIRC
I didn't test the new version yet.
The older versions just give back these numbers.

Re: TSOP4838 no data read IR

Posted: 29 Aug 2018, 18:45
by riker1
I used the newest version

but do not know how to use those numbers?

Re: TSOP4838 no data read IR

Posted: 29 Aug 2018, 21:46
by Shardan
riker1 wrote: 29 Aug 2018, 18:45 I used the newest version

but do not know how to use those numbers?
Well i made that easy with my home controller (FHEM).
It's just a small program that does a

"If <number> then do <action>"

That works quite nice, easier then parsing all these Coding, length and so on parameters

Re: TSOP4838 no data read IR

Posted: 30 Aug 2018, 13:48
by riker1
Hi
I do not understand, fhem is expecting a protocol , data, bit for an irsend command.

in espeasy I think it is the same

irsend,Protocol, data, bit

so how do you phrase the

"If <number> then do <action>"

in detail?

Thanks

Re: TSOP4838 no data read IR

Posted: 30 Aug 2018, 18:16
by Shardan
riker1 wrote: 30 Aug 2018, 13:48 Hi
I do not understand, fhem is expecting a protocol , data, bit for an irsend command.

in espeasy I think it is the same

irsend,Protocol, data, bit

so how do you phrase the

"If <number> then do <action>"

in detail?

Thanks
You're mixing up sending and receiving.

For sending IR codes you need the "irsend,Protocol, data, bit" syntax.

With receiving the TSOPxxxx is just a sensor as every other sensor.
It just gives back this specific number.
As it is possible to use your own code snippets with FHEM I just tested
which number is given with which key from an old IR remote and
made some IF-THEN to start some actions from FHEM.

FHEM has it's own command if you don't want to code your own PERL code.
Check
https://fhem.de/commandref.html#DOIF
for more info.

Re: TSOP4838 no data read IR

Posted: 30 Aug 2018, 20:21
by riker1
ok understood.
thanks

Re: TSOP4838 no data read IR

Posted: 11 Sep 2018, 18:10
by oisisi
To revive this: When I use a recent binary build which includes the IR library and plugins I can see in the log that codes are received and recognized but the MQTT payload always contains "0":

Code: Select all

515390 : IR: Encoding  : NEC
Code      : 1FEA05F (32 bits)

515416 : MQTT : home/environment/esp031/irin/ir 0
I have the suspicion that there might be a bug. I'd gladly help with hunting it down.

Edit: I flashed an older version, ESPEasy_mega-20180519, and IR is working.

Re: TSOP4838 no data read IR

Posted: 12 Sep 2018, 21:13
by oisisi
Found the issue, modest pull request entered.