MCPSERV.CLUB
Domoticz

Domoticz

Self-Hosted

Home automation for every device, everywhere

Active(100)
3.7kstars
0views
Updated 8 hours ago
Domoticz screenshot

Overview

Discover what makes Domoticz powerful

Domoticz is a lightweight, cross‑platform home‑automation engine that exposes a rich set of sensors and actuators through a unified, web‑based UI. From a developer’s standpoint it is essentially an event‑driven server that listens to external protocols (Zigbee, Z‑Wave, RFXCOM, 1‑Wire, P1 Smart Meter, etc.), aggregates state changes into a central database, and serves that data over HTTP/HTTPS. The core loop is written in **C++** for performance and low memory footprint, while the front‑end is a responsive HTML5/JavaScript SPA that consumes RESTful endpoints. This design allows developers to plug custom logic either via the built‑in scripting engine (Lua, Python) or by extending the API layer with their own modules.

Protocol Support

Event‑Driven Architecture

Extensible Plugin System

REST API & Webhooks

Overview

Domoticz is a lightweight, cross‑platform home‑automation engine that exposes a rich set of sensors and actuators through a unified, web‑based UI. From a developer’s standpoint it is essentially an event‑driven server that listens to external protocols (Zigbee, Z‑Wave, RFXCOM, 1‑Wire, P1 Smart Meter, etc.), aggregates state changes into a central database, and serves that data over HTTP/HTTPS. The core loop is written in C++ for performance and low memory footprint, while the front‑end is a responsive HTML5/JavaScript SPA that consumes RESTful endpoints. This design allows developers to plug custom logic either via the built‑in scripting engine (Lua, Python) or by extending the API layer with their own modules.

Key Features

  • Protocol Support – Native drivers for Zigbee, Z‑Wave, RFXCOM, 1‑Wire, and various smart meters. Each driver implements a driver interface that translates raw packets into Domoticz’s internal device objects.
  • Event‑Driven Architecture – The engine publishes state changes to a message queue (Domoticz::Events). Subscribers (webhooks, scripts, plugins) can react asynchronously, enabling real‑time automation without polling.
  • Extensible Plugin System – Plugins are compiled shared libraries (*.so/*.dll) that register callbacks with the core. The plugin API is documented in plugins.md, exposing methods such as OnEvent(), GetConfigJSON(), and SetValue().
  • REST API & Webhooks – A RESTful interface (/json.htm) returns JSON payloads for all devices, scenes, and logs. Webhook endpoints can be configured per event type, allowing integration with external services (IFTTT, Node‑RED, custom microservices).
  • Secure by Default – Basic auth is enabled out of the box; TLS can be added via reverse proxy. The security guide outlines hardening steps such as disabling the default admin user and enabling HTTPS.

Technical Stack

LayerTechnology
RuntimeC++17 (cross‑platform), compiled with GCC/Clang on Linux, MSVC on Windows
DatabaseSQLite (embedded), optional MySQL/PostgreSQL for larger deployments
Web UIVanilla JS + jQuery, Bootstrap 4, responsive HTML5
CommunicationHTTP/HTTPS for API, WebSocket for live updates, MQTT optional via plugin
ContainerizationOfficial Docker images available; container entrypoint runs domoticz binary with mounted config volumes

The choice of SQLite keeps the footprint minimal for single‑user setups, while the API layer is agnostic to the underlying DB, enabling migration to a clustered database if needed.

Deployment & Infrastructure

Domoticz is designed for self‑hosting on a range of hardware: from Raspberry Pi and other ARM boards to full x86_64 servers. Minimum requirements are 512 MB RAM and a single core CPU; however, high‑device counts (hundreds of sensors) may benefit from 2 GB+ RAM and a multi‑core host. Docker simplifies deployment; the image exposes /config for persistent storage, allowing zero‑downtime updates via docker pull && docker restart. For production, placing Domoticz behind a reverse proxy (NGINX/Traefik) is recommended to handle TLS termination and HTTP/2.

Scalability is primarily limited by the SQLite file size (≈ 500 GB) and single‑threaded event loop. For multi‑node setups, developers can orchestrate several Domoticz instances behind a load balancer and share the same database via network file system, though this introduces contention. A more robust approach is to replace SQLite with PostgreSQL and write a custom data‑replication layer.

Integration & Extensibility

Domoticz’s plugin API is intentionally minimal yet expressive. A typical plugin follows this lifecycle:

  1. RegisterAddDevice() to expose new virtual devices.
  2. Handle Events – Override OnEvent() to process incoming state changes.
  3. Expose API – Implement /json.htm handlers for custom endpoints.

Additionally, the Automation module allows developers to write Lua scripts that react to device states and schedule tasks. The webhooks feature can be leveraged to send HTTP POSTs to external services whenever a sensor reports a threshold breach. For MQTT enthusiasts, the MQTT plugin bridges Domoticz topics (domoticz/<device>) to an MQTT broker, enabling bidirectional communication with IoT stacks like Home Assistant or Node‑RED.

Developer Experience

The project hosts comprehensive documentation on its wiki, including a detailed API reference (/json.htm parameters), plugin development guide, and security hardening checklist. The community is active on the official forum and Discord channel, where developers frequently discuss custom driver implementations and optimization tricks. Issue tracking is focused on bugs and feature requests, ensuring that pull requests are reviewed in a dedicated developer workflow. The license is MIT, allowing unrestricted use and modification.

Use Cases

  • Custom Smart Home Hub – Replace commercial hubs (Philips Hue Bridge, Samsung SmartThings) with a single open‑source engine that supports all protocols.
  • Edge Analytics – Run Domoticz on a local device to aggregate sensor data, then forward processed metrics to cloud dashboards (Grafana,

Open SourceReady to get started?

Join the community and start self-hosting Domoticz today