Sending TCP packet to HA


I am new to HA so please forgive me if this is a stupid question………what I would like to do is send a TCP packet to HA and that trigger an action…is this possible ??? how do I do it ???, I basically have a device that is a touch panel that has button that when pressed send data to an ip address and port number i.e. when I press a button on the TS called “on” it sends “POW\r” the ip, port and data are configurable

thank you your help

Not a random packet, but you can use a webhook trigger in an automation.

the device I have will only allow me to enter the ip address and port to sent packet to so will the webhook work ??

Only if you can craft the contents of that packet to resemble an HTTP POST :wink:

There’s no “port listener” like you’re looking for. You’d need something to act as a receiver for that, and then have that communicate with HA.