Good news! I got the Ledvance Bluetooth bulbs integrated into Homeassistant on a Raspberry Pi with a modified version of GitHub - dominikberse/homeassistant-bluetooth-mesh: Allows to use bluetooth mesh devices directly from homeassistant.
Long story short, I had to switch back to the older BlueZ Version 5.55 from the Debian Bullseye package repository. I also had to make a few other small changes to make it work more reliably (e.g. lights did not work after restarting the Docker container). The working version with my changes is also on GitHub: GitHub - olipink/homeassistant-bluetooth-mesh: Allows to use bluetooth mesh devices directly from homeassistant
From there on, it was basically just following the steps in the setup instructions. I.e. clone repository, build and run the Docker container, docker compose exec <container_name> /bin/bash into the docker container, and then provision the devices:
python3 gateway.py scan- Create entry in the
config.yaml. python3 gateway.py prov --uuid <uuid> addpython3 gateway.py prov --uuid <uuid> config-
python3 gateway.pyor restart the container
Further notes:
- To make sure that the bulb runs the right firmware, I’d recommend to first pair it in the Ledvance Bluetooth app, then remove/reset it
- Make sure you are using a recent Linux kernel version (check with
uname -a). I am using the 6.10 kernel from the latest Raspberry Pi OS release. I did not get it to work with Kernel 5.10. - In some cases, provisioning failed with a
bad-pdumessage. This is returned for all sorts of different errors. In some cases, it helps to add--reloadto the provision commands, e.g.python3 gateway.py --reload prov --uuid <uuid> add - Apart from BlueZ 5.55 from the package sources, I also tested versions 5.58 and 5.62 and got it to work. For 5.62, I had to add
--reloadto the provision commands. - If you are having trouble and want to rule out hardware or configuration issues, you might want to try provisioning with
meshctland/ormesh-cfgclientfirst. In case of the latter, you will have to build it from source. The version from the package repository will get you stuck with a “Failed to generate UUID array” error when trying to provision: BlueZ seems to be very picky about the device UUIDs, and the UUIDs of the Ledvance SMART+ bulbs are apparently not considered valid. Remove all occurrences of|| !l_uuid_is_valid(uuid)frommesh-cfgclient.cand it will work.