Pip install on home assistant os and "ha" user password

In an attempt to integrate my switchbot hub ir commands into Home Assistant, I wanted to install the python-switchbot addon using:

pip install python-switchbot

This, as expected, did not work from HA terminal and ssh.

So I looked around for explanations of what to do but just confused myself.

I changed config of the Terminal and SSH addon to use a specific port and password, them attempted to ssh from my windows laptop to my raspberry pi HA system.

This asked for the “ha” user password. If I have set one up, it must have been a good 18 months ago and I cannot find a record so ssh connection fails at that point. I can access the raspberry pi console directly so I guess I have some issues:

  1. Is there any way of finding my “ha” password?

  2. If not, can I reset this? All example password resets I have seen online seem to be for UI users, not the base system user password.

  3. As I do have access to the raspberry pi console, I am logged in as the “ha” user automatically there but pip install is not accepted. Not sure what I do to install python libraries.

I assume you use Home Assistant OS?
You can’t install libraries. The OS doesn’t support it. Libraries come preinstalled with the integrations.

Alternatively, could you set up an automation that was triggered by HA restart, and use the switchbot API to read and then update the status of each device?

BTW the password for SSH is probably in its config under “Settings > Add-ons”.