I have an 6x6 audio amplifier and switch from No Hassle AV. The only GUI is through an Android App, and there is no IR or RF remote.
The No Hassle support team told me I can integrate the their device into HA using TCP commands, but I have zero idea how to do that, even after some research.
They sent a document with commands. I’m hoping someone will read this and it will make sense.
Volume Slider Starting at <11VO01\r and ending at <11VO38\r. So there are 38 separate commands
`
It continues like that for all other Outputs and Inputs.
I would love to just turn the speaker ON and OFF and volume in home assistant. button or automation.
I do not know any programing or NodeRed, and am learning the Yaml codes slowly.
Many thanks.
Matt
They didn’t give you any examples?
I can’t make out from this what to do.
I would assume it’s POST or GET command to the IP and port but. An example would be nice.
Thanks for the quick reply. The only thing they sent me were those commands in an XLS document. Nothing more… in fact, they even said:
“unfortunately we cannot offer education on how to implement them. TCP is it very extensive topic and differs depend on which platform you use. Below are the commands”
I can access the device through an IP address. I can access Audio Device through an IP Address. which has various connection details that look like router settings. Nothing that indicates the status of settings or volume.
What exactly did you type at the telnet prompt? Are you aware that you should not send literal \r? It is an escape sequence for carriage return (CR) – enter.
Are you getting that command error as a response from the server through the TCP connection?
If you have a Linux environment available for testing, I would much rather use the netcat (aka nc) utility.
Everything I type is doubled (local echo I believe, which I can’t turn off)
Oh I’m not aware of anything code rules. The last time I took a programing class was 1993. We did lots of HTML back then. I grew up on DOS prompt, so I’ve got that going for me, I can figure it out once I learn the rules.
Im running HA on a virtual linux box from my 2nd PC, and I have a Raspberry Pi 4 that I’m testing Lovelace on a touchscreen 4K Monitor. So far, I’m making great process. This is TCP is a hangup because its not part of HACS or the new UI.
Ok, this is how I would test this with netcat in GNU/Linux: printf "command\r" | nc ip port. printf will expand the \r escape sequence – you can see this if you pipe it’s output to xxd or hexdump:
Thanks Ondras, I typed that into the terminal and nothing returns. The test command returns the response you posted.
Can we skip right to a suggesting how to test it in home assistant as a service? or button?
I was able to use the commands with a simple TCP packet sending app on my Android. So it works.
Did the command exit immediately, or did you have to terminate it with ctrl+c? Maybe you should try printf "command\r\n" | nc ip port.
What exactly did you send?
Take a look at the TCP integration. It should be pretty similar to how the netcat command we are testing works, that’s why I wanted to try that first. The string in double quotes after printf should be your payload.
Right. The payload is very simple, and it does work with a TCP app. I dont know how to write the payload send command through HA. I don’t care if I get feedback from the device.
The command I’m testing is <12PR00\r That will turn off Channel 2s speaker.
Can someone suggest how to write that in YAML? Or as a call Service?
If you already have switch: in your configuration.yaml, just append the lines that follow it in this example. Otherwise place the whole thing at the end of your configuration.yaml.