RepositoryPythonITItaly
FezVrasta

FezVrasta/ha-rbac

Role-based access control for Home Assistant. Guests see the lights, kids get their own dashboard, nobody sees where your phone is.

125stars
14forks
6issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: rbac

#1 Repository of the week

1
TINIX TRENDING·Topic: access-control

#1 Repository of the week

4
TINIX TRENDING·Topic: homeassistant-integration

#4 Repository of the week

Access Control for Home Assistant

Give everyone in the house their own Home Assistant.
Guests see the lights. Kids get their own dashboard. Nobody but you touches the locks, the add-ons, or the settings.

CI HACS custom repository alpha Home Assistant no YAML MIT

Everyone's requests pass through Access Control on the way to Home Assistant. A guest asking to unlock the front door is refused; the same request from the owner goes through. Answers coming back are trimmed to what that person may see.

Everyone talks to the same Home Assistant. Each person only ever gets their own slice of it.


Home Assistant has two kinds of user: administrator, and everyone else. "Everyone else" still sees every camera, every lock and every sensor you own. There's no way to hand a guest a dashboard with just the living room lights on it, or to give your kid a tablet that can't open the front door.

This adds roles. You decide what each one can see and do, then hand them out.

It isn't only for people. Point an AI assistant or agent at Home Assistant through its own restricted login and it's held to the same role. It reads and changes exactly what you allowed, and nothing else. A useful fence to put around what an LLM can do in your home.

What a role decides

What they seeBy area, domain, label, floor, or one particular device. Nothing in the bedroom. No locks.
How muchLook only, or look and touch.
What stays privateHide details: where someone is, a door code, a serial number.
Where they can goWhich dashboards, add-ons and screens are in their sidebar.
WhenDays and hours. A cleaner, weekdays 9 to 5. A babysitter, Friday evenings.
What they can changeNothing, everything, or one part of the settings: automations, dashboards, helpers, users, backups.

Hidden means hidden. A restricted device isn't greyed out, it's absent: from the dashboard, from search, from history, and from the API.

Four roles to start from: Administrator, Editor, User and Read only. Copy any of them and change it.

Take a look

The Access Control panel, editing a Guests role

One role at a glance: where it can go, what it can see, what it can change. Each line opens.

A guest searching for locks finds none

A guest searching for "lock". There's nothing to find.

The same search as the owner, showing four locks

The same search, same house, signed in as yourself.

Assigning roles to people

Who gets what.

The denials log

When someone says "it stopped working", look here first.

Install

Open your Home Assistant instance and open this repository inside the Home Assistant Community Store.

That button adds this to HACS. Download, restart, then add Access Control from Settings → Devices & Services and say yes when it offers to move Home Assistant for you.

Home Assistant restarts once and comes back about fifteen seconds later. The address doesn't change, so bookmarks, the companion app and your Google or Alexa setup keep working, and nobody gets signed out.

If it doesn't come back, Home Assistant undoes the change by itself within five minutes and restarts on the port it was on before.

Why does Home Assistant have to move?

Roles are applied to traffic passing through this integration, so Home Assistant has to stop answering on your network directly. Otherwise anyone could go straight round it with the login they already have.

So Home Assistant moves to a port reachable only from its own machine, and this takes over the address everyone already uses.

Prefer to do it yourself? Decline the offer, then set Server port to 8124 under Settings → System → Network, add Access Control, and finally set Server host to 127.0.0.1. In that order, because each step leaves you with a Home Assistant you can still reach.

Your first role

  1. Open Access Control in the sidebar.
  2. Copy Read only, call it Guest, and add what they may see.
  3. Go to Users, pick the person, choose the role, save.

Have them reload. Their Home Assistant is now smaller.

Nothing changes for anyone until you give them a role, so you can do this one person at a time.

Not sure what to allow? Hit Record what this role needs, let them use Home Assistant normally for a few minutes, and stop. Everything they touched is added to the role, so you build it from what they actually use instead of guessing and then chasing what broke. While it records they have full access, and the panel says so.

Good to know

You can't lock yourself out. The owner account always keeps full access.

Not everything goes through it. Automations, add-ons and webhooks reach Home Assistant by other routes, and so does anyone with a login to the machine itself. Roles don't apply there. There's a plain list of what's covered and what isn't.

It's an alpha. Tested, and deliberately attacked twice (two adversarial reviews by its author, no external audit yet), but it hasn't lived in anyone else's house yet. Try it on something that isn't your front door, and tell me what broke.

How it works

It sits in front of Home Assistant and reads everything going past. When a guest's browser asks what's in the house, it answers with their part of it. When something asks to unlock a door it isn't allowed to, it says no.

It ships no list of what's dangerous. Home Assistant already marks its own administrative features, and this reads those markings on your instance, which is why it doesn't go stale every time Home Assistant updates.

The long version is in docs/DESIGN.md.

Frequently asked questions

Is this a fork of Home Assistant? Does it change the interface?

No. It's stock Home Assistant, unmodified. This filters the API in front of it, which is why a hidden device isn't greyed out: your browser was never told it exists. Nothing is patched, so nothing re-breaks on update.

Can installing this make my security worse?

No. It can only remove access, never add it. Home Assistant still authenticates every request exactly as before; this runs after that and can only say no.

Isn't this security by obscurity?

No. Denied data is never sent to the browser and denied requests never reach Home Assistant. Open the developer tools and read the websocket frames: it isn't there. The known limitations are written down rather than glossed.

Why not contribute to the official RBAC effort instead?

There isn't one to contribute to yet. The core proposal was declined, and so was the small change that would have unblocked doing this properly, on the grounds that authorisation needs oversight the Foundation hasn't allocated. The longer answer.

Does the search dialog (Ctrl+K) leak things?

No, it just finds less. Search runs over the data the browser already has, and a restricted browser was never sent the hidden entities or the denied screens. There's a screenshot of exactly that.

Home Assistant is still listening on 8124. Can't someone go there?

Only from the machine itself. Home Assistant's server host is set to 127.0.0.1, so it isn't listening on your network at all. That's the mechanism, not Docker, and it works the same on Home Assistant OS, Supervised, Container and Core. Anyone with a shell on the box is out of scope either way.

Do I have to use 8123 and 8124?

No, both are configurable. The default keeps 8123 here so that browsers, phones and cloud integrations carry on working without being repointed.

What happens if I uninstall it?

Home Assistant goes back to the address it was on before and restarts once, so you keep reaching it exactly as you do now. Without that it would be left answering only on its own machine, and getting back in would need a shell.

Your roles are kept, so reinstalling picks up where you left off. Disabling the integration behaves the same way as removing it.

Does it work behind NGINX, Traefik or Cloudflare?

Yes, with nothing to reconfigure: your reverse proxy already points at 8123, and that's still where this answers. Real client addresses survive the extra hop, because it appends to the X-Forwarded-For chain rather than replacing it.

Contributing

Bug reports from real houses are the most useful thing right now, especially "my dashboard broke, and here's what the Denials tab said". See CONTRIBUTING.md for running the tests.

License

This project is licensed under the MIT License. See the LICENSE file for more details, including copyright information and full terms of use.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
homeassistant-ai/ha-mcp

Configure and automate Home Assistant with Claude, ChatGPT, and other AI assistants.

8.2k
Nov 29, 2026
RepositoryPython
frenck/awesome-home-assistant

A curated list of amazingly awesome Home Assistant resources.

8.7k
Nov 30, 2026
RepositoryPython
hacs/integration

HACS gives you a powerful UI to handle downloads of all your custom needs.

7.9k
Nov 30, 2026
RepositoryPython
rytilahti/python-miio

Python library & console tool for controlling Xiaomi smart appliances

4.3k
Jul 25, 2026
RepositoryPython
AlexxIT/SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant

3.4k
Nov 17, 2026
RepositoryPython
AlexxIT/XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN

2.8k
Oct 15, 2026
RepositoryPython
mampfes/hacs_waste_collection_schedule

Home Assistant integration framework for (garbage collection) schedules

2.3k
Nov 15, 2026
RepositoryPython
apache/casbin-pycasbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Python

1.8k
Nov 28, 2026
RepositoryPython
mbillow/localthings

Control your Samsung appliances from Home Assistant over your home network, with no cloud account.

1.5k
Nov 30, 2026