HomeAssistant: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
Create HomeAssistant page: setup, Noisebell automation, rack phone, lights dashboard
 
Rewrite Why section in nthmost voice
Line 7: Line 7:
== Why Does Noisebridge Have This? ==
== Why Does Noisebridge Have This? ==


Noisebridge has accumulated a collection of smart plugs, decorative lights, and physical indicators that need to turn on when the space opens and off when it closes. Doing this manually is error-prone and relies on whoever happens to be opening or closing to remember.
Home Assistant lets us accumulate smart lights, switches, and other WiFi, Zigbee, and Z-Wave devices and do fancy integrated stuff with them. For example: automating the shutoff of all the lights in the RNA Lounge when someone flips the switch to close the space when they're the last one out.
 
Home Assistant gives us a local hub that can:
* React to the space open/closed status automatically (via [[Noisebell]])
* Control devices on schedules (sunset/sunrise, for example)
* Let people manage plugs and lights from a web dashboard without needing to touch the physical devices


The emphasis on '''local''' matters: we run HA on our own hardware, not in a vendor's cloud. This means automations work even when a manufacturer's API goes down.
The emphasis on '''local''' matters: we run HA on our own hardware, not in a vendor's cloud. This means automations work even when a manufacturer's API goes down.

Revision as of 06:48, 25 March 2026

Home Assistant is an open-source home automation platform. Noisebridge runs a local instance to coordinate smart plugs, lights, and space-status automations — things that need to respond to whether the space is open or closed, or to sunrise/sunset.

Configuration repo: github.com/nthmost/noisebridge-ha

Why Does Noisebridge Have This?

Home Assistant lets us accumulate smart lights, switches, and other WiFi, Zigbee, and Z-Wave devices and do fancy integrated stuff with them. For example: automating the shutoff of all the lights in the RNA Lounge when someone flips the switch to close the space when they're the last one out.

The emphasis on local matters: we run HA on our own hardware, not in a vendor's cloud. This means automations work even when a manufacturer's API goes down.

Hardware

Home Assistant Host

  • Host: homeassistant.local (10.21.0.43:8123) — accessible on the NB LAN
  • Runs on Beyla, the RNA Lounge server

The Rack Phone

There is an Android phone mounted in the server rack whose sole job is to add and configure new smart plugs and lights. Smart home devices (especially Tuya-based ones) require a phone app to do initial setup and join them to the WiFi. Rather than borrowing someone's personal phone each time, the rack phone stays provisioned with the relevant apps and credentials so any maintainer can onboard a new device without hassle.

What It Controls

Open/Close Switch Group

These devices turn on when Noisebridge opens and off when it closes:

Device What It Is
switch.flaschentaschen_socket_1 Flaschentaschen LED display
switch.salt_lamp_1_socket_1 Open sign
switch.mini_smart_plug_socket_1 Beyla lights (RNA Lounge)

Hallway Deco Lights

The hallway decorative lights (switch.mini_smart_plug_2_socket_1) run on a sunset/sunrise schedule — on at dusk, off at dawn — independent of open/close status.

How the Noisebell Automation Works

Noisebell is a door sensor system that publishes the space's open/closed status. The Home Assistant automation polls the Noisebell status API every 5 minutes and updates a sensor (sensor.noisebridge_open_status). When that sensor changes state, HA triggers the Open/Close switch group.

Because Tuya smart plugs communicate through the cloud and are occasionally flaky, the automation includes retry logic: up to 5 attempts, 2 minutes apart, before giving up. If a new status change arrives mid-retry, the pending retries are cancelled and the new state takes over.

Manual overrides are respected — if you've switched something by hand, the automation won't fight you.

Lights Dashboard

A simple web dashboard shows the current state of all switches and auto-refreshes every 15 seconds:

Setup & Configuration

Configuration is managed via ha_configure.py, which pushes automation and switch group definitions to HA via its REST API. This means the configuration is code — repeatable, version-controlled, and recoverable if the HA instance needs to be rebuilt.

To connect to the API you need a long-lived access token from the HA web UI. Store it in .ha_env (see .ha_env.example in the repo).

Maintainers