Install socat to new Home Assistant Blue

Hello Everyone,

I just received my Home Assistant Blue from Hardkernel and am willing to start migration from a different home automation system I’ve been using for some years.

On the previous home automation system I made use of a remote zwave interface, connected to a Raspberry Pi running ser2net.

I’m familiar with the configuration of ser2net / socat or ser2net / rfc2217 on linux based systems.

The problem I’m facing is two-fold:
a) I have no idea how to access the underlying linux system running on my Home Assistant Blue, which I understand is based on Home Assistant OS (formerly know as Hass.io) and Docker.
b) I have no idea how to change the docker command contained somewhere in the base OS, so it can “passthrough” the socat configured virtual USB port to the Home Assistant instance.

I have searched before posting and did not find definitive answers on how to do it.

PS: It would be possible to avoid the whole thing if the zwave add-on would add support to rfc2217 URLs in it’s configuration.

1 Like

You have chosen the wrong installation method if you want to make those sort of changes to the os. HASOS is a minimal locked down OS.

Try a supervised, core or docker install.

Thanks for your reply.
Well, I’m kind of confused… I did not choose the installation method, as the Home Assistant Blue (which is based on an ODROID-N2+) comes with HA preinstalled in it’s eMMC module directly from Hardkernel in South Korea…
I’ve searched a little more and was able to install the community “SSH & Web Terminal” add-on and was able to ssh into the docker instance (ssh whitout adding the -p parameter). But, whenever I try to do it with the -p 22222 parameter to go into the underlying OS, it fails with a Connection refused message.

Once again, thanks for your prompt reply.

You can install and use this add-on (linked below) to make it easier to enable SSH access to the underlying OS. But has Tom said, in HAOS the user is not really intended to be making changes to the system at that level.

1 Like

Thank you for your suggestion. I installed the add-on you mentioned, configured it with the public key and ran it once to have it do it’s magic. It seemed to go well based on it’s log entries.
But, somehow, I still get the Connection refused message when I try to ssh into the ODROID by using -p 22222 parameter.

Ok, after several hours banging my head around this thing I think it will be easier to go the route suggested by @tom_l.

Currently downloading ARMbian Buster w/ a 5.9.x kernel for the ODROID N2.

Once I have it installed onto the eMMC module, I intend to follow the instructions to install HA Supervised (https://github.com/home-assistant/supervised-installer) into it.

Anyone would like to provide any additional instructions? Or maybe help me avoiding gotchas I may run into during this process?

TIA
Cesar

Debian is the only officially supported distro of linux for Home Assistant Supervised.

If you install any other distro (like ARMbian), the resulting instance will only be supported by the community.

2 Likes

What was the name of the partition to which you installed the key? I’d like to know so I can better support the addon.

Sorry, I did not take note (I suppose it was shown in the installation log ?) and now I have already started installation of HA supervised from scratch…

Thanks for pointing that out. I have read the linked article, but thought it would not matter anyway.

I’m no expert, but I always thought that ARMbian WAS Debian, only geared towards ARM development boards, like the Odroid, Raspberry Pi, etc… Your post indicate this is not the case.

But, by choosing Supervised, I figure that if I install any additional package (as I intend to (SOCAT)), even if I start with vanilla Debian 10, I will then will have to rely on Community based support, as per the following (“We only accept bug reports for issues that have been reproduced on a freshly installed, fully updated Debian with no additional packages.”) contained in the linked article you sent above…

Ok, I have now installed Home Assistant Supervised sucessfully on top of ARMbian Buster.
I basically followed both articles below:
a) [Installing Home Assistant Supervised on a Raspberry Pi with Debian 10] - making adjustments where needed (obviously, I used odroid-n2 as machine type)
b) [https://github.com/home-assistant/supervised-installer] - I used the command lines contained in here to install supervised.

Damn, even though SOCAT installs and runs normally, I still could not make Home Assistant running inside a docker container recognise the virtual serial port… Others seem to have complained about it too, so I guess it’s a known issue for some time.

I’m admittedly a HA and Docker newbie, so I’m yet to understand the full reasoning around the developers decision to make everything run inside Docker containers. I suppose it’s something related to security (isolation?) and/or scalability, portability (IDN), but - to my current understanding - it also appear to add complexity, and probably some overhead. Maybe I will change my mind after learning Docker properly.

It used to work, on Hassbian https://community.home-assistant.io/t/using-homeseers-z-net-in-home-assistant-hassbian/61339, as I did some testing myself some time ago.

UPDATE 1: it looks like I will need to give a Core installation a try… I regret having to loose the Supervisor and Add-ons, but will try that in a few moments…

UPDATE 2: Sure enough, everything just works in Core. I hope the developers end up including remote serial interface support (both SOCAT and rfc2217) in the near future for Supervised and other docker based versions of Home Assistant.

Ok, now that I made sure I wasn’t loosing my mind and that it was indeed possible to use a remote z-wave interface via ser2net/socat in Home Assistant, I’m coming to terms with the need to invest some time to learn about Docker.

I hope in the process I end up learning how to passthrough the /dev/ttyAML1 port, which is the port I linked to the remote interface in socat.conf, to the HA docker container.

Even though I was not willing to spend a lot of time learning about docker, I figured it will be inevitable. So, I’m now reading the “Docker for beginners” material in docker curriculum and intend to reinstall Supervised once I get the basics.

Once I get to the desired results, I will post back here my config.

Ok, finally got the damn thing working on Home Assistant Supervised. Once I learned the basics of Docker, I first installed Portainer.io and once I understood the following posts: (Hass.io remote z-wave module with socat/ser2net?), (RPi as Z-Wave/ZigBee-over-IP server for Hass), I was finally able to make it work.

Many thanks for everyone that helped me before (@tom_l, @123, @Silicon_Avatar), as you put me in the right direction.

Also, thanks for the authors of both posts above (@brianara3 and @luma), and specially @quasar66 and @ascent for their answers in the posts above mentioned, which finally led me to the desired results.

4 Likes

For future reference, i did this to run socat in home assistant container (and others forked it to allow multiple socats) https://github.com/vladbabii/homeassistant-socat

2 Likes

Were you able to get socat running in HA Blue? Do you have any notes on the steps you used?