Using socat in hassio / homeassistant docker setup

Hi,

I have searched a lot but can’t seem to find an answer.

I want to use socat to allow my home assistant docker to connect to a rfxtrx device exposed by ser2net on another machine.

I’ve looked inside the homeassistant docker and socat is available however when I run the command tryin to connect to the ip on my network of the other machine it doesn’t work - is there something special I need to do in docker to connect to 192.168.1.2?

Also running it once is fine bvut how would I make it so that the socat is run every restart (presumably before homeassistant starts) and also be safe on upgrading the docker image when a new version of home assistant is available?

Thanks for any help

Try this approach :

(it is for z2m, but should work for rfxtrx too)

Thanks for the reply.

I know how to use socat and had it working when I had homeassistant installed directly as a virtualenv. However I’ve moved to using it via docker and also using the hassio docker to control it. It is within that docker environment that i’m having trouble.