How to use built-in Rpi 4 bluetooth?

I guess I’m just surprised HASS has no ability to check on RPi’s native system functions, like Bluetooth. And there are no BT integrations to do that.

1 Like

I’m running native HASS so those commands don’t work sadly.

At least, hcitool is available.
Assuming you have the terminal addon installed, you have to login, first

I don’t think there’s hcitool in the HA Core shell. I can’t get it anyway. 2021.9.2 on Rpi4.

Not sure what you mean by that, but it’s included in the HA docker image:

/config # hcitool
hcitool - HCI Tool ver 5.55
Usage:
        hcitool [options] <command> [command parameters] 

I mean the default RPi installation method without full Linux, without apt (with Terminal/SDH addon), not the HA Docker image. There’s no hcitool. There’s bluetoothctl though.

All installation methods (besides “core”, ofc) use the same docker image.
The SSH addon gives you access to the hassio CLI (I think?), not to the actual container.

On a container or supervised install, you enter the actual container with the docker exec command.

cbro@RPI-3:~ $ docker exec -it homeassistant /bin/sh
/config # hcitool
hcitool - HCI Tool ver 5.55
Usage:
        hcitool [options] <command> [command parameters]

Whatever shell script in executed in HA is executed there.

Nope, “docker: command not found”. Or maybe I don’t know what to log into really. I’m logging into root@“address of the pi running HA”. Eve when I login into the homeassistant docker container using Portainer, it gives me the same error.

That gives me

FATA[0000] Error while executing rootCmd: unknown shorthand flag: 'i' in -it

Which is an error I get literally no matches for on Google. Only on these forums there is one match, and the next answer states the Docker stuff is irrelevant on Home Assistant OS. So I can’t really access hcitool.

Hardcore sceptic, are we? :slight_smile:

¯\_(ツ)_/¯

1 Like

It’s not scepticism if nothing works :slight_smile:

1 Like

should be so simple - Enable onboard bluetooth for Rpi 3 / 4 Home Assistant Installs.

yet again another series of hurdles and techno babel.

This thread is exactly what I am looking for, except there is no solution here. I have a RPi4 running HA and have a SwitchBot temperature sensor in my basement workshop. I can connect with my phone app over BT but can’t even add the SwitchBot integration because I have no bluetooth device. Yet, checking my Raspberry Pi4 specs, it has “Bluetooth 5.0, BLE Gigabit Ethernet” built in.

I had a similar issue a few weeks ago adding a second USB NIC for my SunPower solar integration. I was able to enable the second NIC with “ha network update” commands so I have looked through the HA CLI commands for network but so far, I can’t find a way to enable Bluetooth. I will post here if I figure it out.

Could you share your exact model of temperature sensor, I can add it to Theengs gateway and we can do some testing

I have a SwitchBot MeterTH S1. I have added the BLE Monitor integration loaded and I successfully added it with that integration, but the SwitchBot integration now says “no unconfigured devices found” so I guess the BLE Monitor is the only way to get it to work?

I am having the same error: When adding the Switchbot integration I get the error “failed to connect” on my Raspberry Pi 3. I cant find any solution.

I am having an issue with my RPi4 bluetooth. I have my system running on a SSD connected to the Pi by usb 3. Are you saying that bluetooth will never work with this. I only used usb 3 because it’s the latest standard. DO I just need to connect my ssd to a usb 2 port instead?

I have just seen this issue discussed on here and so I tried putting my BT device (Switchbot) next to the Pi4 but I still get the same errors (No unconfigured Bluetooth adapters found).

I have tried connecting the ssd to the usb 2 port, but I still get the same result.

Hi zimbrich. I have the same issue. Did you figure it our please?

What do you get when you run hciconfig -a?

If you don’t get anything back and no error, try running this command:

sudo systemctl start hciuart

I have 3 RPI4 and for some reason 1 of them doesn’t start bluetooth on startup but the others do.
Thru a lot of trial and error I finally figured that I had to manually start the BT device before it would work.

After starting hciuart I get a successful response with hciconfig -a

Hope that helps!