Sign inSign up

orochibraru/localassistant

By orochibraru

•Updated 1 day ago

A small self-hosted home controller: Tuya blinds over the LAN and Mitsubishi heat pumps through MELC

Image
Networking
Internet of things
Web servers
0

4.0K

orochibraru/localassistant repository overview

LocalAssistant: your blinds and heat pumps on one page

⁠LocalAssistant

Your blinds, heat pumps, radiators, cameras and energy on one page, on a server you run. A small, self-hosted alternative to Home Assistant that installs on your phone like an app.

⁠What it does

  • Tuya blinds over your network: open, close, stop or move to a position, straight to the motor with its local key. No Tuya cloud at runtime.
  • Mitsubishi heat pumps, through MELCloud or locally through an ESPHome CN105 adapter: power, mode, target and room temperature, and hot water boost on air-to-water (Ecodan) units.
  • Zigbee through Zigbee2MQTT: door and window sensors, radiator valves, relays, metering plugs and the ZLinky reader, all on their own once paired.
  • Energy: Shelly meters and metering plugs per appliance, the Linky for the house (ZLinky or Enedis online), per day and per month.
  • Routines run by the server: sunrise, sunset, a time on chosen days, the outside temperature, a door opening or any device changing, limited to seasons or dates and to conditions (a device's state, a time window, weekdays, day or night). They drive any device, set scenes and wait between steps, and every run is in their history. Presets to start from, like radiators off while a window is open.
  • Health: the server's health at a glance, and a notice when a new release is out.
  • Assistant: a chat in the app, on Claude, that reads the house, drives devices and scenes, and writes routines and scenes for you; admins choose which devices AI can see.
  • Notifications: your own "tell me when" alerts, and routines that tell the household with buttons that set a scene from the lock screen, all kept in an inbox for 30 days.
  • Dashboards of your own: devices, scenes, the weather, who's home and history graphs, in your order, one tap away on Home.
  • History and logbook: 30 days of each device's numbers as a graph in its menu, and a logbook of what turned on, opened, locked, who came home and which routines ran.
  • Cameras: RTSP cameras watched and recorded on the server in five-minute files with a retention, or a Frigate NVR with its events, clips and detection notifications. The Bambu printer's camera on its card.
  • Bambu Lab printers over your network and Dreame robot vacuums through the Dreamehome cloud.
  • Google Cast devices over your network: Android TV and Google TV, Chromecasts, Nest speakers and displays, found on their own (mDNS, so a container needs host networking) or added by address. What plays, volume, mute and playback, live.
  • Renault electric cars through MyRenault: battery, range, charging, mileage, outside temperature and climate control on the card.
  • The Home Assistant ecosystem: devices that announce themselves for Home Assistant over MQTT (Tasmota, ESPHome, Shelly...) come in on their own, without it, and a running Home Assistant can be connected for everything only it integrates.
  • Plugins: every integration above is a plugin. Install community ones from GitHub, GitLab, Gitea, Forgejo, Codeberg (private ones with a token) or a folder on the server in Integrations, each with a maintenance badge, and update, turn off or remove them there. Plugins can be written in TypeScript, Go or Python.
  • Weather and a wall panel: the time and forecast on Home, and a screen for a wall tablet or a Shelly Wall Display that stays on.
  • Phones as devices: each phone in the house with its owner, battery and, if shared, where it is.
  • AI apps: Claude, ChatGPT or Gemini drive the house and manage routines and scenes over MCP, each person signing in and allowing their own app.
  • Instant controls: every tap shows on the card at once and goes out as one command when you stop, with a spinner while it's sent and no pop-ups.
  • Your house, or several: floors, rooms with icons, outside ones like the garage, and each device in a room or the whole house. JSON import and export.
  • Accounts for the household, invite-only: the admin adds devices, everyone signed in drives them. Authenticator apps, passkeys, single sign-on and email sign-in when you want them.
  • A native app for Android and iPhone that signs in with a QR code, and the web app installs on phones too, with a desktop layout that uses the screen.

⁠Documentation

The full documentation lives in docs/⁠: install and configuration, first run, and how to get each device's credentials.

⁠Install

LocalAssistant is one container and one SQLite file. The image, docker.io/orochibraru/localassistant⁠, is built for linux/amd64 and linux/arm64.

Save this as compose.yaml in a folder of its own:

services:
  localassistant:
    image: docker.io/orochibraru/localassistant:latest
    restart: unless-stopped
    ports:
      - 3000:3000
    volumes:
      - localassistant:/data
    environment:
      AUTH_SECRET: ${AUTH_SECRET:?set AUTH_SECRET, e.g. openssl rand -base64 32}
      ORIGIN: ${ORIGIN:-}

volumes:
  localassistant: {}

Then, in that folder:

printf 'AUTH_SECRET=%s\nORIGIN=http://192.168.1.10:3000\n' "$(openssl rand -base64 32)" > .env
docker compose up -d

Run it on a machine in the same network as the blinds: the container talks to them directly. Keep AUTH_SECRET with your backups: it signs sessions and encrypts the device keys, passwords and tokens stored in the database.

Behind an HTTPS reverse proxy that sets X-Forwarded-Proto and X-Forwarded-Host, leave ORIGIN empty. On plain HTTP with no proxy, ORIGIN must be the exact URL you open, or every form is refused as cross-site.

Every variable is in Configuration⁠.

⁠First run

Every page sends a fresh instance to the setup screen, which asks for the code the server's log shows:

docker compose logs localassistant | grep "Setup code"

Enter it, then create your account: it's the admin. Then House and Devices: open the Mitsubishi (MELCloud) integration to connect MELCloud, the Tuya blinds one to add each blind. See First run⁠.

⁠Upgrades
docker compose pull
docker compose up -d

Migrations run at boot. Your data is the localassistant volume.

⁠Contributing

See CONTRIBUTING.md⁠.

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

sha256:8ce79d959…

Size

172.8 MB

Last updated

1 day ago

docker pull orochibraru/localassistant