HomeAssistant: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
Rewrite Why section in nthmost voice
Correct HA host (Pi4, not Beyla); fix local dashboard URL
Line 16: Line 16:


* '''Host:''' <code>homeassistant.local</code> (10.21.0.43:8123) — accessible on the NB LAN
* '''Host:''' <code>homeassistant.local</code> (10.21.0.43:8123) — accessible on the NB LAN
* Runs on [[Beyla]], the RNA Lounge server
* Runs on a '''Raspberry Pi 4''' (clear plastic case, Mary Poppins server rack)
* The automation scripts live on [[Beyla]] (RNA Lounge server) and interact with HA over the local network


=== The Rack Phone ===
=== The Rack Phone ===
Line 54: Line 55:
A simple web dashboard shows the current state of all switches and auto-refreshes every 15 seconds:
A simple web dashboard shows the current state of all switches and auto-refreshes every 15 seconds:


* '''On NB LAN:''' <code>http://homeassistant.local:8098/nblights</code>
* '''On NB LAN:''' <code>http://beyla.local/nblights</code>
* '''Public:''' [https://nthmost.com/nblights/ nthmost.com/nblights/]
* '''Public:''' [https://nthmost.com/nblights/ nthmost.com/nblights/] (proxied over WireGuard via zephyr)


== Setup & Configuration ==
== Setup & Configuration ==

Revision as of 07:29, 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 a Raspberry Pi 4 (clear plastic case, Mary Poppins server rack)
  • The automation scripts live on Beyla (RNA Lounge server) and interact with HA over the local network

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