Trouble getting IR emitter to send Sony codes

I’m working on an IR transmitter using an ESP8266 NodeMCU. I’ve had a lot of success with NEC code, but can’t get the Sony commands to work.

I’d like to be able to power on and off my PS2. I have the PS2 DVD remote and here’s what the power on command looks like from the remote when captured by an ESPHome receiver…

sony_command_1

The signal repeats, sending a total of 4 times, which to my understanding, is how Sony IR commands work…

Here is what my yaml for the emitter looks like…

remote_transmitter:
  pin: D1
  carrier_duty_percent: 50%

switch:
  - name: PS2 Power On
    platform: template
    
    turn_on_action:
      - remote_transmitter.transmit_sony:
          data: 0x000A8B5B
          nbits: 20
          repeat:
            times: 3
            wait_time: 10ms

And here is what my IR transmitter sends…

sony_command_2

The PS2 does not power on. It seems that the transmitter isn’t repeating the signal. I’ve tried a few different things, like tweaking the wait_time, but nothing seems to work. Is ESPHome not working right, or is something wrong with the way I’ve configured the transmitter? Has anyone here had better results in getting these to work before?

Thanks in advance for any help anyone here can provide.

I can’t avoid pointing out that you state that you need to repeat 4 times and you’ve entered repeat 3 times, now this can be debatable but that will actually send the code 3 times, not 4.

Try that first, if not, there is some research to do, start sharing ESPHome version information, as there were some bug fixes regarding the repeat wait time. Some versions were taking those 10ms as 10 microseconds, so you can quickly check if the problem is codes being repeted to quickly by entereing 10000 ms instead.

Hello! Any success with subj? I flashed my Wemos D1 mini with Tasmota - Sony IR codes works fine for my TV, but with ESPHome the aren’t.

woking ok if i use 50ms

---
switch:
  - platform: template
    name: Sony Amplifier ON_OFF
    turn_on_action:
      - remote_transmitter.transmit_sony:
          data: 0x0000540C
          nbits: 15
          repeat:
            times: 5
            wait_time: 50ms
  - platform: template
    name: Sony Amplifier UP Volume
    turn_on_action:
      - remote_transmitter.transmit_sony:
          data: 0x0000240C
          nbits: 15
          repeat:
            times: 5
            wait_time: 50ms
  - platform: template
    name: Sony Amplifier DOWN Volume
    turn_on_action:
      - remote_transmitter.transmit_sony:
          data: 0x0000640C
          nbits: 15
          repeat:
            times: 5
            wait_time: 50ms
  - platform: template
    name: Sony Amplifier Mute Volume
    turn_on_action:
      - remote_transmitter.transmit_sony:
          data: 0x0000140C
          nbits: 15
          repeat:
            times: 5
            wait_time: 50ms
  - platform: template
    name: Sony Amplifier TV_SAT
    turn_on_action:
      - remote_transmitter.transmit_sony:
          data: 0x00002B0C
          nbits: 15
          repeat:
            times: 5
            wait_time: 50ms
  - platform: template
    name: Sony Amplifier MD_TAPE
    turn_on_action:
      - remote_transmitter.transmit_sony:
          data: 0x00004B0C
          nbits: 15
          repeat:
            times: 5
            wait_time: 50ms          
1 Like