HDMI CEC Matrix

I think you will need to find out more about your device.
If you can access it via telnet or ssh, there may be things you can use to test.

I use the following to test if a TV connected to a RPi is on.
echo 'pow 0' | cec-client -t p -p 1 -d 1 -s | tail -n1 | grep 'power' | awk '{print $3}'
And the following to turn it off.
echo "standby 0" | cec-client -s
You will need to find out how to connect to your device and what it expects.

on angry scanner i see an IP address with name “open wrt.local” which is the matrix.

i’ve tried login as root but appears to have a password (tried blank but didn’t work) unless i’m missing something?

If there is nothing in the documentation, a call or email to the reseller or manufacturer might help. Without any hints on how to control this over IP you have nothing.

Hi Zarthan
I got a response from manufacturer stating that they "standard TCP/IP protocol 8000 so you just use the matrix ip address to control the matrix. So when i type the ip address into a web browser, i am able to control the inputs/outputs.

They also sent a document with all of the Hex commands list of the matrix.
Is this going to help?

If you can control it through the web interface you may be able to craft curl strings to do the same. You are likely going to be on your own unless someone else here has the same device. I would do some serious Googling for your device and how to control it. Someone has used it before and has some understanding of how it works. Once you know how to control it, making it work with HA should be relatively easy.

Can anyone help me with this matrix? Where should I start?

https://www.amazon.ca/gp/product/B01GKFQNG8/ref=oh_aui_search_asin_title?ie=UTF8&psc=1

Here are the IP commands…

http://nohassleav.com/8x8_hdmi_hdr/after_dec_15th/New_simplified_RS232_IP_commands.txt

Are you still trying to get this to work? I saw your posts on the Sending TCP packets to a device thread. I’ve started working on a script (stand alone python script currently working) for my J-Tech digital 8x8 matrix - commands are almost identical (# instead of !).

If there’s interest I can spend a bit longer on it.

1 Like

Definitely still interested…I kind of gave up and just control it with IR commands but would much rather control via TCP packets.

Ok, take a look at generic-hdmi-matrix. I have only just put this together today, so let me know how it goes.

It requires user input from command line (built this way to test it before I go any further), and it accounts for the 0-7 input/output offset, so enter 1-8.

Looking at the link to the nohassle commands, yours seem to end with !, try this script as-is, but you may need to modify this line accordingly:

commandstring = '@T' + user_outp + user_inp + '#'

I ran your python script on my windows PC…i enter the output and input. Then it thinks about it for a second and then the python script exits…just before it exits it says something but I can’t read it fast enough. It also doesn’t change any of the outputs.

Are you double-clicking the script to run it? Prompt will close straight away once run I think. If you open cmd prompt and run python matrix-switch.py it should stay open so you can see the error.

I get the following error…

Which output? 1
Which input? 1
Traceback (most recent call last):
  File "C:\Users\Alex\Desktop\matrixswitch.py", line 29, in <module>
    packet.connect((ip, port))
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

I can send the commands via packet sender no problem…

When you changed the ip address to 192.168.0.210, did you leave the single quotes or retype them? Just maybe confirm that they are still straight single or double quotes.

Did you change the other line I mentioned above (! instead of #)?

just checked…I left the single quotes and just replaced the ip address. I tried both ! and #. any other suggestions?

Odd that these devices are obviously clones of each other, but command structures seem to be different (according to the spec, at least).

Maybe try:

commandstring = '@T ' + user_outp + ' ' + user_inp + ' !'

When I use packet sender it converts the commands to HEX…does the script you wrote convert the inputs to HEX before sending to the matrix?

Yeah, commandstring = commandstring.encode() does that.

Try changing commandstring line to my previous post, and if that doesn’t work, remove these two lines:

commandstring = '@T' + user_outp + user_inp + '#'
commandstring = commandstring.encode()

and replace with (may need to experiment with this - trying to remember the structure off the top of my head):

commandstring = b'\x40\x54\x20\x30\x30\x20\x30\x30\x20\x21'

If that works, it shows that the script is sending the command, but not building the command in the right way.

Hello, I just installed hassIO in a windows PC in a python venv, I have the Jtech 8x8 switch also. Did you get it to work in HA? If you have a sample setup I would greatly appreciate seeing it to see how I begin to install it in my config.

It seems the reason that does not work is because the Jtech expects authentication.

Default username : admin
default password : 123456

I’m interested too if someone has had any luck with this working.