Support for IP IR Bridges

The one thing that appears to be noticeably absent - and I’ve searched the forum for it to no avail - is support for IP to IR bridges like the iTach, Keene IR Anywhere, Nevo Link IR Bridge, Insteon and all the cheap ones from China like the Black Bean and the Orbivo Allone.

I’ve written my own interface to the iTach in PHP, as well as to all of my other IP addressable AV kit, but I was hoping to integrate it in to HASS somehow.

Is this type of infra red bridge functionality on the roadmap?

Thanks,

3 Likes

I have been thinking the same. I use itach IP to IR and IP to Serial devices.
I think there are some Python scripts around that work with the itach devices. Will see if I can find the links later.
I have only just started with HA development, I am no developer but I thinking about having a go at making something for this.

1 Like

I also have an iTach device and have considered implementing this previously. However, there isn’t really a good use case for this currently IMHO. You would have to manually configure the IR codes to send and then would only be able to send it via a service call.

1 Like

I put something together to be able to send IR commands using my Global Cache iTach.

I created it as a ‘notify’ component as I felt this would be a good place to start due to its similarities to what I was trying to do and it existing HA integration/documentation.

I have uploaded the component to my GitHub below:

A summary of how it works.

  • It allows for the sending of onetime commands to an IP socket.
  • In the example below and the configuration that I have is sending “sendir” commands to an Global Cache iTach IP2IR device.
  • All “messages” or commands are terminated with “\r” or carriage return.
    I may make this customisable later.
  • I called it IP2SL as even though I am sending IR commands they are really just serial commands activating the sending of IR.
  • I am currently not doing anything with the returned data apart from logging it at “info” level.
  • In this usage example I have two scripts that I can call to turn my Panasonic TV on or off.
  • This component may be adaptable to other IP to IR devices as mentioned in the opening post.

Example config

notify:
- name: ip2sl
  platform: ip2sl
  host: 192.168.2.210
  port: 4998
  timeout: 10 # Optional

Example usage in script

script:
  tv_on:
    sequence:
      - service: notify.ip2sl
        data:
            message: "sendir,1:1,1,36764,1,1,128,63,16,16,16,48,16,16,16,16,\
                      16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\
                      16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\
                      16,16,16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\
                      16,16,16,16,16,48,16,48,16,48,16,48,16,48,16,16,16,16,\
                      16,16,16,48,16,48,16,48,16,48,16,48,16,16,16,48,16,2712"

  tv_off:
    sequence:
      - service: notify.ip2sl
        data:
            message: "sendir,1:1,1,36764,1,1,128,63,16,16,16,48,16,16,16,16,\
                      16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\
                      16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\
                      16,16,16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\
                      16,16,16,48,16,48,16,48,16,48,16,48,16,48,16,16,16,16,\
                      16,48,16,48,16,48,16,48,16,48,16,48,16,16,16,48,16,2712"

Note: To split the long string without introducing additional spaces double quotes are required with a backslash \ at the end of every line.

Configuration variables:

  • host (Required): The IP or hostname of the device.
  • port (Required): The port of the device.
  • name (Optional): Setting the optional parameter name allows multiple notifiers to be created. The default value is notify. The notifier will bind to the service notify.NOTIFIER_NAME.
  • timeout (Optional): The socket timeout time in seconds. Defaults to 10s.
3 Likes

Great job! I’ll try it out this evening.

1 Like

Has anybody else had a go with this component yet?

Would like to know if it is working as expected.

1 Like

I am looking for ability to command multiple IR devices in same room, so that would be actually ideal

1 Like

What sort of IR device are you using?

1 Like

I’ve just briefly tested it with my Itach IP2IR and also with a zmote. Both seem to be working fine.

Thanks, this is exactly what I was looking for. I think it would be a logically better fit as maybe an ‘automation’ component instead of being a ‘notify’ component.

I will look to make it a component that isn’t ‘notify’ at some point. I wanted to get feedback on its success before changing it.
So far it seems to be working for most that have tried it.

I may need to make it into its own type of component but in the help under automations, much like the shell_command component.

This is what I was after in the first place when downloading and installing Home Assistant, and the one thing not supported was Global Caché iTach support. So your hard work is most appreciated. But I am totally new to HA, (installed it early this morning) so I have not yet managed to get it to work. But keep on developing. :slight_smile: In my installation there is no directory under .homeassistant named custom_components/notify. Only one directory named deps.

You need to create the custom_conponet directory. That is something that I found a little difficult to find in the help docs when I first started a month or so ago.

Keep at it, I feel HA is the best project of its type out there at the moment. The forum here is very good, polite and usually quick to respond.
It is also a very easy community to contribute too once you get a bit more experience under your belt. The learning phase is a good time to make note if you think there is some parts to the documentation missing and suggest changes.

This looks great! I wanted to see if you have thought about adding support for the relay/contact closure version of the iTach. I have a few things that I control with relays where this would be very helpful. Thanks for your great work!

The custom component above for the iTach IR should work the same as the iTach contact closure version.
Just replace the ‘SendIR…’ part with the contact closure command with something like ‘setstate,1:1,1’. You will need to check the iTach API.

It wouldn’t give you a status on the contact or even tell you if the command was successfully sent though.
I do have plans to write this into its own component one day but it is working for me as is so it is low on my list of things to do.

That worked great! Thank you very much for your help!

Thanks again! Your code helped me do this…

@tinglis1 I recently upgraded to .36 and received an error that the notify plugin was no longer working. I reverted to .35.3 and it worked again. Have you experienced this as well? Anything you’d like me to provide?

1 Like

Change line 30 in the ip2sl.py file to

def get_service(hass, config, discovery_info):

previously it was

def get_service(hass, config):
2 Likes

Thank you! That worked perfectly.

@quadmasta We’d love to have you submit your work for inclusion into the codebase! Just submit a PR anytime. I can help you if you need. :slight_smile: