Sending TCP packets to a device


doest it work friom ssh/putty , thats the real test


I tried these settings but i get “network error:connection refused”



putty is in port 22 , also enable SSH service first


Have you tried a return at the end? x0d


Did you get this working @Alex_Yeoman? I was looking at a NoHassleAV 8x8 matrix ( but ended up importing a J-Tech digital unit (all appear to be the same rebadged units - from the US, so I’m about to start configuring this.


@Alex_Yeoman if you see connection refused, it’s possible you already have something using that port ?

If you set something up to make a call, unless you set a time out it might stay locked open to that connection. Make sure you have nothing else running and restart your matrix and see what happens

If you can, share a link to the device’s documentation and the ASCII or HEX commands you need to use .


I tried the commands from the config code directly on the command line and didn’t work, but then I realised you have curly quotes. Changed to straight quotes and it switches (and I see a response).


echo -e “\x40\x54\x30\x32\x30\x33\x23” | nc 5000

Yep (in this example switches output 3 to input 4):

echo -e "\x40\x54\x30\x32\x30\x33\x23" | nc 5000
@ 09 01 #30x32x30x33x23 ”

Edit - this works for me:

  - platform: command_line
        command_on: 'echo -e "\x40\x54\x30\x32\x30\x33\x23" | nc 5000'
        command_off: 'echo -e "\x40\x54\x30\x32\x30\x33\x23" | nc 5000'
        friendly_name: HDMI Matrix


Is there any setup for getting this to work in a install? Anything that needs to be enabled?

- platform: command_line
      command_on: 'echo -e "PWR ON\r" | nc 4999'
      command_off: 'echo -e "PWR OFF\r" | nc 4999'
      friendly_name: Projector

This does not work for me, but writing echo -e “PWR ON\r” | nc 4999 directly in the terminal at the ubuntu machine where HA/hass is installed works fine.


no problem for me, but my quoting is different in my setup, also running hassio on hassos

  friendly_name: Living
  command_on: echo -e "\xED\x43\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xAF\xAF\x43\x07\x01" | nc 1001
  command_off: echo -e "\xED\x43\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xAF\xAF\x43\x07\x00" | nc 1001


Weird, I tried bot with and without the outer quotes, didn’t make a difference.