Well seen, there is a problem with the atol function used in the sketch which limit the conversion to the max integer value, it should limit to the max long value, I don’t know why it is acting like that…
I have replaced this function by a method based on a foor loop.
Now you should not see this strange value anymore unless you push it voluntary.
Right I tried it with a normal LED and it doesnt seem to work. I strongly believe my circuit is incorrect.
I have tried to explain what I meant by :
"Schematic it shows 1 (emitter) is connected to the resistor which then connects to pin D5, 2 (base) is connected to GND and 3 (collector) is connected to the IR LED.
Now I was looking at your other diagram it shows that you have connected 2 (base) to the resistor which is then connected to pin D5 and 1 (emitter) is connected to the GND. So which one is correct? because I am following the schematic i.e. 1 (emitter) connected to the resistor which is connected to pin D5, 2 (base) connected to GND and 3 (collector) connected to IR LED.”
Please check image 1 where I have written in black as it does not match with image 2 i.e. the transistor connection is not the same in image 1 and image 2.
Try removing the transistor circuit and put a normal led with a resistor on d5 directly and check if it light on when emitting.
If yes try replacing the led with the ir one and emit close to your device.
Yes try to go on a step by step approach. See if a normal led light on. If yes replace it with an ir one and try to emit close to your receiver.
Added to that you could test first with your tv remote and tv receiver there is better chance to succeed compared to other devices.
ok so all this time I have been trying my TV sorry I did not inform you this. However I have tried with all the topics i.e. sendSAMSUNG, sendLG, sendNEC etc. I have a Samsung TV and I decoded the code 3772793023 which I believe is the one for turning the TV on/off.
I plugged a normal LED anode to D5 and cathode to GND and surprising when I turn the switch on or off from HA the LED flashes accordingly.
Now I put back an IR LED which I have of 3 types with the resistor (100 omhs) connected to its anode which is then connected to D5 and its cathode to GND but still it does not turn the TV on or off with this code “3772793023”. I have tried with all the 3 different types of LEDs I have and nothing works
I cannot understand what is wrong. I tried it with 2 different ESP8266 boards as well (one is Wemos D1 and the other is NodeMCU).
If your tv control is not your final goal you can try with other devices, the LG devices with the protocol sendNEC seems to work well. For the other devices don’t hesitate to search for IRRemote and Arduino keyword plus the brand of the device.
as it is, the gateway is designed to pass long type parameter value and not raw data.
If you have other devices that you want to implement and if it doesn’t work you can take a look at google with the following keyword “arduino” + “irremote” + “brand device” you can find more data about what is going wrong
Hi, The IRremote library seems to be compatible with RC5 but this is not implemented at the gateway. Issue added for emission (it should work on receiving)