-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Comments
It would have to be a special compile option as it uses an extra buffer during ir receive. Considering.... |
+1 .... for an old iRobot Roomba cleaner which could be started via Alexa + OpenHAB + Tasmota-IR-Device. |
We found a temporary solution :) . |
+1 it would be useful for my Samsung AC. When I get IR from remote control I can see only encoded info So I haven't any idea how to send this command via Tasmota IRsend... |
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": Raw Timing[87]:
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 |
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) {": 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"} |
@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 :) |
Perhaps sending the RAW IR data as JSON is a great possibility to keep the code free of individual RAW commands! |
This could also be used for unknown RF Transmissions not just IR. Would be great in a send as a JSON packet. Jason |
uint16_t hz=38; case 0: //UNKNOWN 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] |
This feature would also help me greatly, both my dyson fan and electric fireplace require raw data to work. |
This feature would be nice, i have the need for too. |
How to use IR Raw data receive info:
where the raw data is ready to be send but WITHOUT the IR frequency as noted below.
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:
where the program will replace the first 0 by 38000Hz IR frequency. |
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. |
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. |
Closing as the request has been added. Thanks!!!!! |
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 |
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. |
I'm using version 6.3.0..14 to decode my AC Daikin remote : 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]}} i tried to send it on console but it doesn't work. this is my configure: how to make it work :) |
can we have the IR_RCV_BUFFER_SIZE increased ,bin file |
No, because it needs to much space from the rare flash space. |
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. |
Even after changing IR_RCV_BUFFER_SIZE to 1000 (from 100) & compiling Tasmota. I am not able to get the RAW Data fully.
Dot dot Dot at the end. Is there a work aroud to get the remaning Raw data fully??? |
Hi Theo, can I increase the limit of JSON message? |
@tiandeyu yes, as explained here already |
Thanks Jason, Below is the received data when IR_RCV_BUFFER_SIZE was 100. |
|
Problem solved by increasing MQTT_MAX_PACKET_SIZE in both PubSubClient.h and sonoff_post.h, |
@tiandeyu |
2000, MESSZ=1000-100-7=893 not enough for my 192 bits signal |
|
Hi, ceaswaran |
There is another issue here if your packet larger than 240 |
@arendst a command via web console to increase the size of the buffer/packet size/timeout? |
@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. |
@arendst thanks for the reply. I have changed those settings: now it seems that the data received from the same button is consistent. how can I solve it? thanks. |
You have to use |
@sblantipodi Please do not post here your personal findings. |
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]:
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]:
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]:
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]:
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]:
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!
The text was updated successfully, but these errors were encountered: