# The big picture

> All the pieces of Home Assistant on one page, what each one does, and how they talk to each other.

Source: https://contributors.home-assistant.io/architecture/big-picture/

Home Assistant is not one program. It is a handful of pieces that work together: an application in Python at the center, a web interface, apps for phones, and, on most installations, an operating system that runs it all. This page shows each piece and how they connect, so the rest of this area has a place to hang on.

Diagram. All the pieces of Home Assistant, from top to bottom.

- Where people use it
  - [Frontend](https://contributors.home-assistant.io/architecture/frontend/): In the browser and the apps
  - [Companion apps](https://contributors.home-assistant.io/architecture/platform/companion-apps/): Android and Apple devices
  - [Voice](https://contributors.home-assistant.io/architecture/platform/voice/): Satellites and Assist
  - [Other software](https://contributors.home-assistant.io/architecture/connections/): Scripts, Alexa, Google
- They talk to Core through: [WebSocket API, REST API, webhooks](https://contributors.home-assistant.io/architecture/connections/)
- [Home Assistant Core](https://contributors.home-assistant.io/architecture/core/)
  - [Event loop](https://contributors.home-assistant.io/core/internals/asyncio/): Runs everything
  - [States and events](https://contributors.home-assistant.io/core/internals/states/): What is true, what happened
  - [Actions](https://contributors.home-assistant.io/core/internals/actions/): What can be done
  - [Registries](https://contributors.home-assistant.io/architecture/core/registries/): What it remembers
  - Automations: Triggers, conditions, actions
  - [Recorder](https://contributors.home-assistant.io/architecture/core/history/): History and statistics
  - [Integrations](https://contributors.home-assistant.io/core/integrations/): with entities, through Python libraries
- Core reaches what it connects to through: Local network, the internet, radios
- What it connects to
  - Devices: On the network, Bluetooth, USB
  - Protocols: Zigbee, Z-Wave, Matter, MQTT
  - Services: Weather, energy, AI
- On Home Assistant OS, it all runs on
  - [Home Assistant OS](https://contributors.home-assistant.io/os/operating-system/): The operating system
  - [Supervisor](https://contributors.home-assistant.io/architecture/platform/supervisor/): Runs and updates it all
  - [Apps](https://contributors.home-assistant.io/apps/how-apps-work/): Software next to Core

## The center: Home Assistant Core

[Home Assistant Core](https://contributors.home-assistant.io/architecture/core/) is a Python application, and every installation runs it. It knows the state of every device in the home, runs automations, and keeps the history. Integrations connect it to devices and services.

The most important idea: everything becomes [entities](https://contributors.home-assistant.io/glossary/entity/). An integration turns a Philips Hue lamp into a light entity, a thermostat into a climate entity and a few sensors. From then on, the rest of Home Assistant only works with entities, whatever brand they come from.

## Where people use it

- **The [frontend](https://contributors.home-assistant.io/frontend/)** is the web interface: dashboards, settings, the automation editor. It runs in the browser, and Core serves its files. [Its place in the whole](https://contributors.home-assistant.io/architecture/frontend/) explains how it relates to Core.
- **The [companion apps](https://contributors.home-assistant.io/companion/)** show the same frontend on phones, tablets, and Macs, and add sensors, notifications, and widgets from the device. See [how they connect](https://contributors.home-assistant.io/architecture/platform/companion-apps/).
- **[Voice](https://contributors.home-assistant.io/architecture/platform/voice/)** turns a spoken sentence into an action, from a satellite in the kitchen, or the phone.
- **Other software**, like scripts, Amazon Alexa, and Google Assistant, talks to Home Assistant through its APIs or through Home Assistant Link.

They all talk to Core over the same [APIs](https://contributors.home-assistant.io/architecture/connections/), and log in the same way.

## What it connects to

Integrations talk to the outside world: devices on the local network, radios like Zigbee, Z-Wave, Thread, and Bluetooth, and services on the internet. The code that knows how to talk to a specific device lives in a Python library, which the integration uses. More on that in the [principles](https://contributors.home-assistant.io/architecture/principles/).

Some protocols run as a separate program, next to Core: Z-Wave JS for Z-Wave, an MQTT broker, and a Matter server for Matter. The integration talks to that program.

## What runs it

On [Home Assistant OS](https://contributors.home-assistant.io/os/operating-system/), the recommended installation, the [Supervisor](https://contributors.home-assistant.io/architecture/platform/supervisor/) runs Home Assistant Core in a container, next to [apps](https://contributors.home-assistant.io/apps/how-apps-work/), like an MQTT broker or Z-Wave JS. It makes backups, and installs updates of everything, including the operating system.

With [Home Assistant Container](https://contributors.home-assistant.io/os/installation-types/), the user runs Core in a container themselves, without the Supervisor and apps.

## Outside the home

[Home Assistant Link](https://contributors.home-assistant.io/architecture/platform/cloud/), from Nabu Casa, is optional. It makes Home Assistant reachable from anywhere through an encrypted tunnel, connects it to Alexa and Google Assistant, and offers speech services for voice.

## One flow, end to end

You turn on a light from a dashboard:

1. You select the light's card. The frontend sends `call_service` for `light.turn_on` over the [WebSocket API](https://contributors.home-assistant.io/core/internals/websocket-api/).
2. Core checks you may do that, and performs the [action](https://contributors.home-assistant.io/core/internals/actions/): it calls `async_turn_on` on the light entity.
3. The entity, part of an integration, tells the lamp to turn on, through its library.
4. The lamp reports it is on. The entity writes its new state to the [state machine](https://contributors.home-assistant.io/core/internals/states/).
5. The state machine fires `state_changed`. The frontend gets it, and shows the light as on, on every screen. The recorder writes it to the history, and any automation waiting for it runs.

The same path works for an automation, a voice command, or an app: only step 1 is different.

## Ready to contribute?

Every piece on this page has an area on this site, with a first contribution to get you going:

- **Home Assistant Core and integrations**: [your first contribution to Core](https://contributors.home-assistant.io/core/first-contribution/).
- **The frontend**: [your first frontend contribution](https://contributors.home-assistant.io/frontend/first-contribution/).
- **The companion apps**: [your first companion app contribution](https://contributors.home-assistant.io/companion/first-contribution/).
- **Voice**: [voice translations](https://contributors.home-assistant.io/translate/voice/), for the sentences Assist understands in your language.
- **The Supervisor and Home Assistant OS**: [your first contribution to the Supervisor](https://contributors.home-assistant.io/os/first-contribution/).
- **Apps**: [your first contribution](https://contributors.home-assistant.io/apps/first-contribution/) in the Apps area.
- **Home Assistant Link**: the `cloud` integration is part of Core.

The [Architecture overview](https://contributors.home-assistant.io/architecture/#ready-to-contribute) has the full map, including design, documentation, and translations.
