Skip to content
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

Request: Send / Receive RAW IR data for any UNKNOWN device #2116

Closed
cyberelectronics opened this issue Mar 9, 2018 · 53 comments
Closed

Request: Send / Receive RAW IR data for any UNKNOWN device #2116

cyberelectronics opened this issue Mar 9, 2018 · 53 comments

Comments

@cyberelectronics
Copy link

@cyberelectronics cyberelectronics commented Mar 9, 2018

Hi,
Using IRrecvDumpV2 example sketch from IRremoteESP8266 library, recommended by David Conran (Thanks!), I was able to find the RAW codes for my pellet stove IR remote control and with IRMQTTServer example sketch I played back succesfuly the RAW data to the pellet stove.

The question is it possible to implement this RAW data Receive/Transmit function over MQTT in Tasmota (no need for decode, just receiving/sending RAW data info over MQTT)?

Here is the RAW data:
`Extraflame Ecologica Idro Pellet Stove - IR commands

Button 1+2 = Power ON / OFF
Encoding : UNKNOWN
Code : 9EB58962 (11 bits)
Library : v2.3.3

Raw Timing[21]:

  • 6744, - 2462, + 3396, - 1624, + 884, - 788, + 912, - 1610,
  • 1722, - 814, + 858, - 1628, + 884, - 788, + 884, - 1626,
  • 1716, - 794, + 1722, - 1626, + 1726

uint16_t rawData[21] = {6744, 2462, 3396, 1624, 884, 788, 912, 1610, 1722, 814, 858, 1628, 884, 788, 884, 1626, 1716, 794, 1722, 1626, 1726}; // UNKNOWN 9EB58962

Button1 = Set Temperature Higher
Encoding : UNKNOWN
Code : 4B3AB9D1 (12 bits)
Library : v2.3.3

Raw Timing[23]:

  • 6742, - 2464, + 3420, - 1626, + 858, - 790, + 904, - 1642,
  • 1694, - 814, + 1696, - 842, + 832, - 814, + 860, - 1652,
  • 1694, - 814, + 858, - 814, + 858, - 814, + 1696

uint16_t rawData[23] = {6742, 2464, 3420, 1626, 858, 790, 904, 1642, 1694, 814, 1696, 842, 832, 814, 860, 1652, 1694, 814, 858, 814, 858, 814, 1696}; // UNKNOWN 4B3AB9D1

Button2 = Set Power Higher
Encoding : UNKNOWN
Code : 2B890461 (10 bits)
Library : v2.3.3

Raw Timing[19]:

  • 6796, - 2462, + 3394, - 1626, + 910, - 762, + 886, - 1634,
  • 4232, - 788, + 884, - 790, + 886, - 1624, + 3396, - 788,
  • 884, - 790, + 1722

uint16_t rawData[19] = {6796, 2462, 3394, 1626, 910, 762, 886, 1634, 4232, 788, 884, 790, 886, 1624, 3396, 788, 884, 790, 1722}; // UNKNOWN 2B890461

Button3 = Set Temperature Lower
Encoding : UNKNOWN
Code : 3BEE891B (9 bits)
Library : v2.3.3

Raw Timing[17]:

  • 6218, - 2436, + 3396, - 1624, + 912, - 760, + 912, - 1610,
  • 3398, - 1624, + 912, - 762, + 912, - 1598, + 4236, - 1624,
  • 1746

uint16_t rawData[17] = {6218, 2436, 3396, 1624, 912, 760, 912, 1610, 3398, 1624, 912, 762, 912, 1598, 4236, 1624, 1746}; // UNKNOWN 3BEE891B

Button4 = Set Power Lower
Encoding : UNKNOWN
Code : BD1A8437 (11 bits)
Library : v2.3.3

Raw Timing[21]:

  • 6800, - 2462, + 3396, - 1626, + 884, - 788, + 888, - 1634,
  • 2558, - 790, + 884, - 786, + 886, - 788, + 884, - 1626,
  • 2560, - 1624, + 884, - 788, + 1722

uint16_t rawData[21] = {6800, 2462, 3396, 1626, 884, 788, 888, 1634, 2558, 790, 884, 786, 886, 788, 884, 1626, 2560, 1624, 884, 788, 1722}; // UNKNOWN BD1A8437
`
Thank you!

@cyberelectronics cyberelectronics changed the title Request: Send / Receive RAW IR data for any device Request: Send / Receive RAW IR data for any UNKNOWN device Mar 9, 2018
@arendst arendst added the enhancement label Mar 9, 2018
@arendst

This comment has been minimized.

Copy link
Owner

@arendst arendst commented Mar 10, 2018

It would have to be a special compile option as it uses an extra buffer during ir receive.

Considering....

@OTrumpf

This comment has been minimized.

Copy link

@OTrumpf OTrumpf commented Mar 17, 2018

+1 .... for an old iRobot Roomba cleaner which could be started via Alexa + OpenHAB + Tasmota-IR-Device.

@cyberelectronics

This comment has been minimized.

Copy link
Author

@cyberelectronics cyberelectronics commented Mar 19, 2018

We found a temporary solution :) .
My friend implemented the IRMQTTServer sketch protocols in the webapp, so now we can create/execute IR RAW codes.
The only problem is we need to use a separate device with IRrecvDumpV2 sketch on it (serial), to be able to read/learn the IR RAW codes. (example at 7:40)
Both, reading and sending RAW codes using Tasmota, would be the best solution!
https://youtu.be/Q5JDlyIvATc

@jnt2007

This comment has been minimized.

Copy link

@jnt2007 jnt2007 commented Jul 24, 2018

+1 it would be useful for my Samsung AC. When I get IR from remote control I can see only encoded info
00:00:14 IRR: RawLen 74, Bits 37, Value 3FFF4B54, Decode -292978525
00:00:15 IRR: RawLen 74, Bits 37, Value 3FFF4B54, Decode 961051959

So I haven't any idea how to send this command via Tasmota IRsend...

@jsmath

This comment has been minimized.

Copy link

@jsmath jsmath commented Sep 22, 2018

I would simply like the ability to send raw data using the IRSend command. It is possible to get the raw receive data by loading and running the "IRrecvDumpV2.ino" Arduino project (part of same IRremoteESP8266 lib that Tasmota uses). See my example serial output below. I can then copy the "rawData[87]" array data that is output into the "IRsendDemo.ino" Arduino project (I also changed the "irsend.sendRaw(rawData, 67, 38);" line in the example so 67 is replaced with my array size.. 87 in my case). Then, loading and running the IRSendDemo, I am able to send my IR command correctly!

The question is, how do I convert this raw data to a command that I can send with Tasmota? The IRsend command requires a protocol to be specified, but in my case I would like to just send raw data since the protocol is unknown. Also, I believe I need to send 44 bits, whereas the IRSend command seems to limit at 32 bits, at least according to the documentation. (I was also able to send two 22 bit commands back to back which worked since it was a repeating command sequence).

Hopefully at least sending raw IR data can be added as an officially supported feature!

Serial output from "IRrecvDumpV2.ino":
Timestamp : 000131.050
Encoding : UNKNOWN
Code : FFBBD42F (44 bits)
Not Mitsu AC.
Library : v2.5.0

Raw Timing[87]:

  • 4440, - 4524, + 456, - 1558, + 454, - 550, + 456, - 550,
  • 454, - 552, + 454, - 550, + 454, - 554, + 454, - 550,
  • 454, - 552, + 454, - 552, + 454, - 1560, + 456, - 550,
  • 454, - 552, + 452, - 1560, + 454, - 1558, + 456, - 1558,
  • 454, - 1558, + 456, - 1558, + 454, - 1558, + 410, - 596,
  • 454, - 552, + 454, - 22964, + 4440, - 4524, + 454, - 1560,
  • 454, - 550, + 454, - 552, + 452, - 552, + 452, - 552,
  • 454, - 550, + 454, - 550, + 454, - 552, + 454, - 552,
  • 408, - 1602, + 454, - 552, + 454, - 552, + 454, - 1558,
  • 456, - 1560, + 454, - 1558, + 456, - 1560, + 454, - 1558,
  • 454, - 1558, + 454, - 552, + 452, - 552, + 452

uint16_t rawData[87] = {4440, 4524, 456, 1558, 454, 550, 456, 550, 454, 552, 454, 550, 454, 554, 454, 550, 454, 552, 454, 552, 454, 1560, 456, 550, 454, 552, 452, 1560, 454, 1558, 456, 1558, 454, 1558, 456, 1558, 454, 1558, 410, 596, 454, 552, 454, 22964, 4440, 4524, 454, 1560, 454, 550, 454, 552, 452, 552, 452, 552, 454, 550, 454, 550, 454, 552, 454, 552, 408, 1602, 454, 552, 454, 552, 454, 1558, 456, 1560, 454, 1558, 456, 1560, 454, 1558, 454, 1558, 454, 552, 452, 552, 452}; // UNKNOWN FFBBD42F

@jsmath

This comment has been minimized.

Copy link

@jsmath jsmath commented Sep 22, 2018

For anyone interested in hacking the code to send their own raw IR commands, it is pretty easy (once you have the rawData array (see example array in my previous post). I just added the following "case 0:" statement to the IRSendCommand function (in xdrv_05_irremote.ino) after the line "switch (protocol_code) {":
case 0: //UNKNOWN
irsend->sendRaw(rawData, 87, 38); break;

You also need to define the rawData array elsewhere in the code and set "87" to the correct size. Here is an example IRSend call (the values for "bits" and "data" aren't used, but these values could be used in the code to select a different rawData array and send different IR commands):

IRSend {"protocol": "UNKNOWN", "bits": 44, "data": "0"}

@jnt2007

This comment has been minimized.

Copy link

@jnt2007 jnt2007 commented Sep 23, 2018

@jsmath this it pretty simple! Open a pull request for adding this to the official build, I think that is really useful feature!

In case of using RAW data for AC remote I have complex solution on ESP-01. I complete IRMQTTServer with IRrecvDumpV2. Easy and simple :)

@OTrumpf

This comment has been minimized.

Copy link

@OTrumpf OTrumpf commented Oct 10, 2018

Perhaps sending the RAW IR data as JSON is a great possibility to keep the code free of individual RAW commands!
See: Github: ESP8266-HTTP-IR-Blaster --> JSON Scripting

@nosaj66au

This comment has been minimized.

Copy link

@nosaj66au nosaj66au commented Oct 31, 2018

This could also be used for unknown RF Transmissions not just IR. Would be great in a send as a JSON packet.

Jason

@dr-apple

This comment has been minimized.

Copy link

@dr-apple dr-apple commented Nov 8, 2018

uint16_t hz=38;

case 0: //UNKNOWN
irsend->sendRaw(data, sizeof(data), hz);break;

don't work.

xdrv_05_irremote:324:53: error: invalid conversion from 'uint32_t {aka unsigned int}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive]
irsend->sendRaw(data, sizeof(data), hz);

@Gompka

This comment has been minimized.

Copy link

@Gompka Gompka commented Nov 13, 2018

This feature would also help me greatly, both my dyson fan and electric fireplace require raw data to work.

@Jason2866

This comment has been minimized.

Copy link
Contributor

@Jason2866 Jason2866 commented Nov 16, 2018

This feature would be nice, i have the need for too.

arendst added a commit that referenced this issue Nov 21, 2018
 * Add command SetOption58 0/1 to enable IR raw data info in JSON message (#2116)
 * Add command IRSend <frequency>|0,<rawdata1>,<rawdata2>,.. to allow raw data transmission (#2116)
@arendst

This comment has been minimized.

Copy link
Owner

@arendst arendst commented Nov 21, 2018

How to use IR Raw data receive info:
Control output of IR raw data to JSON message with command SetOption58 1.
The received JSON message could look like this:

{"IrReceived":{"Protocol":"RC5","Bits":12,"Data":"803","RawData":[932,838,932,856,1772,892,908,842,906,864,906,846,904,922,910,840,908,900,902,850,910,1774,928,842,812],"RawDataInfo":[25,25,0]}}

where the raw data is ready to be send but WITHOUT the IR frequency as noted below.
RawDataInfo consists of three values.

  • The first value provides the number of packets in the libraries receive buffer limited by define IR_RCV_BUFFER_SIZE in file my_user_config.h.
  • The second number contains the number of packets in the JSON message limited by the allowable number of characters in the JSON message.
  • The third number is either a 0 if the libraries buffer is not overflowed or 1 if the buffer is overflowed.

So a correct JSON message would return two equal numbers followed by a 0 as can be seen in the message above.

How to send IR Raw data:
The use a JSON parameter option would take too much resources while sending raw data so I implemented basic IRSend raw data parameters only.
To send IR Raw data the program needs to know the IR frequency and the raw data to send. So the parameters to send raw data ALWAYS needs to start with either a 0, meaning 38kHz IR signal or the wanted IR frequency.
A complete IRSend Raw data command line would look like this:

irsend 0,932,838,932,856,1772,892,908,842,906,864,906,846,904,922,910,840,908,900,902,850,910,1774,928,842,812

where the program will replace the first 0 by 38000Hz IR frequency.

@Gompka

This comment has been minimized.

Copy link

@Gompka Gompka commented Nov 21, 2018

Thank you very much for implementing this, is there a limit to the length of the raw data? I have a raw data string that is 140 numbers long.

@arendst

This comment has been minimized.

Copy link
Owner

@arendst arendst commented Nov 21, 2018

Yes there is a default limit of 100. This can be changed by define IR_RCV_BUFFER_SIZE in my_user_config.h and when you recompile you are using more memory with a larger buffer.

@ascillato2 ascillato2 added fixed and removed work in progress labels Nov 21, 2018
@ascillato2

This comment has been minimized.

Copy link
Collaborator

@ascillato2 ascillato2 commented Nov 21, 2018

Closing as the request has been added.

Thanks!!!!!

@ascillato2 ascillato2 closed this Nov 21, 2018
@sheppy99

This comment has been minimized.

Copy link

@sheppy99 sheppy99 commented Dec 1, 2018

This string won't even send from a command prompt so I think I need to change whatever buffer that uses too. Thanks for the location of #define MQTT_MAX_PACKET_SIZE

@sheppy99

This comment has been minimized.

Copy link

@sheppy99 sheppy99 commented Dec 2, 2018

I've changed IR_RCV_BUFFER_SIZE in my_user_config.h to 700 which now allows me to receive the 317 bit message, but I can't send the full array from the command window. and the "IrReceived" message stops half way through it with ....} on the end.
Is there a way around these 2 problems?

@kimnnguu204

This comment has been minimized.

Copy link

@kimnnguu204 kimnnguu204 commented Dec 2, 2018

I'm using version 6.3.0..14 to decode my AC Daikin remote :
this is the log i saw on console:

14:49:59 MQT: tele/sonoff/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":6,"Data":"B3E2CB06","RawData":[436,458,410,434,434,430,438,456,412,456,412],"RawDataInfo":[11,11,0]}}
14:49:59 IRR: RawLen 253, Overflow 0, Bits 126, Value A9E81078, Decode 0
14:50:00 IRR: RawLen 12, Overflow 0, Bits 6, Value B3E2CB06, Decode 0
14:50:01 MQT: tele/sonoff/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":6,"Data":"B3E2CB06","RawData":[438,456,436,432,436,432,412,456,412,456,412],"RawDataInfo":[11,11,0]}}
14:50:01 IRR: RawLen 296, Overflow 0, Bits 148, Value 150A6533, Decode 0
14:50:03 IRR: RawLen 12, Overflow 0, Bits 6, Value B3E2CB06, Decode 0
14:50:03 MQT: tele/sonoff/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":6,"Data":"B3E2CB06","RawData":[434,434,436,434,434,434,436,434,434,434,434],"RawDataInfo":[11,11,0]}}
14:50:03 IRR: RawLen 268, Overflow 0, Bits 134, Value A5A8FA9D, Decode 0
14:50:04 IRR: RawLen 12, Overflow 0, Bits 6, Value B3E2CB06, Decode 0
14:50:04 MQT: tele/sonoff/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":6,"Data":"B3E2CB06","RawData":[456,414,438,430,438,430,438,366,502,430,438],"RawDataInfo":[11,11,0]}}
14:50:04 IRR: RawLen 154, Overflow 0, Bits 77, Value 375B5577, Decode 0
14:50:20 IRR: RawLen 12, Overflow 0, Bits 6, Value B3E2CB06, Decode 0
14:50:20 MQT: tele/sonoff/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":6,"Data":"B3E2CB06","RawData":[462,432,412,456,412,456,460,408,412,458,412],"RawDataInfo":[11,11,0]}}
14:50:20 IRR: RawLen 158, Overflow 0, Bits 79, Value A101D201, Decode 0
14:50:22 IRR: RawLen 12, Overflow 0, Bits 6, Value B3E2CB06, Decode 0
14:50:22 MQT: tele/sonoff/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":6,"Data":"B3E2CB06","RawData":[438,456,412,458,410,458,412,456,412,460,410],"RawDataInfo":[11,11,0]}}
14:50:22 IRR: RawLen 282, Overflow 0, Bits 141, Value 07140A96, Decode 0

i tried to send it on console but it doesn't work.

this is my configure:
#define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k3 code, 0k3 mem, 48 iram)
#define USE_IR_HVAC // Support for HVAC (Toshiba, Mitsubishi and LG) system using IR (+3k5 code)
#define USE_IR_RECEIVE // Support for IR receiver (+7k2 code, 264 iram)
#define IR_RCV_BUFFER_SIZE 700 // Max number of packets allowed in capture buffer (default 100 (*2 bytes ram))
#define IR_RCV_TIMEOUT 15 // Number of milli-Seconds of no-more-data before we consider a message ended (default 15)
#define IR_RCV_MIN_UNKNOWN_SIZE 6

how to make it work :)

@ceaswaran

This comment has been minimized.

Copy link

@ceaswaran ceaswaran commented Dec 22, 2018

Yes there is a default limit of 100. This can be changed by define IR_RCV_BUFFER_SIZE in my_user_config.h and when you recompile you are using more memory with a larger buffer.

can we have the IR_RCV_BUFFER_SIZE increased ,bin file

@Jason2866

This comment has been minimized.

Copy link
Contributor

@Jason2866 Jason2866 commented Dec 22, 2018

No, because it needs to much space from the rare flash space.
For this needs you need to self compile.

@ascillato

This comment has been minimized.

Copy link
Contributor

@ascillato ascillato commented Dec 22, 2018

For your tests would be better and faster that you set up your build environment so you can perform several tests and find the right set of features for your use case.

You can find in the wiki the step to step fo compiling Tasmota by yourself.

@ilya89vet

This comment has been minimized.

Copy link

@ilya89vet ilya89vet commented Dec 23, 2018

Is there any way to turn it off ? I have the entire log covered with these messages!
Also inexplicably turns on the fourth relay which I have hanging on GPIO04
sonoff
`

@ceaswaran

This comment has been minimized.

Copy link

@ceaswaran ceaswaran commented Dec 24, 2018

Even after changing IR_RCV_BUFFER_SIZE to 1000 (from 100) & compiling Tasmota. I am not able to get the RAW Data fully.

19:07:25 MQT: tele/sonoffir/RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":114,"Data":2896510163,"RawData":[3788,1448,622,1136,616,1138,592,442,590,442,614,418,590,1160,618,418,612,418,622,1134,592,1054,726,416,614,1090,664,452,580,414,616,1138,616,1136,620,416,616,1136,618,1136,618,416,616,454,580,1134,618,414,618,414,620,1136,616,454,580,414,616,416,618,414,618,414,618,414,616,414,620,452,580,416,614,416,616,418,614,416,616,452,580,452,578,418,620,416,616,414,616,416,616,416,616,418,616,1134,618,416,616,418,618, ...

Dot dot Dot at the end.

Is there a work aroud to get the remaning Raw data fully???

@ilya89vet

This comment has been minimized.

Copy link

@ilya89vet ilya89vet commented Dec 24, 2018

Есть ли способ отключить его ? У меня весь журнал покрыт этими сообщениями!
Также необъяснимо включается четвертое реле, которое у меня висит на GPIO04
сонофф
`

I do not know correctly or not, but I increased value of parameter IR_RCV_MIN_UNKNOWN_SIZE to 24 and these messages ceased to be published in the weblog!

@tiandeyu

This comment has been minimized.

Copy link

@tiandeyu tiandeyu commented Dec 28, 2018

  • The first value provides the number of packets in the libraries receive buffer limited by define IR_RCV_BUFFER_SIZE in file my_user_config.h.
  • The second number contains the number of packets in the JSON message limited by the allowable number of characters in the JSON message.
  • The third number is either a 0 if the libraries buffer is not overflowed or 1 if the buffer is overflowed.

So a correct JSON message would return two equal numbers followed by a 0 as can be seen in the message above.

Hi Theo,
Here is my data received from my Panasonic heater/ventilator remote, first number of RawDataInfo is 391 while the second number is 187
tele/sonoff/RESULT {"IrReceived":{"Protocol":"UNKNOWN","Bits":196,"Data":"18A28917","RawData":[3484,1774,414,466,416,1336,414,466,416,466,416,466,416,466,414,466,416,466,416,466,414,466,414,466,466,414,414,466,416,1338,416,466,414,466,414,466,416,464,414,466,414,466,414,1336,416,464,414,1338,416,1336,416,466,414,466,414,1338,414,468,414,466,414,1338,414,464,416,466,414,466,416,1338,414,466,414,466,414,1338,416,1336,414,466,414,1338,416,1338,416,464,414,466,414,444,436,1338,466,414,416,466,416,466,416,1338,416,466,414,1336,418,464,414,466,416,1338,416,466,414,464,416,444,436,466,416,464,416,464,416,466,416,464,416,1336,416,464,416,466,414,1338,416,464,414,466,414,1338,416,442,438,1338,416,466,416,466,414,1338,416,466,414,464,468,388,438,1338,416,1338,416,466,416,464,414,466,414,464,416,466,414,464,416,466,414,466,414,1338,416,464,416,1336,416,464,414,466,416,466],"RawDataInfo":[391,187,0]}}

can I increase the limit of JSON message?
Thanks,
Natic

@Jason2866

This comment has been minimized.

Copy link
Contributor

@Jason2866 Jason2866 commented Dec 28, 2018

@tiandeyu yes, as explained here already
#2116 (comment)

@tiandeyu

This comment has been minimized.

Copy link

@tiandeyu tiandeyu commented Dec 28, 2018

Thanks Jason,
I do read this comment, so I changed IR_RCV_BUFFER_SIZE from 100 to 500 then I got the result "RawDataInfo":[391,187,0]. The instructions explained that the first value of RawDataInfo limited by IR_RCV_BUFFER_SIZE, and second value limited by the allowable number of characters in the JSON message.

Below is the received data when IR_RCV_BUFFER_SIZE was 100.
tele/sonoff/RESULT {"IrReceived":{"Protocol":"UNKNOWN","Bits":94,"Data":"BC36F8BE","RawData":[3454,1800,422,464,444,1314,422,466,444,442,444,442,446,444,422,464,444,444,422,464,498,390,422,464,422,492,420,440,444,1314,444,442,444,444,446,440,446,440,422,466,446,418,444,1338,446,440,446,1312,462,1298,444,442,422,462,422,1336,420,466,498,388,498,1262,444,442,446,444,498,392,446,1310,422,464,498,368,524,1258,446,1316,446,440,498,1264,446,1310,446,416,498,440,472,390,498,1262,436,454,498,390,446,444,494,1268,498,390,472,1288,498,390,498,392,498,1262,448,438,472,418,472,416,498,390,498,390,498,414,474,388,498,388,472,1284,498,368,524,390,472,1288,472,418,498,390,472,1290,472,418,498,1260,498,388,472,444,446,414,472,418,472,1288,498,390,472,1290,498,1260,446,444,446,442,446,440,422,442,422,486,446,442,446,442,420,466,446,1314,422,466,422,464,420,464,422,1336,446],"RawDataInfo":[187,187,0]}}

@ceaswaran

This comment has been minimized.

Copy link

@ceaswaran ceaswaran commented Dec 28, 2018

Thanks Jason,
I do read this comment, so I changed IR_RCV_BUFFER_SIZE from 100 to 500 then I got the result "RawDataInfo":[391,187,0]. The instructions explained that the first value of RawDataInfo limited by IR_RCV_BUFFER_SIZE, and second value limited by the allowable number of characters in the JSON message.

Below is the received data when IR_RCV_BUFFER_SIZE was 100.
tele/sonoff/RESULT {"IrReceived":{"Protocol":"UNKNOWN","Bits":94,"Data":"BC36F8BE","RawData":[3454,1800,422,464,444,1314,422,466,444,442,444,442,446,444,422,464,444,444,422,464,498,390,422,464,422,492,420,440,444,1314,444,442,444,444,446,440,446,440,422,466,446,418,444,1338,446,440,446,1312,462,1298,444,442,422,462,422,1336,420,466,498,388,498,1262,444,442,446,444,498,392,446,1310,422,464,498,368,524,1258,446,1316,446,440,498,1264,446,1310,446,416,498,440,472,390,498,1262,436,454,498,390,446,444,494,1268,498,390,472,1288,498,390,498,392,498,1262,448,438,472,418,472,416,498,390,498,390,498,414,474,388,498,388,472,1284,498,368,524,390,472,1288,472,418,498,390,472,1290,472,418,498,1260,498,388,472,444,446,414,472,418,472,1288,498,390,472,1290,498,1260,446,444,446,442,446,440,422,442,422,486,446,442,446,442,420,466,446,1314,422,466,422,464,420,464,422,1336,446],"RawDataInfo":[187,187,0]}}

#2116 (comment)

@tiandeyu

This comment has been minimized.

Copy link

@tiandeyu tiandeyu commented Dec 29, 2018

Problem solved by increasing MQTT_MAX_PACKET_SIZE in both PubSubClient.h and sonoff_post.h,
it seems MQTT_MAX_PACKET_SIZE in sonoff_post.h overrides the PubSubClient.h one.

@Jason2866

This comment has been minimized.

Copy link
Contributor

@Jason2866 Jason2866 commented Dec 29, 2018

@tiandeyu
which values are you using now?

@tiandeyu

This comment has been minimized.

Copy link

@tiandeyu tiandeyu commented Dec 29, 2018

2000, MESSZ=1000-100-7=893 not enough for my 192 bits signal

@ceaswaran

This comment has been minimized.

Copy link

@ceaswaran ceaswaran commented Dec 29, 2018

Problem solved by increasing MQTT_MAX_PACKET_SIZE in both PubSubClient.h and sonoff_post.h,
it seems MQTT_MAX_PACKET_SIZE in sonoff_post.h overrides the PubSubClient.h one.
@tiandeyu Can we have the complined BIn file of yours with MQTT_MAX_PACKET_SIZE & IR_RCV_BUFFER_SIZE to 1000
So that i can test it
Thanks in advance

@tiandeyu

This comment has been minimized.

Copy link

@tiandeyu tiandeyu commented Dec 30, 2018

Hi, ceaswaran
There are 4 values I've changed.
my_user_config.h
IR_RCV_BUFFER_SIZE 1000
IR_RCV_TIMEOUT 50
PubSubClient.h and sonoff_post.h
MQTT_MAX_PACKET_SIZE 2000

@tiandeyu

This comment has been minimized.

Copy link

@tiandeyu tiandeyu commented Dec 30, 2018

There is another issue here if your packet larger than 240
modify byte to uint16_t

@sblantipodi

This comment has been minimized.

Copy link

@sblantipodi sblantipodi commented Jan 10, 2019

@arendst
is it possible to use larger buffer, mqtt packet size and timeout without recompiling tasmota?

a command via web console to increase the size of the buffer/packet size/timeout?

@arendst

This comment has been minimized.

Copy link
Owner

@arendst arendst commented Jan 10, 2019

@sblantipodi You can change the buffers using the appropriate defines. Other than that it's going to be a nightmare as there just is not enough memory to serve all features. It's not only the receive buffer but also the mqtt buffers so it will decrease memory rapidly.

I suggest you make your changes needed and live with it.

@sblantipodi

This comment has been minimized.

Copy link

@sblantipodi sblantipodi commented Jan 10, 2019

@arendst thanks for the reply. I have changed those settings:
my_user_config.h
IR_RCV_BUFFER_SIZE 1000
IR_RCV_TIMEOUT 50
PubSubClient.h and sonoff_post.h
MQTT_MAX_PACKET_SIZE 2000

now it seems that the data received from the same button is consistent.
I always receive something like this:
{"Protocol":"UNKNOWN","Bits":175,"Data":"7561C5F6",
with the same data (7561C5F6)
but the protocol remains UNKNOWN so I cannot IRSend it

how can I solve it? thanks.

@Jason2866

This comment has been minimized.

Copy link
Contributor

@Jason2866 Jason2866 commented Jan 10, 2019

You have to use SetOption58 1
#2116 (comment)

@Jason2866

This comment has been minimized.

Copy link
Contributor

@Jason2866 Jason2866 commented Jan 10, 2019

@sblantipodi Please do not post here your personal findings.
GitHub issues is for general problems with Tasmota
Thank you

Repository owner locked and limited conversation to collaborators Jan 10, 2019
Repository owner deleted a comment from sblantipodi Jan 10, 2019
Repository owner deleted a comment from sblantipodi Jan 10, 2019
Repository owner deleted a comment from sblantipodi Jan 10, 2019
Repository owner deleted a comment from sblantipodi Jan 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
You can’t perform that action at this time.