Home Assistant API logo

Home Assistant API

Home Assistant API

UnknownFreedeveloper-tools

Home Assistant API is the local control interface for the open-source smart home platform — device states, automations, scenes, cross-vendor integrations (2500+ integrations).

Use it when

Fully open-source (Apache 2.0)

Watch for

Must self-host server (Raspberry Pi or NUC)

First check

Run local Home Assistant instance. Profile → create long-lived access token. GET http://homeassistant.local:8123/api/states -H "Authorization: Bearer ..."

Auth
jwt
CORS
?
HTTPS
Yes
Signup
?
Protocol
REST, WebSocket
Pricing
free

Uptime · 30-day window

Health history will appear here after the next daily check.
01

About this API

Home Assistant is an open-source smart home platform launched 2013, the de-facto open-source standard in this space. Unlike Apple HomeKit / Google Home / Amazon Alexa closed-source single-vendor solutions, Home Assistant's philosophy is "neutral hub" — integrating 2500+ vendor devices (Philips Hue lights, Xiaomi appliances, IKEA Trådfri, Sonos speakers, Ring doorbells, Tesla charging, Apple HomeKit devices, nearly all Z-Wave / Zigbee devices), abstracting different-protocol devices into unified entities, then running Python-written automation rules (condition triggers, timers, state machines). Local-first — no cloud dependency (devices work normally if your home internet is down); users run a Raspberry Pi or NUC at home as server. API lets developers integrate Home Assistant into their apps or write custom scripts. vs. single smart home brand cloud APIs, Home Assistant provides vendor-neutral unified interface for "whole-home智能".

02

What you can build

  • 1Self-built smart home hub (not locked to one brand)
  • 2Integrate multi-vendor devices (Philips Hue + Xiaomi + Alexa + Apple HomeKit)
  • 3Custom automation ("auto-on lights at sunset")
  • 4Voice assistant integration (NLP "turn off living room light" to API)
03

Strengths & limitations

Strengths

  • Fully open-source (Apache 2.0)
  • Broadest device compatibility (2500+ vendors)
  • Local-first (no cloud dependency)
  • Extremely active community

Limitations

  • Must self-host server (Raspberry Pi or NUC)
  • Learning curve to start (not consumer plug-and-play)
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://www.home-assistant.io/<endpoint> \
  -H "Authorization: Bearer $ACCESS_TOKEN"
05

Getting started

Run local Home Assistant instance. Profile → create long-lived access token. GET http://homeassistant.local:8123/api/states -H "Authorization: Bearer ..."

06

FAQ

Home Assistant and Apple HomeKit relationship?+

Home Assistant fully integrates HomeKit devices (even exports its own devices to appear in HomeKit). Not mutually exclusive — can coexist.

07

Technical details

CORS: ?HTTPS: YesSignup: ?Open source: No
Auth type
jwt
Pricing
free
Rate limit
本地运行无 rate limit
Protocols
REST, WebSocket
SDKs
python, javascript, go
08

Tags