Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA with ZHA on a Raspbee II dongle #281

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

Conversation

bassdr
Copy link

@bassdr bassdr commented Nov 10, 2024

WIP: I am in the process of migrating my HAOS setup to Gentoo for various reasons, and I want features parity, ideally without having any manual configuration required beside HA and customizing use flags.

I'm putting my changes so far here, but it's not quite working yet. Bluetooth and Zigbee concentrator still won't work.

My setup:

  • Raspberry Pi 4B+ (I'll probably test this on my Pi 3 too after, but it's at the RAM limit)
  • ZHA
  • Raspbee II GPIO HAT, connected to ~15 devices thru ZHA
  • Bluetooth LE ~4 devices
  • MQTT server, a daemon is dumping my electricity consumption there

So far I had to:

  • Align ZHA dependencies with HA 2024.10.4 installed thru pip.
  • Add a new group gpio that zha-des and add user homeassistant to this group (maybe we should use dialout but ship a udev config file tied to the USE=rpi_gpio?)
  • Bluez: HA required the experimental use flag.
  • Maybe other tweeks I forgot
  • Added hydroqc2mqtt daemon, to connect to my electricity provider.

What's remaining:

  • Install/configure udev correctly for GPIO dongle, probably thru a USE flag somewhere
  • Install/Configure bluez correctly
  • Workaround HA requires to run as root to reset the bluetooth and access GPIO.
    • One way is to add homeassistant to group kmem, but I would like to avoid this.
    • Setting capabilities to the running homeassistant process would be more acceptable IMO.
    • Maybe we have to patch the library to use /dev/gpiomem instead of reading /dev/mem directory too...

@bassdr bassdr marked this pull request as draft November 10, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant