Skip to main content

No project description provided

Project description

Domovoy

Documentation Status

Domovoy is a powerful application framework designed to drive automations for Home Assistant using Python. If you prefer writing your automations in pure Python rather than YAML, Node Red, or n8n, Domovoy provides a more flexible and developer-friendly approach to home automation.

Inspired by AppDaemon, Domovoy is a completely new codebase built from the ground up with Python's async/await throughout, resulting in significantly improved resource efficiency and performance.

Beta Status: This project is currently in beta. While I've been successfully running my home with Domovoy since 2023, you may still encounter bugs or rough edges. Feedback and contributions are welcome!

Key Features

  • ServEnts Integration: When paired with ServEnts (a Home Assistant custom component), Domovoy can create devices and entities directly from Python code, eliminating the need for manually configuring helpers in HA.

  • Type Safety: Full support for Python typing, including typechecking for entities and services on the Home Assistant instance it connects to, catching errors before they happen.

  • Python-First Approach: Write all your automations in Python with full IDE support, and the ability to leverage Python's rich ecosystem of libraries.

  • High Performance: Leverages Python's async/await for efficient, non-blocking operations that make the most of your system resources.

  • Hot Reload: Automatic file watching and module reloading during development - make changes to your apps and see them take effect immediately without restarting.

Quickest Start

The fastest way to get started is with the Domovoy Starter Template. This prebuilt template has most of the pieces already in place—just update the config file with your Home Assistant details and run the included docker command.

Quick Start with Docker

The recommended way to run Domovoy is using Docker.

1. Create your configuration directory

mkdir -p ~/domovoy/apps

2. Create a configuration file

Create ~/domovoy/config.yml:

app_suffix: _apps
hass_access_token: YOUR_LONG_LIVED_ACCESS_TOKEN
hass_url: ws://homeassistant.local:8123/api/websocket
app_path: /config/apps
timezone: America/Chicago
install_pip_dependencies: true

Replace:

3. Install ServEnts Integration (Optional)

If you want to create Home Assistant entities directly from your Python code, install the ServEnts custom component in Home Assistant. This allows Domovoy to dynamically create sensors, switches, buttons, and other entities.

4. Run with Docker

docker run -d \
  --name domovoy \
  --restart unless-stopped \
  -v ~/domovoy:/config \
  ghcr.io/carlos-sarmiento/domovoy:latest

5. Create your first app

Create ~/domovoy/apps/my_first_apps.py:

from domovoy.applications import AppBase, EmptyAppConfig
from domovoy.applications.registration import register_app


class MyFirstApp(AppBase[EmptyAppConfig]):
    async def initialize(self):
        self.log.info("Hello from Domovoy!")

        # Listen to state changes
        self.callbacks.listen_state(
            "light.living_room"
            self.on_light_change,
        )

    async def on_light_change(self, entity_id, old, new):
        self.log.info(f"Light changed from {old} to {new}")


register_app(
    app_class=MyFirstApp,
    app_name="my_first_app",
    config=EmptyAppConfig(),
)

Documentation

Full documentation is available at domovoy.readthedocs.io

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

domovoy-0.10.1.tar.gz (149.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

domovoy-0.10.1-py3-none-any.whl (88.5 kB view details)

Uploaded Python 3

File details

Details for the file domovoy-0.10.1.tar.gz.

File metadata

  • Download URL: domovoy-0.10.1.tar.gz
  • Upload date:
  • Size: 149.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for domovoy-0.10.1.tar.gz
Algorithm Hash digest
SHA256 58b6173cbcc287d34559ab6b1f931749c2982d85ef76f3af88a241aa18492ce6
MD5 d935fb834c51d26479484d2852a20f83
BLAKE2b-256 58a04e5ea642a7fc0b37e73c7731657b9bbfa6e8991af5f418f600080f70ca43

See more details on using hashes here.

Provenance

The following attestation bundles were made for domovoy-0.10.1.tar.gz:

Publisher: python-publish.yml on carlos-sarmiento/domovoy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file domovoy-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: domovoy-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 88.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for domovoy-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a1a711f30dd5ed5ebc288176b1c125c6241c70d1b4ef99d2d42b6cb0e97c2fe
MD5 87412470149adf1f6b5500436d1e435f
BLAKE2b-256 f4b293680bb71bbe49866de48e87bc3ef02ff4df57ca7c636bff8403c2fa8126

See more details on using hashes here.

Provenance

The following attestation bundles were made for domovoy-0.10.1-py3-none-any.whl:

Publisher: python-publish.yml on carlos-sarmiento/domovoy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page