iTach IP2SL

Just sharing some thoughts and ideas I had in this same problem even though I stopped using my ip2sl a while back
My idea was to to create/build a rs232 to mqtt interface using an esp device.

If you have a rs232 interface on a esp device then you could potentially do the following:

  • set a character, length or timeout for splitting up the rs232 incoming messages and send them as Mqtt.
  • redirect mqtt messages to the rs232 interface.

In my case I was looking at integrating my older anthem MRC receiver. It split its rs232 commands using line feed characters.

There might be some projects that already do this or you might even be able to do it with esphome or tasmota.

If someone could make that work then you essentially have a way to make rs232 devices integrate with HA or anything that can send mqtt.

Hey @DamianFlynn any progress on getting your updates in?

Looking forward to trying it out when it’s ready

It took me forever to find out that you can do this so here is a step by step to help the next guy

First thing you need to do is find the documentation for the device you are connecting to.
It will tell you things like baud rate, data bits, parity, stop bit, etc. Then it will tell you the commands to control the device.

Before you involve the ip2sl device at all I think it’s imperative to test your serial connection without the ip2sl in the middle to ensure the ip2sl isn’t the issue. You could possible skip this step but if you have troubles return here to test without ip2sl
Just get a usb to serial connector, plug that into your pc, then connect the serial cable from the USB dongle into your destination device
On a PC click start>run, type devmgmt.msc and look for “Ports (COM & LPT)” expand that and it will tell you the COM Port number like COM4
Download putty and open it
Select serial for the serial line type the com port you noted earlier Ex: COM4
For the speed type the baud rate from your devices documentation
Expand Connection>Serial
Ensure all the settings match your devices documentation such as data bits, stop bits, parity, flow control, etc.
Return to the session section and click open
A black screen will show type in one of the commands that your documentation provided such as a power on command. My command was ‘@112’ for my Emotiva MC-700. Once I typed that and pressed enter it turned it on. Great now I know the serial connection is working it’s time to try using the ip2sl.

Plug your global cache ip2sl device into power and network, connect the serial cable from the ip2sl to your device
Next you need to find the ip address of the ip2sl device, global cache makes a utility called ihelp to help you find this
Search google for itach ihelp (https://www.globalcache.com/files/01-2020/iHelp.exe)
Run that and it will tell you the IP address of your device
Open a web browser and goto the ip address it told you in ihelp
Click serial and set the baud rate, data bits, parity, etc per your devices documentation
Click the network tab. I’d recommend disabling DHCP and setting a static IP that is out of your DHCP scope so this doesn’t change on you. Or just put a reservation on your DHCP server.

Once your ip2sl device is setup then open home assistan
You’ll need to edit the configuration.yaml file on the device, it’s easiest to get the samba plugin so you can open the file over the network
So first goto Supervisor>Add-on Store
Search for Samba share
Install that
Then go to Supervisor>Samba share (under dashboard tab)
Click the configurator tab
Set a username password
Click Save
Reboot Home Assistant (You can goto Supervisor>System>Reboot Host)
Ensure samba addon started by going to Supervisor>Samba share (under dashboard tab)
Click start if needed

Now we’ll add a switch of type telnet to your configuration.yaml file
On a PC open file explorer
Browse to \homeassistant.local\config
Type in the username/password you set in the samba configuration above
Open the configuration.yaml file and add the code below to that file.
Change the command_on and command_off to correspond to your devices telnet commands.
Likewise change the name to something descriptive for your application

switch:
  - platform: telnet
    switches:
        emotiva:
          resource: 192.168.1.170
          port: 4999
          command_on: "'@112'"
          command_off: "'@113'"
          name: "Emotiva Power"
          timeout: 3

Reboot Home Assistant (You can goto Supervisor>System>Reboot Host)
Now goto the overview and you should see the newly created switch. Try clicking on the buttons to see if it works.

1 Like

This “worked” for me. Thanks!

I put the above in quotes because I’m still stuck for my use case. Using this configuration.yaml:

switch:
  - platform: telnet
    switches:
        wha_living_room:
          resource: 192.168.1.114
          port: 4999
          command_on: "':Z11\x0D'"
          command_off: "':Z10\x0D'"
          name: "WHA Living Room"
          timeout: 3

Adding a button card with toggle selected, a single press turns the zone 1 on (YES!) but a second press does not toggle it off (NO!). I can long press and bring up the off and on panel and control it from there. That’s fine, but not ideal. I’d be fine having an ON button and OFF button, but not sure how to do that from where I am now. I also need to add volume up and volume down buttons. Do I add a second switch with the on command for up and off command for down? I’m not sure how to do that. My ultimate goal would be to have a nested card with media player at the top and then 4 buttons at the bottom for power on/off and volume up/down (maybe a fifth with mute).

I’m just not sure the way forward with the entity being added as a switch.

Thoughts?

Ok, just decided a solitary switch entry for every command was a the way to go here. Extremely inelegant, but I’m not being graded on my code (and have no coding skills to speak of anyway).

I’m going to clean up the UI with custom button card I think, but for now, I at least have a working model.

switch:
  - platform: telnet
    switches:
        wha_living_room_on:
          resource: 192.168.1.114
          port: 4999
          command_on: "':Z11\x0D'"
          command_off: "':Z11\x0D'"
          name: "LR On"
          timeout: 3

        wha_living_room_off:
          resource: 192.168.1.114
          port: 4999
          command_on: "':Z10\x0D'"
          command_off: "':Z10\x0D'"
          name: "LR Off"
          timeout: 3

        wha_living_room_up:
          resource: 192.168.1.114
          port: 4999
          command_on: "':V1++\x0D'"
          command_off: "':V1++\x0D'"
          name: "WHA Living Room"
          timeout: 3 
          
        wha_living_room_down:
          resource: 192.168.1.114
          port: 4999
          command_on: "':V1--\x0D'"
          command_off: "':V1--\x0D'"
          name: "WHA Living Room"
          timeout: 3  

image

Each button fires the command that I want and the amp executes it. Simple, right? :grinning:
It would be great if there were an ip2sl integration in HA. But, after several months of tinkering and frustration, I have what I need and can expand from there.

Thanks for all the comments here. This has really helped me understand what HA is doing and how things work within it as much as anything else. A great community.

1 Like

BUMP!

Anyone with any thoughts on this? Simple serial commands to a well documented device like the global cache? Didnt expect it to be so hard.

And if not, like I said, I am open to any other alternative too! Please help out.

Hi there… I am pretty new to this, I just got the IP2SL to control a display through rs232… I can send the device commands fine outside of HA, but the issue I am having is after I edit the config.yaml to add the switch command as described above and restart HA… it doesn’t show anywhere in overview, devices, entities, etc. Is there a prerequisite step that I am missing?

here is my configuration.yaml code

Office Display on/off

switch:

  • platform: telnet
    switches:
    office_display_on:
    resource: 192.168.1.237
    port: 4999
    command_on: “41 30 41 30 43 02 43 32 30 33 44 36 30 30 30 31 03 73 0d”
    command_off: “41 30 41 30 43 02 43 32 30 33 44 36 30 30 30 31 03 73 0d”
    name: “Display On”
    timeout: 3

    office_display_off:
      resource: 192.168.1.237
      port: 4999
      command_on: "01 30 41 30 41 30 43 02 43 32 30 33 44 36 30 30 30 34 03 76 0d"
      command_off: "01 30 41 30 41 30 43 02 43 32 30 33 44 36 30 30 30 34 03 76 0d"
      name: "Display Off"
      timeout: 3
    

any assistance would be appreciated!

I use these similarly. The command you send needs to be in the format of the serial command provided by the device manufacturer of the device you are trying to control; in my experience their formats vary wildly.

Did you restart HA after editing your YAML to add the telnet switches? In my configuration.yaml file where I have this:

switch:

  • platform: telnet
    switches:
    wha_living_room_on:
    resource: 192.168.1.114
    port: 4999
    command_on: “‘:Z11\x0D’”
    command_off: “‘:Z11\x0D’”
    timeout: 3

If i look at my list of entities I see switch.wha_living_room_on in the list. I can call that switch to trigger the ON command be sent to my amp via automation or a button on my dashboard.

cards:
  - type: custom:button-card
    color_type: icon
    styles:
      icon:
        - color: green
    entity: switch.wha_living_room_on
    show_name: true
    icon: mdi:power
    name: 'ON'

I hope that helps. I’m not sure where you’re going wrong based on what info I have and not really have a full grasp of how I got it working in the first place.