Coder Social home page Coder Social logo

crankyoldgit / irremoteesp8266 Goto Github PK

View Code? Open in Web Editor NEW
2.8K 94.0 810.0 25.87 MB

Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/

License: GNU Lesser General Public License v2.1

C++ 94.84% C 2.18% Makefile 0.23% Shell 0.22% Python 2.53%
protocols arduino-ide infrared airconditioners remote-control home-automation esp8266 esp32 communication arduino-library

irremoteesp8266's Introduction

IRremoteESP8266 Library

Build Status Code Lint Tests Documentation arduino-library-badge GitLicense

This library enables you to send and receive infra-red signals on an ESP8266 or an ESP32 using the Arduino framework using common 940nm IR LEDs and common IR receiver modules. e.g. TSOP{17,22,24,36,38,44,48}* demodulators etc.

v2.8.6 Now Available

Version 2.8.6 of the library is now available. You can view the Release Notes for all the significant changes.

Upgrading from pre-v2.0

Usage of the library has been slightly changed in v2.0. You will need to change your usage to work with v2.0 and beyond. You can read more about the changes required on our Upgrade to v2.0 page.

Upgrading from pre-v2.5

The library has changed from using constants declared as #define to const with the appropriate naming per the C++ style guide. This may potentially cause old programs to not compile. The most likely externally used #defines have been aliased for limited backward compatibility for projects using the old style. Going forward, only the new kConstantName style will be supported for new protocol additions.

In the unlikely case, it does break your code, then you may have been referencing something you likely should not have. You should be able to quickly determine the new name from the old. e.g. CONSTANT_NAME to kConstantName. Use common sense or examining the library's code if this does affect code.

Supported Protocols

You can find the details of which protocols & devices are supported here.

Troubleshooting

Before reporting an issue or asking for help, please try to follow our Troubleshooting Guide first.

Frequently Asked Questions

Some common answers to common questions and problems are on our F.A.Q. wiki page.

Library API Documentation

This library uses Doxygen to automatically document the library's API. You can find it here.

Installation

Official releases via the Arduino IDE v1.8+ (Windows & Linux)
  1. Click the "Sketch" -> "Include Library" -> "Manage Libraries..." Menu items.
  2. Enter IRremoteESP8266 into the "Filter your search..." top right search box.
  3. Click on the IRremoteESP8266 result of the search.
  4. Select the version you wish to install and click "Install".
Manual Installation for Windows
  1. Click on "Clone or Download" button, then "Download ZIP" on the page.
  2. Extract the contents of the downloaded zip file.
  3. Rename the extracted folder to "IRremoteESP8266".
  4. Move this folder to your libraries directory. (under windows: C:\Users\YOURNAME\Documents\Arduino\libraries\)
  5. Restart your Arduino IDE.
  6. Check out the examples.
Using Git to install the library ( Linux )
cd ~/Arduino/libraries
git clone https://github.com/crankyoldgit/IRremoteESP8266.git
To update to the latest version of the library
cd ~/Arduino/libraries/IRremoteESP8266 && git pull

Contributing

If you want to contribute to this project, consider:

Contributors

Available here

Library History

This library was originally based on Ken Shirriff's work (https://github.com/shirriff/Arduino-IRremote/)

Mark Szabo has updated the IRsend class to work on ESP8266 and Sebastien Warin the receiving & decoding part (IRrecv class).

As of v2.0, the library was almost entirely re-written with the ESP8266's resources in mind.

irremoteesp8266's People

Contributors

1technophile avatar add30417 avatar ajaypala avatar bakrus avatar caffreyfans avatar crankyoldgit avatar darshkpatel avatar dilyanpalauzov avatar drrenz avatar finfinack avatar jamsinclair avatar jimmys01 avatar jorgecis avatar markszabo avatar mbronk avatar nikize avatar pasna avatar pintomax avatar ptilopsisleucotis avatar renno-bih avatar roidayan avatar s-hadinger avatar scop avatar sebastienwarin avatar sillyfrog avatar siriuslzx avatar stijnb1234 avatar tomrosenback avatar tonhuisman avatar touchgadget avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

irremoteesp8266's Issues

LG code port problem

Hi

Library is great, but I have strange problem. I ported LG code send function from here: https://github.com/z3t0/Arduino-IRremote/blob/master/ir_LG.cpp
but it is not working. I am sending ir codes to my LG airconditioner from ESP8266. I also have second device based on arduino as ir-receiver for troubleshooting. Both codes, sent from ESP8266 and from oryginal ir remote looks identically in arduino code grabber, but remote is working fine and codes from ESP are being ignored. What am I doing wrong? Maybe I ported code in a wrong way? I just copied function code and declarations...

Protocol with more than 32bit?

Hi!
I want to do user protocol like this:
Encoding : UNKNOWN Code : ED1215A9 (32 bits) Timing[99]: +3050, -9000 + 600, -1500 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, -1550 + 550, - 550 + 550, - 550 + 600, - 500 + 550, - 550 + 550, -1550 + 550, -1550 + 550, -1550 + 550, -1550 + 550, -1550 + 550, -1550 + 550, - 550 + 550, - 550 + 550, - 550 + 600, - 500 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 500 + 600, - 500 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, -1550 + 600, - 500 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550, - 550 + 550 unsigned int rawData[99] = {3050,9000, 600,1500, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,1550, 550,550, 550,550, 600,500, 550,550, 550,1550, 550,1550, 550,1550, 550,1550, 550,1550, 550,1550, 550,550, 550,550, 550,550, 600,500, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,500, 600,500, 550,550, 550,550, 550,550, 550,550, 550,550, 550,1550, 600,500, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550}; // UNKNOWN ED1215A9
This is air conditioner samsung... - how correct do this?

ESP resets if delay is used...

When I press and hold button on my remote for about 10 seconds my ESP resets. It only happens when I use some delay in loop. Even example sketch IRrecvDumo contains 100ms delay in loop resulting ESP to reset.
Any ideas to identify source of problem?

i2c interfacing

Hi. Great job with this library, works like a charm.
i would like to ask you if you can help me, or point me in the right direction, to read the ir signals from the decoder, and send them to the ir transmitter via i2c (i/o port expander.. the esp8266-01 is short on ports as you know...). I have made the connection with the expander (MCP23008), tested and everything, but i don't find any clues to go through i2c with the ir codes. Please help me, thank you.

irsend.sendLG() not working.

Hello All, was working with this code:

/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentation at http://www.arduino.cc

This example code is in the public domain.

modified 8 May 2014
by Scott Fitzgerald
*/

include <IRremote.h>

IRsend irsend;

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
Serial.println("0x88C0051");
irsend.sendLG(0x880094D, 38);
delay(10000); // wait for a second
}

But nothing seems to work, I've try alot of samples too, but not working, please kindly assist

irsend.sendNEC problem

I had some problems getting IRServer to send the right codes to my Toshiba Regza TV. I captured all of the remote codes from the manufacturer's remote and plugged them into the IRServer demo. No dice - definitely LED activity, everything was firing fine, just no reaction from the TV. Working my way through troubleshooting, I captured a set of codes from the infrared LED attached to my ES-01 and compared them to the manufacturer's remote:

Manufacturer remote code:
9050,4500, 650,600, 600,600, 600,600, 600,600, 600,600, 600,600, 600,1700, 600,600, 600,1700, 600,1700, 600,1700, 600,1650, 600,1650, 600,1650, 600,600, 600,1650, 650,600, 600,1700, 600,600, 600,600, 600,1650, 600,600, 600,600, 600,600, 600,1700, 600,600, 600,1700, 600,1700, 600,600, 600,1650, 600,1650, 600,1650, 600

Reproduced code:
9000,4550, 600,600, 600,600, 600,600, 600,600, 600,600, 600,600, 600,1700, 600,600, 600,1700, 600,1700, 600,1700, 600,1700, 600,1700, 600,1700, 600,600, 600,1700, 600,600, 600,1700, 600,600, 600,600, 600,1700, 600,600, 600,600, 600,600, 600,1700, 600,600, 600,1700, 600,1700, 600,600, 600,1700, 600,1700, 600,1700, 600,600, 600,600, 600,600, 600,600, 600

The additional eight pulses at the end caused problems. Comparing your example code to Shirrif's example code:

https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRServer/IRServer.ino#L30]
irsend.sendNEC(code, 36);

https://github.com/z3t0/Arduino-IRremote/blob/master/examples/IRtest/IRtest.ino#L158
testNEC(0x00000000, 32);

I amended 36 to 32, which removed the spare pulses and got everything working.

Looking for maintaners/collaborators

Dear @crankyoldgit, @sebastienwarin, @sillyfrog, @pintomax, @roidayan, @bakrus, @renno-bih,

thank you for your great help with this project. Recently I have almost no time to work on this library, while more and more people are interested with PRs and issues more and more often. So if some of you have time and willing to help / take over the project, I would be happy to give you push access to this repo. Alternatively if you want to do it on your own github, I can deprecate mine and place a link to the top of the readme. However given the good number of people already using this repo, I would prefer the first solution.

Best regards,
Mark

Problem air conditioner

Hello
The air conditioner uses a raw 199, this has to change the IRremote.h -> #define RAWBUF 100 to 200 and change IRremoteInt.h #define _GAP 5000 change to 50000, the problem is that there are over 300 air and the string only accepts 255 to solve this?

Problem with big number in NEC Code

When I send the code 0x7E817E81 (decimal 2122415745) it works fine (by using the IRSendDemo sketch). When I send codes like 0x807F817E (decimal 2155839870) or 0x817E817E โ€ญ(decimal 2172551550) it doesn't work so I guess it's possible a problem with Long and Unsigned Long numbers as the problem appears (up to where I tested) with codes bigger than 0x7FFFFFFF.

When I try to send 0x807F817E according to AnalysIR this is what gets sent:

unsigned int Signal_1_1[] = {8960,4523,555,1707,533,597,533,597,533,597,533,597,533,597,533,597,533,576,533,597,512,1728,555,1685,555,1685,555,1707,555,1707,555,1685,555,1685,555,1707,555,576,533,597,533,597,533,597,533,597,533,576,533,1707,555,597,533,1685,576,1685,555,1707,555,1707,555,1707,555,1685,555,576,512,597,533,597,533,576,533,576,533}; //AnalysIR Batch Export (IRremote) - RAW

or

1;0;1000;0|2;1000;8960;1|3;9960;4523;0|4;14483;555;1|5;15038;1707;0|6;16745;533;1|7;17278;597;0|8;17875;533;1|9;18408;597;0|10;19005;533;1|11;19538;597;0|12;20135;533;1|13;20668;597;0|14;21265;533;1|15;21798;597;0|16;22395;533;1|17;22928;597;0|18;23525;533;1|19;24058;576;0|20;24634;533;1|21;25167;597;0|22;25764;512;1|23;26276;1728;0|24;28004;555;1|25;28559;1685;0|26;30244;555;1|27;30799;1685;0|28;32484;555;1|29;33039;1707;0|30;34746;555;1|31;35301;1707;0|32;37008;555;1|33;37563;1685;0|34;39248;555;1|35;39803;1685;0|36;41488;555;1|37;42043;1707;0|38;43750;555;1|39;44305;576;0|40;44881;533;1|41;45414;597;0|42;46011;533;1|43;46544;597;0|44;47141;533;1|45;47674;597;0|46;48271;533;1|47;48804;597;0|48;49401;533;1|49;49934;576;0|50;50510;533;1|51;51043;1707;0|52;52750;555;1|53;53305;597;0|54;53902;533;1|55;54435;1685;0|56;56120;576;1|57;56696;1685;0|58;58381;555;1|59;58936;1707;0|60;60643;555;1|61;61198;1707;0|62;62905;555;1|63;63460;1707;0|64;65167;555;1|65;65722;1685;0|66;67407;555;1|67;67962;576;0|68;68538;512;1|69;69050;597;0|70;69647;533;1|71;70180;597;0|72;70777;533;1|73;71310;576;0|74;71886;533;1|75;72419;576;0|76;72995;533;1|

Here you can see a correct NEC code send by the remote (in yellow) and the same NEC code sent by the sketch (in green):
Signal1

I have no clue what the problem is (other than the size of the number).

Pinout

Can you tell me if the pin conection is GPIO0 ( irsend(0) ) to GND or to 3.3V ? This two possibilits would invert the led status/
In Arduino is generaly is positive GPIO to GND but because the esp8266 can give low current most blink examples use gpio to 3.3V

irsend.mark(0); doesn't seem to work

I've ported some code that previously worked on a Nano to the ESP8266 using this library. However, beam detection using irsend.mark(0); now seems to have stopped working.

Restarting if continues ir received

i like to say thank you for this library creator and supporting members,
its decoding perfectly but ESP8266 Restarting, If receive continuous IR Signal ,
Iam using gpio13 to connect ir receiver(TSOP1738)

iam using samsung TV remote
pic1
pic2

New NEC format

Excellent, excellent job. I've been looking for 2 weeks for this library. I don't know why I couldn't find it earlier.

I have Gree Aircon which seems to be using non-standard NEC protocol. I think its called NEC2.

I have successfully used your library to send raw IR but no luck with the hex codes. I think I need to define a new function irsend.sendNEC2(code,bit_size).

I had good luck with: irsend.sendRaw(buffer, sizeofbuffer,38)

The buffer is "Raw: (139) 8996, -4480, 644, -1652, 644, -556, 644, -556, 640, -1656, 640, -560, 644, -1652, 640, -1656, 640, -560, 668, -532, 668, -532, 664, -540, 640, -560, 640, -560, 640, -536, 664, -564, 612, -588, 612, -588, 616, -588, 612, -588, 612, -560, 640, -588, 612, -1684, 620, -1676, 648, -552, 672, -528, 676, -524, 648, -556, 648, -552, 648, -1648, 648, -552, 648, -1648, 648, -552, 648, -552, 648, -1648, 648, -552, 648, -19928, 676, -1648, 644, -556, 644, -556, 648, -552, 648, -556, 644, -556, 648, -552, 648, -552, 648, -556, 648, -552, 648, -552, 648, -552, 648, -552, 652, -1644, 648, -552, 648, -556, 648, -552, 648, -552, 648, -556, 644, -556, 648, -552, 644, -556, 648, -552, 648, -556, 644, -556, 648, -552, 648, -552, 648, -556, 648, -1644, 648, -556, 644, -1648, 652, -552, 648"

Will this library help me send the buffer above in HEX format?

Someone on AnalysisIR experienced the same issue. http://www.analysir.com/joomla/IRforum/viewtopic.php?f=5&t=420#p598

Decode IR with long IR data

I trying to send IR signal from my phone (IR blaster) with raw length about : 72
8973,4552,500,631,500,631,500,631,500,631,500,631,500,631,500,631,500,631,500,1736,500,631,500,1736,500,1736,500,1736,500,1736,500,631,500,1736,500,1736,500,631,500,1736,500,631,500,1736,500,631,500,631,500,631,500,631,500,1736,500,631,500,1736,500,631,500,1736,500,1736,500,1736,500,42447,8973,2289,500,500
And i try to decode that signal from my ESP.
But i can not receive correct data.
This is what i recieved.
{"Code": "6E61198F","CodeType": -1,"Raw":"9150,4650,500,700,500,700,500,700,500,700,500,700,500,700,500,700,650,700,500,1800,500,700,500,1800,500,1800,500,1800,500,1900,500,700,650,1800,500,1800,500,750,500,1900,500,700,500,1800,500,700,500,700,500,700,500,750,500,1800,500,700,500,1800,500,700,500,1800,500,1800,600,1800,500","RawLength":68,"Bits":32}
{"Code": "FFFFFFFF","CodeType": 1,"Raw":"9000,2400,500","RawLength":4,"Bits":0}

I don't know how to learn correct IR signal if that signal is too long.
Sorry because my english not good.

Implement receiving and receiving sample

On the main page the description says "send and receive infrared signals" but I can only find examples for sending, which works great. Please also implement receiving.

Other timings

Hallo,

fine that we now have the library for esp8266.

However: Previously I controlled my stuff with arduino + BT module, it worked flawless. With IRremoteESP8266 the Panasonic PVR did not work. I had to change the definitions to:

define PANASONIC_HDR_MARK 3413

define PANASONIC_HDR_SPACE 1750

define PANASONIC_BIT_MARK 469

define PANASONIC_ONE_SPACE 1244

define PANASONIC_ZERO_SPACE 384

The Samsung stuff worked "out of the box". However, I recognized thet (for my remote) the signals were a bit too long. So I now use these definitions:

//original by Ken Shiriff:

define SAMSUNG_ONE_SPACE 1600

define SAMSUNG_RPT_SPACE 2250

//modified by Sebastien Warin:

define SAMSUNG_HDR_MARK 4500

define SAMSUNG_HDR_SPACE 4500

//and

define SAMSUNG_ZERO_SPACE 580

define SAMSUNG_BIT_MARK 580

May be these timings are depnedent on the individual remotes.

Best regards

Uli

RC-MM Protocol For IRremoteESP8266

I came across a remote which uses RC-MM protocol (probably also known as Nokia 24 ) , I needed help adding that to IRremoteESP8266 library.

here is a sample for the same

This is the dump of the "same button" being pressed 10 times

``Encoding : UNKNOWN
Code : 49EF3073 (32 bits)
Timing[35]:

  • 450, - 250 + 150, - 300 + 200, - 550 + 150, - 600
  • 200, - 250 + 200, - 750 + 200, - 550 + 200, - 250
  • 200, - 250 + 150, - 600 + 200, - 550 + 200, - 450
  • 150, - 600 + 150, - 300 + 150, - 300 + 150, - 250
  • 200, - 250 + 150
    unsigned int rawData[35] = {450,250, 150,300, 200,550, 150,600, 200,250, 200,750, 200,550, 200,250, 200,250, 150,600, 200,550, 200,450, 150,600, 150,300, 150,300, 150,250, 200,250, 150}; // UNKNOWN 49EF3073

Encoding : UNKNOWN
Code : 6E277A3 (32 bits)
Timing[35]:

  • 450, - 250 + 150, - 250 + 200, - 600 + 150, - 600
  • 200, - 250 + 150, - 800 + 150, - 600 + 150, - 300
  • 150, - 300 + 150, - 250 + 200, - 600 + 150, - 450
  • 150, - 600 + 200, - 250 + 150, - 300 + 150, - 250
  • 200, - 250 + 200
    unsigned int rawData[35] = {450,250, 150,250, 200,600, 150,600, 200,250, 150,800, 150,600, 150,300, 150,300, 150,250, 200,600, 150,450, 150,600, 200,250, 150,300, 150,250, 200,250, 200}; // UNKNOWN 6E277A3

Encoding : UNKNOWN
Code : B70D49E4 (32 bits)
Timing[35]:

  • 450, - 250 + 150, - 300 + 150, - 600 + 150, - 600
  • 200, - 250 + 200, - 750 + 150, - 600 + 200, - 250
  • 200, - 250 + 150, - 600 + 200, - 600 + 150, - 450
  • 150, - 600 + 200, - 250 + 150, - 300 + 150, - 250
  • 200, - 250 + 200
    unsigned int rawData[35] = {450,250, 150,300, 150,600, 150,600, 200,250, 200,750, 150,600, 200,250, 200,250, 150,600, 200,600, 150,450, 150,600, 200,250, 150,300, 150,250, 200,250, 200}; // UNKNOWN B70D49E4

Encoding : UNKNOWN
Code : 25D6E01D (32 bits)
Timing[35]:

  • 450, - 250 + 150, - 250 + 200, - 600 + 150, - 600
  • 200, - 250 + 150, - 800 + 150, - 600 + 200, - 250
  • 150, - 300 + 150, - 250 + 200, - 600 + 150, - 450
  • 150, - 600 + 200, - 250 + 150, - 300 + 150, - 300
  • 150, - 250 + 200
    unsigned int rawData[35] = {450,250, 150,250, 200,600, 150,600, 200,250, 150,800, 150,600, 200,250, 150,300, 150,250, 200,600, 150,450, 150,600, 200,250, 150,300, 150,300, 150,250, 200}; // UNKNOWN 25D6E01D

Encoding : UNKNOWN
Code : 40033D4D (32 bits)
Timing[35]:

  • 450, - 250 + 200, - 250 + 150, - 600 + 200, - 600
  • 150, - 300 + 150, - 750 + 200, - 600 + 150, - 250
  • 200, - 250 + 200, - 600 + 150, - 600 + 150, - 450
  • 150, - 600 + 200, - 250 + 200, - 250 + 150, - 300
  • 150, - 250 + 200
    unsigned int rawData[35] = {450,250, 200,250, 150,600, 200,600, 150,300, 150,750, 200,600, 150,250, 200,250, 200,600, 150,600, 150,450, 150,600, 200,250, 200,250, 150,300, 150,250, 200}; // UNKNOWN 40033D4D

Encoding : UNKNOWN
Code : 6E277A3 (32 bits)
Timing[35]:

  • 450, - 250 + 150, - 250 + 200, - 600 + 150, - 600
  • 200, - 250 + 150, - 800 + 150, - 600 + 150, - 300
  • 150, - 300 + 150, - 250 + 200, - 600 + 150, - 450
  • 150, - 600 + 200, - 250 + 150, - 300 + 150, - 250
  • 200, - 250 + 200
    unsigned int rawData[35] = {450,250, 150,250, 200,600, 150,600, 200,250, 150,800, 150,600, 150,300, 150,300, 150,250, 200,600, 150,450, 150,600, 200,250, 150,300, 150,250, 200,250, 200}; // UNKNOWN 6E277A3

Encoding : UNKNOWN
Code : 9A2A2562 (32 bits)
Timing[35]:

  • 450, - 250 + 150, - 250 + 200, - 600 + 150, - 600
  • 200, - 250 + 150, - 800 + 150, - 600 + 150, - 300
  • 150, - 250 + 200, - 600 + 150, - 600 + 200, - 400
  • 200, - 600 + 150, - 300 + 150, - 250 + 200, - 250
  • 200, - 250 + 150
    unsigned int rawData[35] = {450,250, 150,250, 200,600, 150,600, 200,250, 150,800, 150,600, 150,300, 150,250, 200,600, 150,600, 200,400, 200,600, 150,300, 150,250, 200,250, 200,250, 150}; // UNKNOWN 9A2A2562

Encoding : UNKNOWN
Code : DF6C1994 (32 bits)
Timing[35]:

  • 450, - 250 + 200, - 250 + 150, - 600 + 200, - 600
  • 150, - 300 + 150, - 750 + 200, - 600 + 150, - 250
  • 200, - 250 + 200, - 250 + 150, - 600 + 200, - 400
  • 200, - 600 + 150, - 300 + 150, - 250 + 200, - 250
  • 200, - 250 + 150
    unsigned int rawData[35] = {450,250, 200,250, 150,600, 200,600, 150,300, 150,750, 200,600, 150,250, 200,250, 200,250, 150,600, 200,400, 200,600, 150,300, 150,250, 200,250, 200,250, 150}; // UNKNOWN DF6C1994

Encoding : UNKNOWN
Code : 2EA1533E (32 bits)
Timing[35]:

  • 450, - 200 + 200, - 250 + 200, - 600 + 150, - 600
  • 150, - 300 + 150, - 750 + 200, - 600 + 150, - 300
  • 150, - 250 + 200, - 600 + 150, - 600 + 200, - 400
  • 200, - 600 + 150, - 250 + 200, - 250 + 200, - 250
  • 150, - 300 + 150
    unsigned int rawData[35] = {450,200, 200,250, 200,600, 150,600, 150,300, 150,750, 200,600, 150,300, 150,250, 200,600, 150,600, 200,400, 200,600, 150,250, 200,250, 200,250, 150,300, 150}; // UNKNOWN 2EA1533E

Encoding : UNKNOWN
Code : 915E804D (32 bits)
Timing[35]:

  • 450, - 250 + 150, - 300 + 150, - 600 + 200, - 550
  • 200, - 250 + 200, - 750 + 150, - 600 + 200, - 250
  • 200, - 250 + 150, - 300 + 150, - 600 + 200, - 400
  • 200, - 550 + 200, - 250 + 200, - 250 + 200, - 250
  • 150, - 300 + 150
    unsigned int rawData[35] = {450,250, 150,300, 150,600, 200,550, 200,250, 200,750, 150,600, 200,250, 200,250, 150,300, 150,600, 200,400, 200,550, 200,250, 200,250, 200,250, 150,300, 150}; // UNKNOWN 915E804D

Encoding : UNKNOWN
Code : 7B255A09 (32 bits)
Timing[35]:

  • 400, - 250 + 200, - 250 + 200, - 550 + 200, - 600
  • 150, - 300 + 150, - 750 + 200, - 600 + 150, - 250
  • 200, - 250 + 200, - 600 + 150, - 600 + 150, - 450
  • 200, - 550 + 200, - 250 + 200, - 250 + 150, - 300
  • 150, - 300 + 150
    unsigned int rawData[35] = {400,250, 200,250, 200,550, 200,600, 150,300, 150,750, 200,600, 150,250, 200,250, 200,600, 150,600, 150,450, 200,550, 200,250, 200,250, 150,300, 150,300, 150}; // UNKNOWN 7B255A09

Encoding : UNKNOWN
Code : AD737632 (32 bits)
Timing[35]:

  • 450, - 250 + 150, - 250 + 200, - 600 + 150, - 600
  • 200, - 250 + 200, - 750 + 150, - 600 + 200, - 250
  • 150, - 300 + 150, - 250 + 200, - 600 + 150, - 450
  • 150, - 600 + 200, - 250 + 200, - 250 + 150, - 300
  • 150, - 250 + 200`

Issue sending RC6 36bit code

MCE Remote dump:
Encoding : RC6 Code : 800F8416 (36 bits) Timing[65]: +2650, - 850 + 450, - 450 + 400, - 450 + 450, - 850 + 450, - 900 +1300, - 900 + 450, - 400 + 450, - 450 + 450, - 400 + 450, - 450 + 400, - 450 + 450, - 450 + 400, - 450 + 450, - 450 + 450, - 400 + 450, - 450 + 850, - 450 + 450, - 450 + 400, - 450 + 450, - 450 + 450, - 850 + 400, - 450 + 450, - 450 + 400, - 450 + 900, - 850 + 450, - 450 + 400, - 450 + 450, - 450 + 400, - 450 + 900, - 850 + 900, - 450 + 400, - 900 + 450 unsigned int rawData[65] = {2650,850, 450,450, 400,450, 450,850, 450,900, 1300,900, 450,400, 450,450, 450,400, 450,450, 400,450, 450,450, 400,450, 450,450, 450,400, 450,450, 850,450, 450,450, 400,450, 450,450, 450,850, 400,450, 450,450, 400,450, 900,850, 450,450, 400,450, 450,450, 400,450, 900,850, 900,450, 400,900, 450}; // RC6 800F8416 unsigned int data = 0x800F8416;

Output from ESPEasy IRTX plugin
http://192.168.1.xxx/control?cmd=IRSEND,RC6,800F8416,36
Encoding : RC6 Code : 0 (36 bits) Timing[73]: +2700, - 900 + 450, - 900 + 900, - 450 + 450, -1300 + 900, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 400 + 500, - 400 + 500, - 450 + 450, - 400 + 500, - 400 + 500, - 450 + 450, - 450 + 450, - 400 + 500, - 400 + 500, - 400 + 500, - 400 + 500, - 400 + 500, - 400 + 500, - 450 + 450, - 400 + 450, - 450 + 450, - 450 + 450, - 450 + 450, - 450 + 450 unsigned int rawData[73] = {2700,900, 450,900, 900,450, 450,1300, 900,450, 450,450, 450,450, 450,450, 450,450, 450,450, 450,450, 450,450, 450,450, 450,450, 450,450, 450,450, 450,450, 450,400, 500,400, 500,450, 450,400, 500,400, 500,450, 450,450, 450,400, 500,400, 500,400, 500,400, 500,400, 500,400, 500,450, 450,400, 450,450, 450,450, 450,450, 450,450, 450}; // RC6 0 unsigned int data = 0x0;

IRrecvDumpV2 does not compile

case SANYO:        Serial.print("SANYO");         break ;
case MITSUBISHI:   Serial.print("MITSUBISHI");    break ;
case SAMSUNG:      Serial.print("SAMSUNG");       break ;
case LG:           Serial.print("LG");            break ;
case WHYNTER:      Serial.print("WHYNTER");       break ;

// case AIWA_RC_T501: Serial.print("AIWA_RC_T501"); break ;

Sanyo and Aiwa_RC_T501 have the same value which throws a complication error

ESP8266 NodeMCU Backdoor uPWM hack for IR signals wit UART

FYI: we have just published an article on our blog, with examples, showing how to accurately generate hardware based PWM for IR carrier signals on the ESP8266 NodeMCU, using our uPWM method. (hardware based PWM on the ESP8266 is supported from 100Hz to 1kHz (AFAIK). The method we published supports all common IR frequencies & a good selection of duty cycles. Previously all implemetations on this platform relied on software loops to generate the PWM. For anyone with the time available, there is no reason it couldn't be incorporated into the main IRremote repository. Let us know if you find it useful.
ESP8266 NodeMCU Backdoor uPWM hack for IR signals wit UART

RC5 possible issue

Hello,
i have attached an IR LED (http://goo.gl/m9HZkR) to my ESP module.
I am tring to control my tv from internet sending RC5 signals. (read RC5 and codes with an receiver)
TV accepts the IR signal only after 10-15 tries. Read somewhere that RC5 is very sensitive to timing.

Do you have any idea why ?

Thanks.

56Khz

Is there any way to send and receive @ 56Khz with this library ?

Thanks in advance,
gamecompiler

Unknown encoding find in my TV remote.

Actually i am using your library.Its works great in decode some of Fan and AC remote.
Whenever i use TV remote.it all time display unknown encoding.Same remote i used decode my raw code via IRremote.h library in my arduino uno board.So, how to resolve this problem?
If i use Arduino uno board then result should be,
Decoded RC6: 1000C (20 bits) <--- Power button pressed

If i use ESP8266 nodemcu then result should be,
Unknown encoding: F5AD0EC0 (32 bits)

So, please help me resolve this problem.
Even i put double slash at //case AIWA_RC_T501: Serial.print("AIWA_RC_T501"); break ;
file than i compare sketch.So, check this problem.

Issue sending NEC codes, but raw works fine

Hey,

So I know my setup is working since sending raw data controls my Seville Classics fan. The IRRecvDemo says that it's getting NEC codes, and some existing code on Github makes me think it's NEC, but whenever I send NEC out the fan won't respond. If I send the raw data it works fine.

Here's example output from the receiver:

Encoding  : NEC
Code      : 10203040 (32 bits)
Timing[131]: 
     +9400, -4800     + 600, - 500     + 600, - 500     + 600, - 550
     + 600, -1600     + 600, - 500     + 600, - 550     + 600, - 500
     + 550, - 550     + 600, - 550     + 550, - 550     + 600, -1600
     + 600, - 500     + 600, - 550     + 550, - 550     + 600, - 500
     + 600, - 550     + 600, - 500     + 600, - 550     + 550, -1650
     + 600, -1600     + 600, - 500     + 550, - 550     + 600, - 550
     + 600, - 500     + 600, - 500     + 600, -1650     + 550, - 550
     + 600, - 500     + 600, - 550     + 600, - 500     + 600, - 550
     + 550, - 550     + 600, - 500     + 600, -1600     + 600, - 550
     + 550, -1650     + 600, - 500     + 600, - 550     + 550, - 550
     + 600, - 500     + 600, - 550     + 600, - 500     + 550, - 550
     + 600, - 550     + 600, - 500     + 550, - 550     + 600, - 550
     + 600, - 500     + 600, - 500     + 600, -1600     + 600, -1650
     + 550, - 550     + 600, - 500     + 600, - 550     + 600, - 500
     + 600, - 500     + 600, - 550     + 550, -1650     + 550, -1650
     + 550, -1650     + 550, - 550     + 600, - 550     + 600, - 500
     + 600, - 500     + 600
unsigned int  rawData[131] = {9400,4800, 600,500, 600,500, 600,550, 600,1600, 600,500, 600,550, 600,500, 550,550, 600,550, 550,550, 600,1600, 600,500, 600,550, 550,550, 600,500, 600,550, 600,500, 600,550, 550,1650, 600,1600, 600,500, 550,550, 600,550, 600,500, 600,500, 600,1650, 550,550, 600,500, 600,550, 600,500, 600,550, 550,550, 600,500, 600,1600, 600,550, 550,1650, 600,500, 600,550, 550,550, 600,500, 600,550, 600,500, 550,550, 600,550, 600,500, 550,550, 600,550, 600,500, 600,500, 600,1600, 600,1650, 550,550, 600,500, 600,550, 600,500, 600,500, 600,550, 550,1650, 550,1650, 550,1650, 550,550, 600,550, 600,500, 600,500, 600};  // NEC 10203040
unsigned int  data = 0x10203040;

I try sending with

irsend.sendNEC(0x10203040, 32);

Can anyone help?

Carrier frequency inaccurate

I am just setting up an MQTT-to-IR bridge using a Wemos D1 Mini, but was unable to control our old Panasonic CRT TV. Hooking up the oscilloscope, I found out that the actual carrier frequency was about 32.5kHz instead of the configured 35kHz. The actual remote even uses 36.5kHz. This discrepancy was apparently enough so that the TV did not react at all.

As a quick and dirty fix, I changed the timing in IRsend::enableIROut(int khz) from 500/khz to 465/khz. This gave me a pretty accurate carrier frequency for 35 and the TV works, but I expect that the issue is rather related to additional delays, so an offset would be more appropriate to get accurate results on other frequencies.

Having issues with sendGC

I'm using sendGC as I'm converting from a iTach. I have it working with 3 other devices but will not control an Onkyo AMP. Exact same codes I'm using through the iTach so I know the codes are good. Any ideas what to try or how to analyse the IR signal?

Thank you!

Reset Exceptino(0)

I'm using the IRrecvDemo.ino with nodeMCU V1. But when i'm pressing the botton by 2 or more seconds. The esp8266 reboot and say me it:

Exception (0):
epc1=0x40203324 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffc30 end: 3fffffb0 offset: 01a0

stack>>>
3ffffdd0: 40106fb0 0000004e 00000000 3ffe8d50
3ffffde0: ffffffff 00000020 3ffe8dfc 00000030
3ffffdf0: 00000006 00000006 42d60000 00000022
3ffffe00: 3fffc200 40106f78 3fffc258 4000050c
3ffffe10: 4000437d 00000030 00000016 ffffffff
3ffffe20: 60000200 00000008 00000000 80000000
3ffffe30: 20000000 3fff0640 80000000 203fc040
3ffffe40: 80000000 3fffc6fc 3ffe91a4 3fff0644
3ffffe50: 000002b4 003fc040 60000600 00000030
3ffffe60: 7fffffff 3ffe9c2c 3ffe9c2c 00000001
3ffffe70: 40107014 00000002 00000000 40106ffe
3ffffe80: ffffffff 00000020 3ffefe8c 00000000
3ffffe90: 00000000 00000000 0000001f 401014a1
3ffffea0: 4000050c 40106f78 3fffc258 4000050c
3ffffeb0: 40000f68 00000030 00000011 ffffffff
3ffffec0: 40000f58 00000000 00000020 00000000
3ffffed0: 00000007 4021b770 3ffe91a4 bfffffff
3ffffee0: ffffffff 3ffefe8c 3ffe91a4 3fffdab0
3ffffef0: 00000000 3fffdcb0 3ffe88c0 00000030
3fffff00: 00000000 400042db 00000064 60000600
3fffff10: 40004b31 3fff0604 000002f4 003fc000
3fffff20: 401023d2 3ffe88b0 3ffe9050 40107450
3fffff30: 4021b23d 3ffe9050 3ffe88b0 0243c6fd
3fffff40: 3fff0604 00001000 4021b6d6 00000008
3fffff50: 4021d658 3ffe91a4 4021b783 3ffe9104
3fffff60: 3ffe88b0 00676911 3ffe88b0 60000600
3fffff70: 40203d05 3ffe9104 3ffe88b0 0243b314
3fffff80: 40203d4a 3fffdab0 00000000 3fffdcb0
3fffff90: 3ffe88c8 3fffdad0 3ffee52c 40202b9f
3fffffa0: 40000f49 0001822d 3fffdab0 40000f49
<<<stack<<<

Bug in read_timeout method, "eating" the initial mark duration and producing result different from Arduino...

Hello,

I think there is a bug at line 487 in IRremoteESP8266.cpp, the duration of the mark is not saved and then the data received/interpreted is not the same than the one we get when using iRemote with and arduino board. It also fails to decode most of the protocols I have been able to try.

if (irparams.rcvstate == STATE_IDLE) {
        irparams.rcvstate = STATE_MARK;
        irparams.rawbuf[irparams.rawlen++] = 20;        
    }
    else if (irparams.rawlen < RAWBUF) {
        irparams.rawbuf[irparams.rawlen++] = (now - start) / USECPERTICK + 1;
}

When state is STATE_IDLE then (now - start) / USECPERTICK + 1; should be executed too so that we save the duration of the mark in the buffer.

I changed the code to this and now the protocols I try (Samsung, LG, ...) are successfully decoded, and unknown protocols return me the exact same value that I have when I use the arduino version of iRemote.

I am not sure if moving the test irparams.rawlen < RAWBUF outside is ok, do we have a case where the state can be STATE_IDLE and we have irparams.rawlen not 0 ?

if (irparams.rawlen < RAWBUF) { 
   if (irparams.rcvstate == STATE_IDLE) {
      irparams.rcvstate = STATE_MARK;
   }
   irparams.rawbuf[irparams.rawlen++] = (now - start) / USECPERTICK + 1;
}

Not able to send raw data using dynamic arrays

I'm using this library to send ir data to a device, the raw data is sent to esp via a server and esp receives the raw data in a char array which then I convert to unsigned int array as it is required by irsend.sendraw function. But I'm not able to see any results with this method.Whereas when I hardcode the array and then send that, everything works fine. So can anyone help me? Where I'm going wrong?
/Section1/
int counter=0;
int i=0;
char input[] = "9050,4500,600,1700,600,550,600,600,600,600,600,600,600,600,600,550,600,600,600,1700,600,550,600,1700,600,1700,600,1700,600,1700,600,1700,600,1700,600,600,600,600,600,1700,600,1700,600,1750,600,600,600,1750,600,1700,600,1750,600,1700,600,550,600,550,600,650,550,1700,600,600,600,600,600,?";

while(input[i]!='?'){
    if(input[i]==','){
        counter++;
    }
    i++;
}
counter=counter++;
unsigned int temp[counter];

i=0;
char* numStr = strtok(input, ",");
while (numStr)
{
temp[i]=atoi(numStr);
i++;
numStr = strtok(NULL, ",");
}
i=0;
//temp[counter]=0;
while(i<counter-1){
Serial.print(temp[i]);
i++;
}
Serial.println("Sending raw");
irsend.sendRaw(temp,counter,38);
delay(1000);
/Section2/
unsigned int array1[244]={9050,4500,600,1700,600,550,600,600,600,600,600,600,600,600,600,550,600,600,600,1700,600,550,600,1700,600,1700,600,1700,600,1700,600,1700,600,1700,600,600,600,600,600,1700,600,1700,600,1750,600,600,600,1750,600,1700,600,1750,600,1700,600,550,600,550,600,650,550,1700,600,600,600,600,600,?};
int leng=68;
irsend.sendRaw(array1,68,38);

Section 1 doesnot work and section 2 works!!
Please help!

Samsung codes

Nice job, congratulations!!!

My question is if I can send samsun codes an knws the encoding, because the ir recv prints this:

E0E0D02F (32 bits)
Raw (67): 4500 -600 1700 -600 1700 -600 1700 -600 550 -600 550 -600 550 -600 600 -600 600 -600 1650 -650 1700 -600 1700 -600 600 -600 550 -600 550 -650 500 -650 600 -600 1700 -600 1650 -650 600 -600 1700 -600 600 -600 600 -600 600 -600 600 -600 550 -600 550 -600 1650 -650 600 -600 1700 -600 1650 -650 1650 -650 1650 -650

and decoded type is 11

Esp resets in GC example

In the IRGCTCPserver example,

I am getting following error and resets

IR TCP Server
192.168.1.117

Exception (0):
epc1=0x40106b71 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont
sp: 3ffeff40 end: 3fff01c0 offset: 01a0

stack>>>
3fff00e0: 3ffef0b8 00000015 00000015 4010020c
3fff00f0: 3ffeef94 ffffffff 00000084 4010068c
3fff0100: 3ffeef94 00000006 00000001 3fff0160
3fff0110: 3ffeef94 ffffffff 00000084 40201ff2
3fff0120: 00000000 00000000 00000000 40208609
3fff0130: 00000193 3fff1868 3fff0160 40208710
3fff0140: 00000000 3ffeef98 3ffeef98 00000384
3fff0150: 00000001 3ffeef88 3ffeef98 40202242
3fff0160: 3fff14b4 0000019f 00000197 402082a0
3fff0170: 00000000 3fff10cc 3fff130c 0000019f
3fff0180: 00000197 7501a8c0 3ffef0dc 40208278
3fff0190: 00000000 00000000 00000001 3ffef198
3fff01a0: 3fffdad0 00000000 3ffef190 40208fec
3fff01b0: feefeffe feefeffe 3ffef1a0 40100718
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld

Nodemcu code lua

I. Sorry to ask you that but do you know how to work an ir receiver with esp lua code ?

Thanks for your help
Jose

PLEASE HELP, sendRaw, send GC.

Currently using Arduino UNO with iRemote library to send two sets of pulses by an IR LED connected directly to pin 3 and GND, everything works smoothly.

Now I wanted to use the D1 mini, because is equipped with WiFi, but if I send the same code sequence with the library IRemoteESP8266, always with the IR LED connected directly to pin D3 and GND, nothing works.
I enclose the two sketch used to tests:
Arduino
`/**
Questo programma permette di accendere e spegnere ongni 7,5 secondi, la luce di casa
led collegato a pin 3 e GND
*/

include "IRremote.h"

IRsend irsend;

void setup()
{
Serial.begin(9600);
}

unsigned int ON[68]={9150,4450,650,500,650,500,600,550,600,550,600,500,650,500,650,500,600,550,600,1650,650,1600,700,1600,600,1700,600,1650,650,1650,600,1650,650,1650,600,1700,600,500,650,1650,600,1650,650,500,600,550,600,500,650,500,650,500,600,1700,600,500,650,500,650,1600,650,1650,650,1650,600,1650,650};
unsigned int OFF[68]={9150,4500,600,500,650,500,600,550,600,550,600,500,650,500,650,500,600,550,600,1650,650,1600,700,1600,650,1650,600,1650,650,1650,600,1650,650,1650,600,1700,600,1650,600,1650,650,1650,650,1650,600,500,650,500,600,550,600,550,600,500,650,500,600,550,600,500,650,1650,600,1650,650,1650,600};

void loop() {
irsend.sendRaw(ON, 68, 38);
Serial.println("Accendo la Lampada");
delay(7500);
irsend.sendRaw(OFF, 68, 38);
Serial.println("Spengo la Lampada");
delay(7500);
}`

D1
`/*

  • IRremoteESP8266: IRsendGCDemo - demonstrates sending Global Cache-formatted IR codes with IRsend
  • An IR LED must be connected to ESP8266 pin 0.
  • Version 0.1 30 March, 2016
  • Based on Ken Shirriff's IrsendDemo Version 0.1 July, 2009, Copyright 2009 Ken Shirriff, http://arcfn.com
    */

include <IRremoteESP8266.h>

// Codes are in Global Cache format less the emitter ID and request ID. These codes can be found in GC's Control Tower database.

unsigned int ON[69]={38000,9150,4450,650,500,650,500,600,550,600,550,600,500,650,500,650,500,600,550,600,1650,650,1600,700,1600,600,1700,600,1650,650,1650,600,1650,650,1650,600,1700,600,500,650,1650,600,1650,650,500,600,550,600,500,650,500,650,500,600,1700,600,500,650,500,650,1600,650,1650,650,1650,600,1650,650};
unsigned int OFF[69]={38000,9150,4500,600,500,650,500,600,550,600,550,600,500,650,500,650,500,600,550,600,1650,650,1600,700,1600,650,1650,600,1650,650,1650,600,1650,650,1650,600,1700,600,1650,600,1650,650,1650,650,1650,600,500,650,500,600,550,600,550,600,500,650,500,600,550,600,500,650,1650,600,1650,650,1650,600};

IRsend irsend(0); //an IR emitter led is connected to GPIO pin D3

void setup()
{
irsend.begin();
Serial.begin(9600);
}

void loop() {
Serial.println("Toggling power ON");
irsend.sendGC(ON, 69);
delay(5000);
Serial.println("Toggling power OFF");
irsend.sendGC(OFF, 69);
delay(5000);
}`

I also tried the sendraw but did not work.

Receiving is not working after irrecv.disableIRIn() and irrecv.enableIRIn()

Receiving not working after disabling and re-enabling receiver..

I have attached both the IR decoder for receiving IR codes and IR LED to send IR codes.
When I send the code then it is also received back by receiver. To avoid this I am trying to disable receiver before the sending and enable receiver after sending.

    irrecv.disableIRIn();
    irsend.sendRC5(code, 12);
    irrecv.enableIRIn();

after this I cannot receive any IR code.

hey Mark!

thank for sharing this!
i have a question. is it possible to send a raw data?
if so, is it limitied to a number of chars?

thanks you

Suggestion to the README file - Installation method.

There is a new way of adding libraries via the GUI.

  1. Download the ZIP file
  2. In Arduino IDE menu: Sketch | Include Library | Add .ZIP Library... point to the downloaded file and it will be added to the Arduino IDE.

How to process UNKNOWN encoding

First I'd like to thank you for your awesome work.

I have a question, how do I use the UNKNOWN encoding to trigger IR transmitter?

Encoding  : UNKNOWN
Code      : 6D23589D (32 bits)
Timing[93]: 
     +1300, - 450     +1300, - 450     + 500, -1250     +1300, - 450
     +1300, - 450     + 450, -1300     + 500, -1250     + 450, -1300
     + 500, -1250     + 450, -1300     + 450, -1300     +1350, -7200
     +1350, - 400     +1350, - 400     + 500, -1250     +1300, - 450
     +1300, - 450     + 450, -1300     + 500, -1250     + 450, -1300
     + 450, -1300     + 500, -1250     + 450, -1300     +1300, -7200
     +1300, - 450     +1300, - 450     + 450, -1300     +1350, - 400
     +1300, - 450     + 450, -1300     + 500, -1250     + 450, -1300
     + 450, -1300     + 450, -1300     + 450, -1300     +1300, -7200
     +1300, - 450     +1300, - 450     + 450, -1300     +1350, - 400
     +1300, - 400     + 450, -1300     + 450, -1300     + 500, -1250
     + 450, -1300     + 450, -1300     + 500
unsigned int  rawData[93] = {1300,450, 1300,450, 500,1250, 1300,450, 1300,450, 450,1300, 500,1250, 450,1300, 500,1250, 450,1300, 450,1300, 1350,7200, 1350,400, 1350,400, 500,1250, 1300,450, 1300,450, 450,1300, 500,1250, 450,1300, 450,1300, 500,1250, 450,1300, 1300,7200, 1300,450, 1300,450, 450,1300, 1350,400, 1300,450, 450,1300, 500,1250, 450,1300, 450,1300, 450,1300, 450,1300, 1300,7200, 1300,450, 1300,450, 450,1300, 1350,400, 1300,400, 450,1300, 450,1300, 500,1250, 450,1300, 450,1300, 500};  // UNKNOWN 6D23589D

Encoding  : UNKNOWN
Code      : F6D1C6CE (32 bits)
Timing[99]: 
     +1300, - 450     +1300, - 450     + 450, -1300     +1300, - 450
     +1300, - 450     + 450, -1300     + 450, -1300     + 450, -1300
     + 450, -1300     + 450, -1300     + 450, -1300     +1300, -7200
     +1300, - 450     +1300, - 450     + 450, -1300     +1300, - 450
     +1300, - 450     + 450, -1300     + 450, -1300     + 450, -1300
     + 450, -1300     + 450, -1300     + 450, -1300     +1300, -7200
     +1300, - 450     +1300, - 450     + 500, -1250     +1300, - 450
     +1300, - 450     + 450, -1300     + 450, -1300     + 450, -1300
     + 450, -1300     + 450, -1300     + 500, -1250     +1300, -7200
     +1300, - 450     +1300, - 450     + 450, -1300     +1300, - 450
     +1300, - 450     + 450, -1300     + 450, -1300     + 450, -1300
     + 450, -1300     + 450, -1300     + 500, -1250     +1300, -7200
     +1300, - 450     +1300
unsigned int  rawData[99] = {1300,450, 1300,450, 450,1300, 1300,450, 1300,450, 450,1300, 450,1300, 450,1300, 450,1300, 450,1300, 450,1300, 1300,7200, 1300,450, 1300,450, 450,1300, 1300,450, 1300,450, 450,1300, 450,1300, 450,1300, 450,1300, 450,1300, 450,1300, 1300,7200, 1300,450, 1300,450, 500,1250, 1300,450, 1300,450, 450,1300, 450,1300, 450,1300, 450,1300, 450,1300, 500,1250, 1300,7200, 1300,450, 1300,450, 450,1300, 1300,450, 1300,450, 450,1300, 450,1300, 450,1300, 450,1300, 450,1300, 500,1250, 1300,7200, 1300,450, 1300};  // UNKNOWN F6D1C6CE

Any input much appreciated!

Not decoding Daikin AC ARC479A5 Remote IR Codes.

Tried "IRrecvDump" example for Daikin AC Remote ARC479A5. It returns following response. Surprisingly along with Unknown type, it returns decode type "7(Panasonic)" data as well.

Decode Type: -1
Unknown encoding: B3E2CB06 (32 bits)
Raw (12): 500 -450 450 -450 450 -450 450 -450 500 -400 500
E400000C
Decode Type: 7
E400000C (48 bits)
Raw (100): 3500 -1750 500 -1300 500 -450 450 -450 500 -450 450 -1300 500 -450 500 -450 450 -400 500 -450 500 -1300 500 -350 550 -1300 500 -1300 500 -450 450 -1300 500 -1300 500 -1300 500 -1300 500 -1300 500 -450 450 -450 450 -1300 500 -450 500 -450 450 -450 500 -450 450 -400 550 -450 450 -450 450 -350 550 -450 450 -450 500 -450 500 -350 550 -450 500 -400 500 -450 450 -450 500 -450 450 -450 450 -450 450 -450 500 -400 500 -450 450 -1300 500 -1250 500 -400 500 -450 450

air conditioners no work

I have successfully used the irsend.sendRaw in most remote controls, but does not work in air conditioners, how do I make it work, because the codes seems to be similar to each other. See an example of the power button of an air conditioner sanyo: unsigned int rawData[99] = {4450,4450, 550,1700, 550,600, 550,1650, 550,1700, 550,600, 550,600, 550,1700, 550,600, 550,600, 550,1700, 550,600, 550,600, 550,1700, 550,1700, 550,600, 550,1700, 550,1700, 550,600, 550,1700, 550,1650, 550,1700, 550,1700, 550,1650, 550,1650, 550,600, 550,1700, 550,600, 550,600, 550,600, 550,600, 550,600, 550,600, 550,1700, 550,1700, 550,600, 550,1700, 550,600, 550,600, 550,600, 550,600, 550,600, 550,600, 550,1700, 550,600, 550,1700, 550,1700, 550,1700, 550,1700, 500}; // UNKNOWN 70B6FC0A
Any help is welcome thank you

ES-01 pin usage

I'm just finishing up my ES-01 build of an IRServer. The IRServer code currently uses GPIO 0 to flash the infrared LED. I found this inconvenient due to the pin being pulled low by the attached LED on every boot. This causes the ES-01 to go into flash mode, preventing normal running. I could get the thing to work but I had to disconnect the LED, reboot the ES-01, then reconnect the LED after boot.

I managed to get everything working smoothly on an ES-01 using GPIO 3/RX as the LED pin. This works almost without modification, but it did require me to disable the RX pin in the serial.begin() function.

https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRServer/IRServer.ino#L54
Serial.begin()

Revised version:
Serial.begin(115200,SERIAL_8N1,SERIAL_TX_ONLY);

This approach might be worth mentioning in a comment somewhere.

IRsend.sendSony() problem

Sony TV does not see the transmission from sendSony(). I simply use the IRSendDemo to send the following code to the Sony TV:
irsend.sendSony(0xC90, 12); // Volume Down

In order to debug the issue I did the following:

  • Built another ESP8266 with IR Receiver and the sample IRrecvDumpV2. It recognized the codes from both the original Sony Remote Control, as well as from my ESP8266 transmitter described above. Below are 3 samples of each.
  • Previously tried the same IR LED on an Arduino build and saw that the Sony TV reads it, so the LED has the correct wavelength (940).

I presume this may be some timing tolerance issue, but I am not savvy enough in the IR codes to spot the problem. Please help.

Thanks,
Jordan
P.S. 3 samples of readings by IRrecvDumpV2 from IRSendDemo and original Sony Remote:

***** Sent by IRSendDemo with irsend.sendSony(0xC90, 12); // Volume Down:

Encoding : SONY
Code : C90 (12 bits)
Timing[27]:
+2550, - 500 +1350, - 550 +1350, - 550 + 750, - 500
+ 750, - 500 +1350, - 550 + 700, - 550 + 750, - 550
+1300, - 550 + 750, - 550 + 700, - 550 + 750, - 550
+ 700, -14550 + 200
unsigned int rawData[27] = {2550,500, 1350,550, 1350,550, 750,500, 750,500, 1350,550, 700,550, 750,550, 1300,550, 750,550, 700,550, 750,550, 700,14550, 200}; // SONY C90
unsigned int data = 0xC90;

Encoding : SONY
Code : C90 (12 bits)
Timing[25]:
+2550, - 500 +1350, - 550 +1300, - 500 + 750, - 500
+ 750, - 550 +1300, - 550 + 750, - 550 + 700, - 550
+1350, - 550 + 700, - 600 + 650, - 550 + 700, - 550
+ 750
unsigned int rawData[25] = {2550,500, 1350,550, 1300,500, 750,500, 750,550, 1300,550, 750,550, 700,550, 1350,550, 700,600, 650,550, 700,550, 750}; // SONY C90
unsigned int data = 0xC90;

Encoding : SONY
Code : C90 (12 bits)
Timing[27]:
+2550, - 500 +1350, - 500 +1350, - 550 + 750, - 500
+ 750, - 500 +1350, - 500 + 800, - 500 + 750, - 550
+1300, - 550 + 750, - 550 + 700, - 600 + 750, - 550
+ 700, -1800 + 250
unsigned int rawData[27] = {2550,500, 1350,500, 1350,550, 750,500, 750,500, 1350,500, 800,500, 750,550, 1300,550, 750,550, 700,600, 750,550, 700,1800, 250}; // SONY C90
unsigned int data = 0xC90;


***** Sent by Original Sony Remote Control:

Encoding : SONY
Code : C90 (12 bits)
Timing[25]:
+2550, - 500 +1300, - 600 +1250, - 600 + 700, - 550
+ 650, - 600 +1250, - 600 + 650, - 600 + 650, - 550
+1300, - 600 + 700, - 550 + 650, - 600 + 650, - 550
+ 650
unsigned int rawData[25] = {2550,500, 1300,600, 1250,600, 700,550, 650,600, 1250,600, 650,600, 650,550, 1300,600, 700,550, 650,600, 650,550, 650}; // SONY C90
unsigned int data = 0xC90;

Encoding : SONY
Code : C90 (12 bits)
Timing[25]:
+2550, - 500 +1300, - 550 +1250, - 600 + 650, - 550
+ 650, - 550 +1300, - 600 + 650, - 600 + 650, - 600
+1250, - 600 + 650, - 600 + 700, - 550 + 700, - 550
+ 700
unsigned int rawData[25] = {2550,500, 1300,550, 1250,600, 650,550, 650,550, 1300,600, 650,600, 650,600, 1250,600, 650,600, 700,550, 700,550, 700}; // SONY C90
unsigned int data = 0xC90;

Encoding : SONY
Code : C90 (12 bits)
Timing[25]:
+2650, - 450 +1350, - 550 +1250, - 600 + 650, - 600
+ 650, - 600 +1250, - 600 + 650, - 550 + 650, - 600
+1250, - 600 + 650, - 600 + 650, - 600 + 650, - 600
+ 650
unsigned int rawData[25] = {2650,450, 1350,550, 1250,600, 650,600, 650,600, 1250,600, 650,550, 650,600, 1250,600, 650,600, 650,600, 650,600, 650}; // SONY C90
unsigned int data = 0xC90;

Library not properly decoding Samsung remote

I'm trying to use the library with a Samsung remote, and this is the data I get for a volume down key on the remote:
Code: 83B19366
Raw: rawData[67] = {4550,4550, 600,1700, 550,1750, 550,1750, 550,600, 550,600, 550,600, 550,600, 550,600, 550,1750, 550,1750, 550,1750, 550,600, 550,600, 550,600, 550,600, 550,600, 550,1750, 550,1750, 550,600, 550,1750, 550,600, 550,600, 550,600, 550,600, 550,600, 550,600, 550,1750, 550,600, 550,1750, 550,1750, 550,1750, 550,1750, 550};

If I try to send that signal using the hex code and the sendSamsung function, nothing happens. I am able to make it work though by sending the raw data.

I moved back into the original IRremote - which this library was based on - with a regular arduino, and I got a different hex code for the same volume down key: E0E0D02F. And if I use this code with the IRremoteESP8266 library and the sendSamsung function, it does work.

Is there a reason for the IRremoteESP8266 library not properly decoding - or at least not generating the right hex code - for the Samsung remote? Can someone provide me guidance on how to fix this?

Thanks,

Christian

IRGCTCPServer example questions

How is the IRGCTCPServer example supposed to work?
I'm a bit new to ESP8266 and I had a question about this example:

  • Is the example missing an explicit command to connect to WiFi? (something like WiFi.begin?)

I'm very excited about this project!!! I am looking forward to being able to trigger IR commands from the terminal if that is possible. Thanks!!!
-Mike

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.