-bash: sudo: command not found - where do I find it or install this?

I have been attempting to install the bluetooth extension to my very new installation of Home Assistant (version numbers below).

As outlined on https://www.home-assistant.io/integrations/bluetooth_tracker/
I connected to my Raspberry Pi 4 using Putty ran the command

sudo apt install bluetooth libbluetooth-dev

However, I get the error:

-bash: sudo: command not found

As I am connected as root, I removed the sudo, but still get the error:

-bash: apt: command not found

I have done various Google searches but nothing outlines how to install these basic commands, but nothing very obvious came up. Help!

System info:

Raspberry Pi 4 Model B (4GB) with 32-bit hass.io from https://www.home-assistant.io/hassio/installation/

System Health

arch armv7l
dev false
docker true
hassio true
os_name Linux
python_version 3.7.5
timezone Europe/London
version 0.103.2
virtualenv false

Lovelace

mode auto-gen

Those instructions don’t apply to HassOS/HassIO. Your installation already has the needed libraries to support BT.

Unless he installed hassio on a generic linux install.

But that still doesn’t matter
Thats only a concern for everything outside of hassio.
I just nuked my system the other day, new 19.0 Ubuntu and hassio in docker.
I have no python on the host just In the hassio docker venv

But if he wants to install stuff in the base operating system, and if the base OS is debian/ubuntu, then he would have to use apt.

But as the OP has not told us what his base system is, it is hard to say.

No he did, even listed it.
Raspberry Pi 4
But either way his original concern was enabling the HA Bluetooth integration which we both agree doesn’t require him to install or update anything for it to work as everything is already there.

I mean whether he has hassos or something else.

Hi John,
because hassio is built in a special environment (docker container within a reduced non standard operation system - hassOS: https://www.home-assistant.io/blog/2018/07/11/hassio-images/) you have only a reduced set of commands.
Try: core-ssh:~# hassio help (in CLI).
So your problem could result due to lack of an appropriate power supply?

No it is not. Hassos is only ONE option for installing hassio. It can run on any linux.

But he used the standard image hassio. See his first post.

He does not say that. He points to a page that includes this https://www.home-assistant.io/hassio/installation/#alternative-install-on-a-generic-linux-host

Did he? …

I think the os_name will say HassOS not linux… but I could be wrong but pretty sure it says HassOS

1 Like

Yes, that page includes installation from an image and the generic installation, just read the bloody link I gave you.

@jtnn60 should come back and clarify, until then we are all guessing.

Hi David,
I use standard hassio image and unfortunately it says “os_name Linux” instead of HassOS. So Linux is maybe true.

Ok… he also mentioned 32bit so that would indicate he’s installed HassOS image…

Hi guys, thanks for the support on this. I did my best to describe the environment but clearly missed something.

The Raspberry Pi 4 was brand new and I have simply downloaded
hassos_rpi4-3.7.img.gz
from https://www.home-assistant.io/hassio/installation/
and setup Home Assistant. So I do not have a standard linux env. Should I have started with installing Linux and then Home Assistant?

What I really want to do is capture the Bluetooth commands sent by the remote control (or phone app) to my Huna blinds. Then I can automate them to open/close. No other integration is available as they outline on their FAQ

I thought I would start by discovering the MAC address using Bluetooth tracker, but came across the issue I posted above.

Thanks for clarifying. You cannot install extra software into hassos.

The Bluetooth device tracker won’t do this, and you cannot add packages to the running docker image or the host.

Your best bet would be to install Linux, use the hassio installer, and perform the functionality you seek on the host.

Or do your development on another machine :slight_smile: