1

I have been working on a prototype for a wifi based universal remote controller and i have been using the IR-Remote library for the same. But i have a couple of questions which google couldn't help with.

So, the problem is that there are some remotes like hitachi or some other brands that aren't recognised by the library and the coding type shows "UNKNOWN". The raw dump shows an array of 211 integers like such:

Timestamp : 012012.059
Encoding  : UNKNOWN
Code      : 794B7E67 (106 bits)
Library   : v2.4.0

Raw Timing[211]:
   +  3424, -  3352,    +   378, -  1336,    +   376, -   454,    +   458, -  1254, 
   +   378, -  1334,    +   378, -   454,    +   460, -   352,    +   396, -  1336, 
   +   460, -   356,    +   394, -  1334,    +   458, -   364,    +   466, -  1256, 
   +   458, -   356,    +   392, -  1336,    +   458, -  1258,    +   456, -  1254, 
   +   378, -   452,    +   460, -   360,    +   470, -  1256,    +   458, -   298, 
   +   532, -   366,    +   466, -  1256,    +   458, -  1256,    +   458, -   358, 
   +   472, -  1256,    +   458, -  1254,    +   458, -   358,    +   472, -   304, 
   +   526, -  1258,    +   456, -   298,    +   532, -   362,    +   466, -   368, 
   +   464, -  1256,    +   456, -  1258,    +   456, -  1258,    +   456, -  1256, 
   +   378, -  1336,    +   458, -   360,    +   470, -   304,    +   524, -   364, 
   +   466, -   364,    +   464, -   310,    +   522, -  1232,    +   482, -  1256, 
   +   456, -   304,    +   526, -   310,    +   520, -   306,    +   524, -   370, 
   +   462, -  1256,    +   456, -  1260,    +   454, -  1232,    +   480, -   306, 
   +   524, -   366,    +   464, -   312,    +   516, -  1236,    +   478, -   368, 
   +   462, -   368,    +   462, -   368,    +   386, -   454,    +   454, -   372, 
   +   456, -   374,    +   458, -   372,    +   460, -   306,    +   524, -   372, 
   +   458, -   370,    +   460, -   308,    +   520, -   312,    +   444, -   452, 
   +   376, -   454,    +   452, -   308,    +   524, -   368,    +   462, -   372, 
   +   458, -   306,    +   522, -   374,    +   458, -   368,    +   460, -   306, 
   +   524, -   374,    +   458, -   308,    +   522, -   372,    +   460, -   370, 
   +   458, -   374,    +   460, -   364,    +   464, -   370,    +   460, -   304, 
   +   450, -   454,    +   452, -   308,    +   522, -   370,    +   460, -   368, 
   +   386, -   452,    +   452, -   374,    +   456, -   312,    +   520, -  1260, 
   +   452, -  1262,    +   452, -   376,    +   456, -   372,    +   458, -   376, 
   +   454, -   378,    +   380, -  1334,    +   452, -  1260,    +   452, -  1264, 
   +   378, -  1336,    +   378, -  1310,    +   476, -   320,    +   438, -   452, 
   +   378, -   428,    +   402

uint16_t rawData[211] = {3424, 3352,  378, 1336,  376, 454,  458, 1254,  378, 1334,  378, 454,  460, 352,  396, 1336,  460, 356,  394, 1334,  458, 364,  466, 1256,  458, 356,  392, 1336,  458, 1258,  456, 1254,  378, 452,  460, 360,  470, 1256,  458, 298,  532, 366,  466, 1256,  458, 1256,  458, 358,  472, 1256,  458, 1254,  458, 358,  472, 304,  526, 1258,  456, 298,  532, 362,  466, 368,  464, 1256,  456, 1258,  456, 1258,  456, 1256,  378, 1336,  458, 360,  470, 304,  524, 364,  466, 364,  464, 310,  522, 1232,  482, 1256,  456, 304,  526, 310,  520, 306,  524, 370,  462, 1256,  456, 1260,  454, 1232,  480, 306,  524, 366,  464, 312,  516, 1236,  478, 368,  462, 368,  462, 368,  386, 454,  454, 372,  456, 374,  458, 372,  460, 306,  524, 372,  458, 370,  460, 308,  520, 312,  444, 452,  376, 454,  452, 308,  524, 368,  462, 372,  458, 306,  522, 374,  458, 368,  460, 306,  524, 374,  458, 308,  522, 372,  460, 370,  458, 374,  460, 364,  464, 370,  460, 304,  450, 454,  452, 308,  522, 370,  460, 368,  386, 452,  452, 374,  456, 312,  520, 1260,  452, 1262,  452, 376,  456, 372,  458, 376,  454, 378,  380, 1334,  452, 1260,  452, 1264,  378, 1336,  378, 1310,  476, 320,  438, 452,  378, 428,  402};  // UNKNOWN 794B7E67

Now for such AC remotes which are unknown, which are more common than i thought would be, it is a matter of best implementation. I know I can save these arrays in variables and send them using .sendRaw(array, sizeof(array, freq) but then I will have to store about 15 such arrays for multiple brands. Even if I save ir codes for five different protocols, i'll be making a table of 5 * 15 = 75 huge arrays. i don't think that is a good practice nor the ESP8266 will be able to store all that.

What can be the best way to do this? What am I missing? Is there a better way to do this?

  • the SPIFFS file system on flash of the esp8266 can be 3 MB big if the flash has 4MB – Juraj May 23 '18 at 11:23
  • By this i think you are suggesting that i can store that huge data without problem, is that it? But is it the best practice? Won't I have to store raw data arrays for all remotes like this? – Ujjwal Syal May 23 '18 at 11:46
  • Also, if i occupy a lot of space, wont that create problem when update the device using OTA? – Ujjwal Syal May 23 '18 at 12:12
  • SPIFFS and sketch are ota updated separate. SPIFFS with IDE plugin from data subfolder – Juraj May 23 '18 at 12:24
  • "Best practice" would be to implement the protocol in the library properly. Just because it's not supported doesn't mean it can't be supported. – Majenko May 23 '18 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.