D1 Mini, IR led, Samsung TV off

Hi,

since the samsung integration does allow me all but power off the TV I needed to find another solution. Recently I discovered ESPhome and it’s addicting… when it works :-).
ps don’t ask why the TV won’t shut off, it’s a samsung The Frame and off via the integration puts in “art mode”, thus not off. Power off needs a longer button press on the RC.

I have done.

  1. flashed a D1 mini with re IR receiver etc. and captured:
[09:46:15][D][remote.raw:028]: Received Raw: -4426, 4574, -514, 1759, -512, 1759, -514, 1757, -514, 630, -514, 631, -512, 632, -511, 632, -542, 602, -512, 1760, -512, 1761, -511, 1760, -512, 632, -512, 634, -511, 634, -539, 604, -510, 635, -538, 604, -541, 1731, -512, 1760, -511, 633, 
[09:46:15][D][remote.raw:041]:   -512, 634, -510, 1760, -512, 1761, -511, 1761, -511, 1761, -539, 604, -512, 633, -540, 1732, -538, 1734, -511, 632, -512, 633, -511, 632, -512
[09:46:15][D][remote.raw:028]: Received Raw: -4455, 4547, -511, 1761, -510, 1762, -541, 1731, -538, 605, -512, 633, -511, 632, -512, 633, -511, 661, -513, 1732, -510, 1762, -511, 1761, -510, 634, -539, 604, -518, 627, -510, 633, -541, 602, -541, 604, -541, 1732, -511, 1760, -540, 605, 
[09:46:15][D][remote.raw:041]:   -510, 634, -541, 1730, -513, 1759, -512, 1761, -511, 1761, -540, 603, -512, 633, -511, 1761, -511, 1760, -512, 634, -510, 633, -538, 607, -540
[09:46:15][D][remote.raw:028]: Received Raw: -4514, 4489, -514, 1758, -514, 1759, -598, 1673, -514, 632, -512, 632, -543, 601, -543, 602, -596, 547, -596, 1676, -544, 1729, -512, 1759, -594, 551, -543, 600, -594, 550, -596, 548, -594, 550, -594, 550, -595, 1678, -593, 1678, -513, 634, 
[09:46:15][D][remote.raw:041]:   -592, 550, -544, 1728, -543, 1729, -539, 1734, -542, 1729, -540, 604, -514, 631, -595, 1676, -544, 1728, -594, 551, -543, 600, -543, 602, -541
[09:46:15][D][remote.raw:028]: Received Raw: -4471, 4532, -543, 1729, -593, 1679, -594, 1678, -541, 630, -516, 601, -542, 601, -593, 552, -542, 603, -542, 1729, -543, 1757, -515, 1730, -542, 602, -541, 630, -515, 602, -542, 603, -540, 602, -514, 633, -541, 1729, -512, 1760, -592, 553, 
[09:46:15][D][remote.raw:041]:   -517, 627, -539, 1732, -541, 1759, -515, 1730, -542, 1731, -541, 602, -513, 632, -541, 1730, -543, 1729, -543, 603, -539, 604, -543, 601, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4427, 4577, -542, 1757, -515, 1729, -513, 1759, -540, 604, -513, 632, -512, 632, -513, 632, -542, 601, -512, 1761, -512, 1758, -513, 1759, -513, 632, -544, 600, -513, 632, -541, 602, -513, 631, -514, 630, -513, 1760, -512, 1760, -513, 631, 
[09:46:16][D][remote.raw:041]:   -591, 553, -513, 1759, -513, 1759, -513, 1760, -512, 1759, -513, 632, -512, 632, -512, 1760, -512, 1760, -538, 606, -538, 606, -513, 632, -512
[09:46:16][D][remote.raw:028]: Received Raw: -4456, 4546, -539, 1734, -539, 1733, -538, 1734, -539, 605, -539, 605, -539, 606, -539, 604, -539, 605, -540, 1733, -539, 1732, -539, 1734, -539, 604, -534, 611, -539, 605, -540, 604, -539, 605, -539, 605, -539, 1733, -539, 1733, -540, 604, 
[09:46:16][D][remote.raw:041]:   -539, 605, -542, 1730, -539, 1733, -539, 1733, -539, 1733, -540, 605, -539, 605, -539, 1733, -539, 1732, -539, 606, -539, 605, -539, 605, -538
[09:46:16][D][remote.raw:028]: Received Raw: -4455, 4546, -540, 1733, -538, 1734, -539, 1734, -512, 631, -540, 604, -539, 606, -538, 605, -539, 606, -538, 1733, -540, 1733, -539, 1733, -539, 604, -540, 605, -540, 605, -538, 605, -539, 606, -538, 605, -539, 1733, -540, 1732, -540, 603, 
[09:46:16][D][remote.raw:041]:   -541, 604, -540, 1732, -540, 1733, -537, 1734, -540, 1732, -538, 606, -540, 605, -540, 1732, -539, 1733, -539, 605, -538, 606, -539, 605, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4456, 4546, -513, 1758, -514, 1760, -513, 1759, -514, 630, -513, 630, -539, 605, -520, 625, -538, 606, -539, 1733, -513, 1759, -513, 1759, -538, 605, -517, 628, -513, 631, -537, 608, -538, 605, -538, 606, -540, 1733, -539, 1732, -539, 605, 
[09:46:16][D][remote.raw:041]:   -538, 607, -539, 1733, -513, 1758, -540, 1733, -539, 1732, -539, 605, -539, 606, -513, 1759, -513, 1759, -512, 633, -512, 631, -514, 630, -513
[09:46:16][D][remote.raw:028]: Received Raw: -4457, 4545, -515, 1757, -513, 1759, -513, 1760, -513, 631, -513, 630, -539, 606, -538, 606, -512, 632, -513, 1759, -529, 1743, -513, 1759, -513, 631, -525, 619, -539, 605, -538, 606, -513, 631, -538, 607, -512, 1759, -539, 1733, -513, 631, 
[09:46:16][D][remote.raw:041]:   -539, 605, -514, 1758, -513, 1759, -513, 1759, -514, 1758, -513, 632, -512, 632, -513, 1758, -513, 1760, -512, 632, -513, 630, -514, 630, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4456, 4545, -514, 1759, -513, 1759, -539, 1733, -514, 630, -513, 632, -512, 631, -513, 632, -513, 631, -538, 1733, -513, 1760, -540, 1731, -514, 631, -512, 632, -512, 632, -513, 631, -513, 631, -513, 631, -513, 1759, -540, 1731, -514, 630, 
[09:46:16][D][remote.raw:041]:   -514, 631, -514, 1759, -512, 1759, -513, 1759, -513, 1760, -590, 553, -513, 631, -513, 1759, -513, 1759, -538, 606, -540, 605, -590, 553, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4452, 4549, -515, 1758, -543, 1729, -543, 1729, -543, 602, -538, 605, -539, 605, -514, 630, -514, 630, -542, 1730, -514, 1758, -542, 1758, -512, 604, -514, 630, -542, 603, -541, 601, -515, 631, -538, 606, -541, 1729, -514, 1760, -541, 602, 
[09:46:16][D][remote.raw:041]:   -539, 604, -514, 1786, -516, 1729, -542, 1730, -541, 1730, -514, 631, -543, 601, -540, 1731, -514, 1760, -541, 602, -542, 602, -542, 602, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4452, 4550, -541, 1732, -541, 1732, -541, 1730, -513, 631, -513, 631, -542, 602, -540, 604, -541, 603, -544, 1729, -542, 1729, -515, 1758, -513, 631, -513, 632, -513, 630, -540, 604, -513, 631, -542, 603, -541, 1730, -542, 1729, -542, 604, 
[09:46:16][D][remote.raw:041]:   -543, 600, -514, 1759, -541, 1731, -541, 1731, -542, 1729, -514, 631, -513, 632, -542, 1729, -540, 1732, -539, 605, -514, 630, -513, 632, -513
[09:46:16][D][remote.raw:028]: Received Raw: -4427, 4576, -542, 1730, -542, 1730, -593, 1707, -485, 631, -541, 631, -514, 602, -593, 552, -541, 603, -542, 1728, -514, 1759, -520, 1754, -540, 603, -512, 631, -542, 603, -538, 607, -540, 602, -513, 631, -595, 1678, -543, 1729, -541, 603, 
[09:46:16][D][remote.raw:041]:   -542, 602, -513, 1760, -541, 1730, -542, 1730, -543, 1729, -512, 633, -542, 602, -542, 1729, -544, 1728, -543, 601, -540, 605, -592, 551, -513
[09:46:17][D][remote.raw:028]: Received Raw: -4471, 4551, -543, 1730, -542, 1731, -541, 1729, -513, 631, -513, 631, -592, 553, -513, 631, -543, 601, -512, 1760, -542, 1730, -543, 1728, -513, 659, -516, 601, -563, 581, -513, 630, -514, 631, -513, 631, -591, 1681, -513, 1759, -544, 601, 
[09:46:17][D][remote.raw:041]:   -541, 603, -543, 1729, -543, 1728, -541, 1732, -512, 1759, -514, 630, -514, 631, -536, 1735, -514, 1759, -512, 633, -541, 603, -512, 632, -512
[09:46:17][D][remote.raw:028]: Received Raw: -4457, 4545, -513, 1760, -542, 1729, -593, 1679, -513, 632, -513, 631, -512, 631, -539, 605, -513, 633, -512, 1758, -514, 1758, -544, 1729, -512, 632, -512, 632, -513, 632, -543, 600, -513, 632, -512, 631, -514, 1759, -513, 1759, -591, 552, 
[09:46:17][D][remote.raw:041]:   -514, 631, -512, 1760, -512, 1759, -592, 1680, -514, 1759, -543, 601, -513, 631, -512, 1760, -513, 1760, -541, 602, -513, 631, -513, 631, -513
[09:46:17][D][remote.raw:028]: Received Raw: -4457, 4546, -541, 1730, -539, 1733, -544, 1729, -513, 631, -513, 631, -513, 631, -513, 631, -513, 631, -513, 1759, -542, 1729, -514, 1759, -543, 601, -513, 631, -513, 631, -541, 604, -512, 632, -542, 601, -513, 1760, -512, 1759, -513, 631, 
[09:46:17][D][remote.raw:041]:   -514, 631, -543, 1728, -539, 1734, -512, 1760, -542, 1730, -513, 630, -514, 631, -593, 1679, -513, 1760, -512, 631, -513, 633, -542, 601, -542
[09:46:17][D][remote.raw:028]: Received Raw: -4457, 4545, -513, 1759, -514, 1758, -514, 1759, -513, 630, -540, 605, -513, 631, -539, 605, -531, 613, -538, 1733, -540, 1733, -540, 1731, -536, 609, -540, 604, -539, 605, -540, 604, -540, 605, -539, 605, -538, 1733, -540, 1733, -539, 605, 
[09:46:17][D][remote.raw:041]:   -540, 604, -540, 1732, -540, 1732, -540, 1732, -541, 1731, -541, 604, -540, 603, -541, 1732, -540, 1731, -572, 573, -598, 546, -516, 628, -517
[09:46:17][D][remote.raw:028]: Received Raw: -4456, 4546, -541, 1732, -539, 1732, -541, 1731, -541, 603, -540, 605, -541, 602, -541, 603, -542, 602, -542, 1731, -540, 1732, -540, 1732, -541, 603, -540, 604, -541, 603, -541, 604, -540, 603, -541, 604, -540, 1732, -540, 1731, -541, 605, 
[09:46:17][D][remote.raw:041]:   -540, 603, -540, 1731, -542, 1731, -540, 1732, -540, 1731, -541, 604, -540, 604, -541, 1731, -540, 1733, -540, 603, -541, 603, -540, 604, -541
[09:46:17][D][remote.raw:028]: Received Raw: -4454, 4548, -572, 1700, -541, 1731, -570, 1702, -541, 603, -541, 604, -539, 604, -541, 603, -541, 603, -541, 1731, -570, 1702, -541, 1731, -541, 604, -540, 603, -541, 604, -570, 573, -541, 604, -541, 603, -561, 1711, -540, 1732, -540, 604, 
[09:46:17][D][remote.raw:041]:   -540, 604, -541, 1730, -541, 1732, -571, 1701, -571, 1701, -541, 603, -571, 573, -570, 1702, -541, 1731, -571, 573, -541, 603, -516, 629, -540
[09:46:17][D][remote.raw:028]: Received Raw: -4455, 4546, -541, 1731, -541, 1732, -541, 1731, -540, 604, -541, 604, -540, 603, -541, 603, -541, 603, -541, 1731, -541, 1731, -541, 1732, -540, 603, -541, 604, -540, 604, -541, 602, -541, 603, -541, 603, -542, 1731, -541, 1731, -540, 604, 
[09:46:17][D][remote.raw:041]:   -541, 603, -540, 1731, -541, 1733, -540, 1731, -541, 1731, -540, 604, -541, 603, -541, 1732, -541, 1731, -540, 604, -540, 604, -540, 603, -541
[09:46:17][D][remote.raw:028]: Received Raw: -4454, 4547, -542, 1731, -540, 1732, -540, 1732, -541, 603, -540, 604, -540, 604, -540, 605, -540, 603, -541, 1732, -540, 1732, -540, 1731, -541, 603, -541, 603, -541, 603, -541, 604, -540, 603, -541, 603, -542, 1730, -540, 1732, -541, 604, 
[09:46:17][D][remote.raw:041]:   -540, 604, -540, 1732, -540, 1732, -540, 1731, -542, 1730, -540, 605, -541, 603, -539, 1733, -539, 1733, -538, 605, -539, 605, -540, 604, -539
[09:46:17][D][remote.raw:028]: Received Raw: -4458, 4544, -598, 1675, -594, 1678, -544, 1729, -596, 548, -596, 548, -594, 550, -595, 550, -542, 602, -540, 1732, -542, 1730, -594, 1679, -541, 602, -542, 603, -542, 602, -542, 630, -511, 606, -541, 602, -543, 1729, -543, 1730, -592, 553, 
[09:46:17][D][remote.raw:041]:   -542, 601, -513, 1761, -540, 1730, -540, 1733, -512, 1760, -543, 601, -514, 631, -511, 1760, -542, 1730, -541, 604, -513, 630, -513, 632, -539
  1. Flashed another D1 mini with:
esphome:
  name: irtransmitter
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "nope"
  password: "haha"
  use_address: 192.168.6.11
  domain: .domain.local

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Irtransmitter Fallback Hotspot"
    password: "nope"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

web_server:
  port: 80

remote_transmitter:
  pin: D1
  # Infrared remotes use a 50% carrier signal
  carrier_duty_percent: 50%
  
switch:
  - platform: template
    name: TheFrame Off (IR)
    turn_on_action:
     - remote_transmitter.transmit_raw:
         code: [-4426, 4574, -514, 1759, -512, 1759, -514, 1757, -514, 630, -514, 631, -512, 632, -511, 632, -542, 602, -512, 1760, -512, 1761, -511, 1760, -512, 632, -512, 634, -511]

I get:

And I have:

With this I have 2 problems.

  1. nothing happens :-). I do not see any IR signals via and old fashion digital camera (remote control I do see though).
  2. I am not sure that if the IR would send I am having “all raw signals” sent. Since the RC button has to be hold ~1-2sec and produces above output I am not sure how to resend that raw output in esphome config (yaml).

Hope for some help.

thanks in advance!

same issue here.
Im suspecting that it may need a resistor in between or a pullup?
Although will pullup didn’t work either.

I think also… but how…
I read:


then

then
https://learn.sparkfun.com/tutorials/ir-communication/all

and I see:

Circuit Diagram

Here is the complete setup for connecting to an Arduino:

hardware setup

Hardware setup for both of the examples.

Be sure to connect your LED correctly! The long leg is positive and connects to the resistor, then to the Arduino’s output pin. The short leg is negative and is connected to ground (GND).

Also, you cannot see IR LED light with your eyes, since IR radiation is outside of the visible spectrum. However, most cellphone cameras can detect short wave IR and can see the LED faintly glowing.

ir led remote

When the LED is modulating at 38kHz, the LED should appear constantly lit, but dim.

Also, pay attention to the polarity of the TSOP382. Refer to the TSOP382 datasheet for the pinout of the sensor.

The current limiting resistor attached to the LED can have values down to 100Ω (40mA) for full power and longest range. If you use a larger value resistor, the LED won’t light as bright and your range will suffer. With a 330Ω resistor, you should be able to operate the IR LED across a dimly lit room.

But I do not really know “what” to do then? Maybe it is my english…?

I do the same thing and works fine. I have one of those long IR extender cables directly wired to D6 and GND, similar to this:

https://uk.farnell.com/mcm-custom-audio/50-14870/3-5mm-plug-single-ir-emitter/dp/2822492?gclid=Cj0KCQjw4f35BRDBARIsAPePBHxoHO3New0Kn92sGTam9DZlnnWkLEOQSOUhPH7SOzhh_KqM4PVhEKIaAr7gEALw_wcB&gross_price=true&mckv=sckjQpyoa_dc|pcrid|431976338052|plid||kword||match||slid||product|2822492|pgrid|99283332854|ptaid|pla-900801229103|&CMP=KNC-GUK-SHOPPING-OPTOELECTRONICS-AUDIOVISUAL-NEWSTRUCTURE-Test113-MarinBidding

Maybe try this instead of the RAW code:


remote_transmitter:
  pin: D6
  carrier_duty_percent: 50%

switch:
  - platform: template
    name: "Samsung TV Power"
    icon: mdi:remote
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E040BF

I would highly recommend using a resistor, since it is not optional. Your ESP outputs 3,3V. The LED at its sweetspot takes roughly 1.5V. So having 1,8V too much results in a lot more current than the LED can handle. If you would connect the LED directly to a 3,3V power supply with sufficient current output, you would likely see some visible light and then watch the destruction of the LED.
But the ESP can only give so much current per pin. Therefore I am guessing that the LED is still intact, but your portpin is now dead.
There are some “Arduino” IR modules buyable that would get rid of the problem, or you use a resistor to assist the ESP in driving the LED.
One other way (which is somehow dirty) is to put the IR and a normal LED in series and connect it to the ESP. Then you would distribute the voltage between the LEDs and limit the current. You would at least see some light on the normal LED when you trigger the sending. If the IR power is then sufficient to actually transmitt the IR signal is a bit of luck.
But this is only the electrical side. Codewise there might still be a problem.

Thank you, but “what resistor” what does “have values down to 100Ω” means? Tha I can get one in the range from 100-1000? or???

Ok, have a 100ohm between.

now some faint light… but no response tv…

how can I send out:

[09:46:15][D][remote.raw:028]: Received Raw: -4426, 4574, -514, 1759, -512, 1759, -514, 1757, -514, 630, -514, 631, -512, 632, -511, 632, -542, 602, -512, 1760, -512, 1761, -511, 1760, -512, 632, -512, 634, -511, 634, -539, 604, -510, 635, -538, 604, -541, 1731, -512, 1760, -511, 633, 
[09:46:15][D][remote.raw:041]:   -512, 634, -510, 1760, -512, 1761, -511, 1761, -511, 1761, -539, 604, -512, 633, -540, 1732, -538, 1734, -511, 632, -512, 633, -511, 632, -512
[09:46:15][D][remote.raw:028]: Received Raw: -4455, 4547, -511, 1761, -510, 1762, -541, 1731, -538, 605, -512, 633, -511, 632, -512, 633, -511, 661, -513, 1732, -510, 1762, -511, 1761, -510, 634, -539, 604, -518, 627, -510, 633, -541, 602, -541, 604, -541, 1732, -511, 1760, -540, 605, 
[09:46:15][D][remote.raw:041]:   -510, 634, -541, 1730, -513, 1759, -512, 1761, -511, 1761, -540, 603, -512, 633, -511, 1761, -511, 1760, -512, 634, -510, 633, -538, 607, -540
[09:46:15][D][remote.raw:028]: Received Raw: -4514, 4489, -514, 1758, -514, 1759, -598, 1673, -514, 632, -512, 632, -543, 601, -543, 602, -596, 547, -596, 1676, -544, 1729, -512, 1759, -594, 551, -543, 600, -594, 550, -596, 548, -594, 550, -594, 550, -595, 1678, -593, 1678, -513, 634, 
[09:46:15][D][remote.raw:041]:   -592, 550, -544, 1728, -543, 1729, -539, 1734, -542, 1729, -540, 604, -514, 631, -595, 1676, -544, 1728, -594, 551, -543, 600, -543, 602, -541
[09:46:15][D][remote.raw:028]: Received Raw: -4471, 4532, -543, 1729, -593, 1679, -594, 1678, -541, 630, -516, 601, -542, 601, -593, 552, -542, 603, -542, 1729, -543, 1757, -515, 1730, -542, 602, -541, 630, -515, 602, -542, 603, -540, 602, -514, 633, -541, 1729, -512, 1760, -592, 553, 
[09:46:15][D][remote.raw:041]:   -517, 627, -539, 1732, -541, 1759, -515, 1730, -542, 1731, -541, 602, -513, 632, -541, 1730, -543, 1729, -543, 603, -539, 604, -543, 601, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4427, 4577, -542, 1757, -515, 1729, -513, 1759, -540, 604, -513, 632, -512, 632, -513, 632, -542, 601, -512, 1761, -512, 1758, -513, 1759, -513, 632, -544, 600, -513, 632, -541, 602, -513, 631, -514, 630, -513, 1760, -512, 1760, -513, 631, 
[09:46:16][D][remote.raw:041]:   -591, 553, -513, 1759, -513, 1759, -513, 1760, -512, 1759, -513, 632, -512, 632, -512, 1760, -512, 1760, -538, 606, -538, 606, -513, 632, -512
[09:46:16][D][remote.raw:028]: Received Raw: -4456, 4546, -539, 1734, -539, 1733, -538, 1734, -539, 605, -539, 605, -539, 606, -539, 604, -539, 605, -540, 1733, -539, 1732, -539, 1734, -539, 604, -534, 611, -539, 605, -540, 604, -539, 605, -539, 605, -539, 1733, -539, 1733, -540, 604, 
[09:46:16][D][remote.raw:041]:   -539, 605, -542, 1730, -539, 1733, -539, 1733, -539, 1733, -540, 605, -539, 605, -539, 1733, -539, 1732, -539, 606, -539, 605, -539, 605, -538
[09:46:16][D][remote.raw:028]: Received Raw: -4455, 4546, -540, 1733, -538, 1734, -539, 1734, -512, 631, -540, 604, -539, 606, -538, 605, -539, 606, -538, 1733, -540, 1733, -539, 1733, -539, 604, -540, 605, -540, 605, -538, 605, -539, 606, -538, 605, -539, 1733, -540, 1732, -540, 603, 
[09:46:16][D][remote.raw:041]:   -541, 604, -540, 1732, -540, 1733, -537, 1734, -540, 1732, -538, 606, -540, 605, -540, 1732, -539, 1733, -539, 605, -538, 606, -539, 605, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4456, 4546, -513, 1758, -514, 1760, -513, 1759, -514, 630, -513, 630, -539, 605, -520, 625, -538, 606, -539, 1733, -513, 1759, -513, 1759, -538, 605, -517, 628, -513, 631, -537, 608, -538, 605, -538, 606, -540, 1733, -539, 1732, -539, 605, 
[09:46:16][D][remote.raw:041]:   -538, 607, -539, 1733, -513, 1758, -540, 1733, -539, 1732, -539, 605, -539, 606, -513, 1759, -513, 1759, -512, 633, -512, 631, -514, 630, -513
[09:46:16][D][remote.raw:028]: Received Raw: -4457, 4545, -515, 1757, -513, 1759, -513, 1760, -513, 631, -513, 630, -539, 606, -538, 606, -512, 632, -513, 1759, -529, 1743, -513, 1759, -513, 631, -525, 619, -539, 605, -538, 606, -513, 631, -538, 607, -512, 1759, -539, 1733, -513, 631, 
[09:46:16][D][remote.raw:041]:   -539, 605, -514, 1758, -513, 1759, -513, 1759, -514, 1758, -513, 632, -512, 632, -513, 1758, -513, 1760, -512, 632, -513, 630, -514, 630, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4456, 4545, -514, 1759, -513, 1759, -539, 1733, -514, 630, -513, 632, -512, 631, -513, 632, -513, 631, -538, 1733, -513, 1760, -540, 1731, -514, 631, -512, 632, -512, 632, -513, 631, -513, 631, -513, 631, -513, 1759, -540, 1731, -514, 630, 
[09:46:16][D][remote.raw:041]:   -514, 631, -514, 1759, -512, 1759, -513, 1759, -513, 1760, -590, 553, -513, 631, -513, 1759, -513, 1759, -538, 606, -540, 605, -590, 553, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4452, 4549, -515, 1758, -543, 1729, -543, 1729, -543, 602, -538, 605, -539, 605, -514, 630, -514, 630, -542, 1730, -514, 1758, -542, 1758, -512, 604, -514, 630, -542, 603, -541, 601, -515, 631, -538, 606, -541, 1729, -514, 1760, -541, 602, 
[09:46:16][D][remote.raw:041]:   -539, 604, -514, 1786, -516, 1729, -542, 1730, -541, 1730, -514, 631, -543, 601, -540, 1731, -514, 1760, -541, 602, -542, 602, -542, 602, -539
[09:46:16][D][remote.raw:028]: Received Raw: -4452, 4550, -541, 1732, -541, 1732, -541, 1730, -513, 631, -513, 631, -542, 602, -540, 604, -541, 603, -544, 1729, -542, 1729, -515, 1758, -513, 631, -513, 632, -513, 630, -540, 604, -513, 631, -542, 603, -541, 1730, -542, 1729, -542, 604, 
[09:46:16][D][remote.raw:041]:   -543, 600, -514, 1759, -541, 1731, -541, 1731, -542, 1729, -514, 631, -513, 632, -542, 1729, -540, 1732, -539, 605, -514, 630, -513, 632, -513
[09:46:16][D][remote.raw:028]: Received Raw: -4427, 4576, -542, 1730, -542, 1730, -593, 1707, -485, 631, -541, 631, -514, 602, -593, 552, -541, 603, -542, 1728, -514, 1759, -520, 1754, -540, 603, -512, 631, -542, 603, -538, 607, -540, 602, -513, 631, -595, 1678, -543, 1729, -541, 603, 
[09:46:16][D][remote.raw:041]:   -542, 602, -513, 1760, -541, 1730, -542, 1730, -543, 1729, -512, 633, -542, 602, -542, 1729, -544, 1728, -543, 601, -540, 605, -592, 551, -513
[09:46:17][D][remote.raw:028]: Received Raw: -4471, 4551, -543, 1730, -542, 1731, -541, 1729, -513, 631, -513, 631, -592, 553, -513, 631, -543, 601, -512, 1760, -542, 1730, -543, 1728, -513, 659, -516, 601, -563, 581, -513, 630, -514, 631, -513, 631, -591, 1681, -513, 1759, -544, 601, 
[09:46:17][D][remote.raw:041]:   -541, 603, -543, 1729, -543, 1728, -541, 1732, -512, 1759, -514, 630, -514, 631, -536, 1735, -514, 1759, -512, 633, -541, 603, -512, 632, -512
[09:46:17][D][remote.raw:028]: Received Raw: -4457, 4545, -513, 1760, -542, 1729, -593, 1679, -513, 632, -513, 631, -512, 631, -539, 605, -513, 633, -512, 1758, -514, 1758, -544, 1729, -512, 632, -512, 632, -513, 632, -543, 600, -513, 632, -512, 631, -514, 1759, -513, 1759, -591, 552, 
[09:46:17][D][remote.raw:041]:   -514, 631, -512, 1760, -512, 1759, -592, 1680, -514, 1759, -543, 601, -513, 631, -512, 1760, -513, 1760, -541, 602, -513, 631, -513, 631, -513
[09:46:17][D][remote.raw:028]: Received Raw: -4457, 4546, -541, 1730, -539, 1733, -544, 1729, -513, 631, -513, 631, -513, 631, -513, 631, -513, 631, -513, 1759, -542, 1729, -514, 1759, -543, 601, -513, 631, -513, 631, -541, 604, -512, 632, -542, 601, -513, 1760, -512, 1759, -513, 631, 
[09:46:17][D][remote.raw:041]:   -514, 631, -543, 1728, -539, 1734, -512, 1760, -542, 1730, -513, 630, -514, 631, -593, 1679, -513, 1760, -512, 631, -513, 633, -542, 601, -542
[09:46:17][D][remote.raw:028]: Received Raw: -4457, 4545, -513, 1759, -514, 1758, -514, 1759, -513, 630, -540, 605, -513, 631, -539, 605, -531, 613, -538, 1733, -540, 1733, -540, 1731, -536, 609, -540, 604, -539, 605, -540, 604, -540, 605, -539, 605, -538, 1733, -540, 1733, -539, 605, 
[09:46:17][D][remote.raw:041]:   -540, 604, -540, 1732, -540, 1732, -540, 1732, -541, 1731, -541, 604, -540, 603, -541, 1732, -540, 1731, -572, 573, -598, 546, -516, 628, -517
[09:46:17][D][remote.raw:028]: Received Raw: -4456, 4546, -541, 1732, -539, 1732, -541, 1731, -541, 603, -540, 605, -541, 602, -541, 603, -542, 602, -542, 1731, -540, 1732, -540, 1732, -541, 603, -540, 604, -541, 603, -541, 604, -540, 603, -541, 604, -540, 1732, -540, 1731, -541, 605, 
[09:46:17][D][remote.raw:041]:   -540, 603, -540, 1731, -542, 1731, -540, 1732, -540, 1731, -541, 604, -540, 604, -541, 1731, -540, 1733, -540, 603, -541, 603, -540, 604, -541
[09:46:17][D][remote.raw:028]: Received Raw: -4454, 4548, -572, 1700, -541, 1731, -570, 1702, -541, 603, -541, 604, -539, 604, -541, 603, -541, 603, -541, 1731, -570, 1702, -541, 1731, -541, 604, -540, 603, -541, 604, -570, 573, -541, 604, -541, 603, -561, 1711, -540, 1732, -540, 604, 
[09:46:17][D][remote.raw:041]:   -540, 604, -541, 1730, -541, 1732, -571, 1701, -571, 1701, -541, 603, -571, 573, -570, 1702, -541, 1731, -571, 573, -541, 603, -516, 629, -540
[09:46:17][D][remote.raw:028]: Received Raw: -4455, 4546, -541, 1731, -541, 1732, -541, 1731, -540, 604, -541, 604, -540, 603, -541, 603, -541, 603, -541, 1731, -541, 1731, -541, 1732, -540, 603, -541, 604, -540, 604, -541, 602, -541, 603, -541, 603, -542, 1731, -541, 1731, -540, 604, 
[09:46:17][D][remote.raw:041]:   -541, 603, -540, 1731, -541, 1733, -540, 1731, -541, 1731, -540, 604, -541, 603, -541, 1732, -541, 1731, -540, 604, -540, 604, -540, 603, -541
[09:46:17][D][remote.raw:028]: Received Raw: -4454, 4547, -542, 1731, -540, 1732, -540, 1732, -541, 603, -540, 604, -540, 604, -540, 605, -540, 603, -541, 1732, -540, 1732, -540, 1731, -541, 603, -541, 603, -541, 603, -541, 604, -540, 603, -541, 603, -542, 1730, -540, 1732, -541, 604, 
[09:46:17][D][remote.raw:041]:   -540, 604, -540, 1732, -540, 1732, -540, 1731, -542, 1730, -540, 605, -541, 603, -539, 1733, -539, 1733, -538, 605, -539, 605, -540, 604, -539
[09:46:17][D][remote.raw:028]: Received Raw: -4458, 4544, -598, 1675, -594, 1678, -544, 1729, -596, 548, -596, 548, -594, 550, -595, 550, -542, 602, -540, 1732, -542, 1730, -594, 1679, -541, 602, -542, 603, -542, 602, -542, 630, -511, 606, -541, 602, -543, 1729, -543, 1730, -592, 553, 
[09:46:17][D][remote.raw:041]:   -542, 601, -513, 1761, -540, 1730, -540, 1733, -512, 1760, -543, 601, -514, 631, -511, 1760, -542, 1730, -541, 604, -513, 630, -513, 632, -539

EDIT: update.

this works for the "samsung power tv switch, I can turn it on and off (to art mode) but again not to real off…

esphome:
  name: irtransmitter
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "hihi"
  password: "haha"
  use_address: 192.168.6.11
  domain: .domain.local

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Irtransmitter Fallback Hotspot"
    password: "nono"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

web_server:
  port: 80

remote_transmitter:
  pin: D2
  # Infrared remotes use a 50% carrier signal
  carrier_duty_percent: 50%
  
switch:
  - platform: template
    name: TheFrame Off (IR)
    turn_on_action:
     - remote_transmitter.transmit_raw:
         code: [-4426, 4574, -514, 1759, -512, 1759, -514, 1757, -514, 630, -514, 631, -512, 632, -511, 632, -542, 602, -512, 1760, -512, 1761, -511, 1760, -512, 632, -512, 634, -511, 634, -539, 604, -510, 635, -538, 604, -541, 1731, -512, 1760, -511, 633, -512, 634, -510, 1760, -512, 1761, -511, 1761, -511, 1761, -539, 604, -512, 633, -540, 1732, -538, 1734, -511, 632, -512, 633, -511, 632, -512]
  - platform: template
    name: "Samsung TV Power"
    icon: mdi:remote
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E040BF

hummm instead of a physical resistor , does it work to use PULLUP ?

Well, the pullup would deliver some current to the led, so it would emit light. Still the LED is thenn connected to 3,3V. As soon as you would like to use the output, it bypasses die pullup by directly driving the LED, reuslting in the first case: the LED has no resistor.

Guys, the electric part is solved, sorry, that was not clear in my topic above. i just putted 100ohm on the signal side and I can switch on and off the tv… but not off from the art mode.

I got my IR led, connected the longest side with the 100ohm resistor and to the D2, the shortest side to the GND but the IR light is very very dim (tested on my cellphone camera) compared to my tv remote.
Can’t reach any device from a distance.

How can i strengthen it?

Here also dim. But working well although close to tv now

According to this:

https://tttapa.github.io/ESP8266/Chap04%20-%20Microcontroller.html

the maximum current per pin is 12mA on an ESP8266. So I would expect that you already draw the maximum power from the ESP. So you need some kind of amplification.

This:

should do the job, there is a small transistor or Mosfet infront of the sending LED. Therefore it can transmitt a lot more power. I would guess that it accepts the 3,3V signals from your ESP while being powered by 5V from your ESP, but that might become a problem.

If you are comfortable in designing basic electronics circutry, you can easily add a transistor and some resistors to your setup and then the transistor is amplifying the signal. Which basically is what the mentioned board would do for you, only with lesser components.

Here is some tutorial on this:

https://learn.sparkfun.com/tutorials/transistors/applications-i-switches

@sender ahh i see. Well then it’s not a good implementation if it’s meant to be very close to the device.
Im used to RM mini 3 where it can send IR codes to distant devices.

@CeeCee that’s nice but its beyond the scope of my knowledge to dive into that.

I did not mean to say its only working close to tv… have to continue testing and it’s close for now :slight_smile:

Can I please get some help with the IR Coding?