Running HA OVA virtual machine - trying to locate python

I loaded the HA x86_64 OVA virtual machine into VMware.
It’s been running for about 2 months.
I’m trying to diagnose problems with the ZHA Integration and Zigbee funcitionality.

From the Terminal in the HA interface, I’m trying to locate python, zigpy and bellows.
They are supposed to be in the following locations but are NOT there!

Any idea where they are?

Is Home Assistant OS a stripped-down Linux distro?
The uname -a command shows
Linux core-ssh 5.4.84 #1 SMP date/time x86_64 Linux
I’m used to Ubuntu Linux OS and pulling software packages using apt and apt-get.
Does HA OS have a package manager like apt-get, for adding packages?

it depends what you want to achieve, I use python scripts in this way

- platform: command_line
        command_on: "python3 /config/python_scripts/ 'Setrelay 35,1'"
        command_off: "python3 /config/python_scripts/ 'Setrelay 35,0'" 
        friendly_name: espresso

you can use a shell command for that as well

btw packages can be installed using the apk commands

I created a small bash script which a have included as a shell command and this runs whenever home assistant starts

file: setup. sh
echo "Updating Image with Tools"
apk update
apk add -u busybox
apk add busybox-extras
apk add expect
apk add sshpass
pip3 install pexpect
echo " Tools Installed"
- id: hass_tools
  initial_state: true
  alias: System Startup install tools
    platform: homeassistant
    event: start
  - service: shell_command.setup
shell_command_setup: "/config/scripts/"
1 Like

Because the terminal runs on the host, but the files are inside the Home Assistant docker container. Here’s a guide on how to reach it with Home Assistant OS.

Anyway, you shouldn’t mess with these files. As soon as you update all changes to these files will be lost anyway when the container is rebuilt.

You won’t be able to install additional software like this in Home Assistant OS. Please take a look here at the different install methods. If you know your linux and python, maybe it’d be better to use Home Assistant Core.

Usng my way as described above the software packages are reinstalled whenever HA restarts.

I’m using HA OS vm installed on a promox server.

Yeah, but that’s more of a workaround, which I wouldn’t recommend to a new HA user.

Thanks for the response, @Burningstone

I’ll try to follow through your SSH guide you linked to.

I currently have the SSH add-on loaded and I’m currently using it in the password mode.
The in-HA documentation for the SSH add-on shows how to enter a public SSH key into the config window of the SSH add-on, but it does not show where to put the private SSH key.
Since, the directions are not complete and you can’t get a working SSH key setup going in the add-on! :frowning:

One of my reasons for wanting to add packages was to add packages such as ‘locate’, which helps you find files on the hard drive.



What files do you need to find? Did you install the samba add-on yet?

Yes, I have the SAMBA add-on loaded.
I am trying to locate the python installation and the python libraries.
It’s mentioned in the title of this thread. :slight_smile:

The ZHA (Zigbee Integration) has bugs in it, and multiple users have reported Zigbee devices becoming detached from the Zigbee Bridge.

I’ve seen errors like these in the HA log when the Zigbee devices detach from the Zigbee Bridge.
I’d like to get to the bottom of this bug so it can be fixed.
When I looked for these python files using SAMBA and the SSH interface, they were not in those directories! I’m trying to find them.
zigpy log errors

Any comment on the missing private key information in the Documentation of the SSH add-on?


The python directories you are interested in are inside the homeassistant container, and AFAIK no way to get to them other than to go inside the container itself (i.e. no other container has access to these directories). You can get to it by logging into the console (login root (no password)) and then entering login which gets you to the hassos linux shell. Next, execute the following: docker exec -it homeassistant /bin/sh. You are now inside the homeassistant container.