iTach and Sony TV

I’ve been struggling with this for a while and finally decided to reach out for help. I have an older Sony TV that has to be controlled via IR. This TV has discrete Power On and Off commands, which work correctly with iRule.

What I know:
My particular Sony TV requires a repeat of 3 to work as per FAQ: Why Don’t My IR Codes For My Sony Devices Work?

Based on the article above, I did more digging and was able to use iLearn to modify the Global Cache commands to work for Powering On and Off. I used those working commands with iConvert to convert them into Hex Codes; which I refer to below as my modified commands.

What I’ve tried via the services section of HA:
I’ve tried sending both the On and Off commands. The emitter lights up but doesn’t actually cause to TV to come on or go off.

Using the defauly Sony IR codes:

    {
       "entity_id": "remote.living_room_tv",
      "command": "ON",
      "num_repeats": "3"
    }

Using my modified commands:

    {
      "entity_id": "remote.living_room_tv",
      "command": "ON"
    }

Additionally I also tried the remote.turn_off and remote.turn_on commands with no success.

Remote Section of Config.yaml:

    #remotes
    remote:
      - platform: itach
        host: 192.168.1.41
        devices:
          - name: "Living Room TV"
            modaddr: 1
            connaddr: 2
            commands:
              - name: "ON"
                #gc_commands data: "0000 0068 0000 000d 0060 0018 0018 0018 0030 0018 0030 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 03f5"
                data: "0000 0067 0000 000D 0060 0018 0018 0018 0030 0018 0030 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 03F5"
              - name: "OFF"
                #GC_commands data: "0000 0068 0000 000d 0060 0018 0030 0018 0030 0018 0030 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 03de"
                data: "0000 0067 0000 000D 0060 0018 0030 0018 0030 0018 0030 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 03DE"

I’ve also tried using the node-red-contrib-globalcache node via NodeRed per this thread Problem with itach component and Sony TV with no success. I immediately get an API error in NodeRed.

Any other things I can try to get this working?

Please format your pasted remote config correctly. Indentation is important. See point 11: How to help us help you - or How to ask a good question

However I see what is wrong.

You have commented out the entire data: key by putting this in front of it: #gc_commands Don’t put comments in front of the data key. Put them at the end. e.g. from my config (scroll all the way right to see the comment)

- platform: itach
  host: 10.1.1.19
  devices:
    - name: Cinema Amp
      modaddr: 1
      connaddr: 1
      commands:
        - name: "ON"
          data: "0000 006A 0000 0024 0154 00B3 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0041 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0600 0154 0055 0016 0F18" # any comment you want here not in front
        - name: "OFF"
          data: "0000 006A 0000 0026 015D 00B5 0016 0016 0016 0042 0016 0016 0016 0042 0016 0042 0016 0042 0016 0042 0016 0016 0016 0042 0016 0016 0016 0042 0016 0016 0016 0016 0016 0016 0016 0016 0016 0042 0016 0016 0016 0042 0016 0042 0016 0042 0016 0042 0016 0016 0016 0016 0016 0016 0016 0042 0016 0016 0016 0016 0016 0016 0016 0016 0016 0042 0016 0042 0016 0042 0016 060B 015D 0056 0016 0EA3 015D 0055 0016 00B5"

If you want to record the full 3x repeated code from your remote you could try the Putty method.

  • open putty and enter the ip of the Itach device (e.g.192.168.1.230)
  • in the port field enter 4998
  • select RAW mode
  • press open or hit the “enter” key

you should get a blank window with a cursor waiting
type get_IRL (IRL must be in capital letters)
you should get IR Learner Enabled

now it is ready for commands. Point the remote at the iTach, press the ON button on your remote and you should get the whole 3x repeated code.
After you get the code you will still have to adjust the first part of the code for the itach ir port
sendir,1:2,1 - port 2 (the middle one)
sendir,1:1,1 - port 1
sendir,1:3,1 - port 3

stop_IRL stops learning mode.

Then copy and paste into iConvert.exe to convert to HEX code.

I did this for my Aircon which has gaps in the IR transmission. Worked perfectly.

To send the commands, use the service like this:

    service: remote.send_command
    data:
      entity_id: remote.cinema_amp
      command: "ON"

@tom_l Thanks for the suggestion of using putty. That worked for me.

 commands:
          - name: "ON"
            data: "0000 0067 0000 00FA 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040B 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 040A 0060 0018 0030 0018 0018 0018"

If someone else happens to find this, please not while the TV supports discrete on and off buttons the remote only has one power button.

No problems. Glad you got it working.

I now see your second lot of data: statements per command (the uncommented ones) were there all along.
It’s a lot more obvious now that you have formatted correctly (good job). I missed that in the unformatted version.

One thing you might like to be aware of is this issue I raised a while ago: https://github.com/home-assistant/home-assistant/issues/17744

After a restart not all commands would work. Different ones each restart. Every three or so restarts all would be well (race condition? IDK). Either way a bit of work has been done on the component and I now run HA hardware that starts a lot quicker and it is no longer an issue for me. But if you ever see behaviour like this you know where to go to report it and I will reopen the issue.

Thanks for the heads up. I’m new to HA so getting this issue solved is a big relief, as most of the other devices have IP control.

I hear that.

Tonight I purchased two new IP capable (HA supported) AV receivers. I got sick of trying to transcode the new E-AC3 HD/X DTS/ Dolby audio formats.

Bonus is - two less IR controlled devices.

Only my TH-P60ST50A Viera Plasma TV (which TBH I love the picture on) and my projector left. The plasma actually shows up as a media player in HA but no power control. That’s the only control I need! Ugh! I might get lucky with HDMI CEC. The it will be only one.