Triggering iTach Remote Commands

Hi, i’m quite new to Home Assistant and i’m having a bit of trouble with triggering an iTach command.
Right now i’m just trying to get the tv to turn on, when Plex is selected.

I can turn on the TV from within Home Assistant using the code below. By clicking the corrosponding toggle button.

remote:

  • platform: itach
    name: livingroom
    host: 192.168.1.169
    devices:
    • name: tv
      connaddr: 2
      commands:
      • name: “ON”
        data: “0000 006D 0022 0002 0157 00AB 0015 0015 0016 0015 0016 0015 0016 0014 0016 0015 0016 0015 0015 0040 0015 0015 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 0015 0016 003F 0016 0015 0015 0015 0016 0015 0016 0015 0015 0015 0016 0015 0016 0015 0015 0015 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 05F7 0156 0055 0015 0E46”

But I can’t get the send_command to work.

Test TV

  • alias: htpc_plex_tv
    trigger:
    • platform: state
      entity_id: input_select.amp_output,
      to: “Aux”
      action:
    • service: remote.send_command
      entity_id: remote.livingroom
      device: tv
      command: “ON”

I get these errors:

The following errors have been logged this session:

17-03-15 20:18:43 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Entity ID is an invalid entity id for dictionary value @ data[‘trigger’][0][‘entity_id’]. Got None
extra keys not allowed @ data[‘action’][0][‘command’]. Got None
extra keys not allowed @ data[‘action’][0][‘device’]. Got None. (See /home/hass/.homeassistant/configuration.yaml, line 174). Please check the docs at https://home-assistant.io/components/automation/

Any help would be much appreciated :slight_smile:

Sorry about the formatting, i’m not sure how to format the output on here.

I have it working by sending the command to remote.tv, and then just 0 for the device:

- service: remote.send_command
  entity_id: remote.tv
  device: 0
  command: "ON"

see if that helps at all

Thanks for the answer, sadly I still keep getting the same error

The automation now looks like this:

automation:
  # Test TV
  - alias: htpc_plex_tv
    trigger:
      - platform: state
        entity_id: input_select.amp_output, 
        to: "Aux"
    action:
      - service: remote.send_command
        entity_id: remote.tv
        device: 0
        command: "ON"

Update:
I just tried calling the service with the JSON input via the site { “entity_id”:“remote.tv”, “device”:“0”, “command”:“ON” }.

That works just fine, so there must be something wrong with my syntax, but i can’t see what it is…

Does it work any better if you put the extra items under a data: block?
Like so:

automation:
  # Test TV
  - alias: htpc_plex_tv
    trigger:
      - platform: state
        entity_id: input_select.amp_output, 
        to: "Aux"
    action:
      - service: remote.send_command
        entity_id: remote.tv
        data:
          device: 0
          command: "ON"

Thanks alot that worked for some reason :smiley:

1 Like

hope this works with the IP2SL device, will give a go and see

I have all of my devices responding now with button cards doing a call-service to remote.send_comand but I was hoping to find a way to track the state. I have ON, OFF, and TOGGLE codes for my TV, and would like to use the toggle command and alter the button color based on the state. Checking on the developers tab, all of the my remote devices show as off regardless of their real state. Is it possible to set this state manually and integrate that into the button press somehow.
I currently use card_mod to set the card background.