secubox-openwrt/package/secubox/secubox-app-domoticz/README.md
CyberMind-FR f2f24afe12 feat(domoticz): Rewrite from Docker to LXC Debian container
- Switch from Docker to LXC with Debian bookworm rootfs and native
  Domoticz binary from GitHub releases (latest/download pattern)
- Fix LXC cgroup2 terminal allocation: add lxc.tty.max, lxc.pty.max,
  cgroup2 device permissions for standard char devices, disable seccomp
- Fix PID 1 issue: run domoticz as child process with signal forwarding
- Use quoted heredoc with sed placeholders for start script generation
- Update LuCI view: Docker → LXC references, add memory usage display
- Remove Docker image UCI option, update catalog runtime to "lxc"
- Fix streamlit LXC config: same cgroup2/terminal/seccomp fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:05:39 +01:00

87 lines
2.2 KiB
Markdown

# SecuBox Domoticz
Home automation platform running in an LXC Alpine container with MQTT bridge, Zigbee2MQTT integration, and P2P mesh support.
## Installation
```sh
opkg install secubox-app-domoticz
domoticzctl install
/etc/init.d/domoticz start
```
## Configuration
UCI config file: `/etc/config/domoticz`
```
config domoticz 'main'
option enabled '0'
option data_path '/srv/domoticz'
option devices_path '/srv/devices'
option port '8080'
option timezone 'UTC'
config domoticz 'mqtt'
option enabled '0'
option broker '127.0.0.1'
option broker_port '1883'
option topic_prefix 'domoticz'
option z2m_topic 'zigbee2mqtt'
config domoticz 'network'
option domain 'domoticz.secubox.local'
option haproxy '0'
option firewall_wan '0'
config domoticz 'mesh'
option enabled '0'
```
## Usage
```sh
domoticzctl install # Create LXC container, download Domoticz
domoticzctl uninstall # Remove container (data preserved)
domoticzctl update # Download latest Domoticz, restart
domoticzctl status # Show container status
domoticzctl logs [-f] # Container logs
domoticzctl configure-mqtt # Auto-setup Mosquitto + MQTT bridge
domoticzctl configure-haproxy # Register HAProxy vhost
domoticzctl backup [path] # Backup data
domoticzctl restore <path> # Restore from backup
domoticzctl mesh-register # Register in P2P mesh
```
## MQTT Bridge
The `configure-mqtt` command auto-configures:
1. Installs `mosquitto-nossl` if not present
2. Configures Mosquitto listener on port 1883
3. Detects Zigbee2MQTT broker settings for compatibility
4. Stores MQTT config in UCI for persistence
After setup, add MQTT hardware in Domoticz UI: Setup > Hardware > MQTT Client Gateway.
## Zigbee Integration
When `secubox-app-zigbee2mqtt` is installed:
- Both services share the same Mosquitto broker
- Zigbee devices publish on the `zigbee2mqtt/#` topic
- Domoticz subscribes via MQTT Client Gateway hardware
## Files
- `/etc/config/domoticz` -- UCI configuration
- `/etc/init.d/domoticz` -- init script (procd)
- `/usr/sbin/domoticzctl` -- controller CLI
## Dependencies
- `lxc`, `lxc-common`
- Optional: `mosquitto-nossl`, `secubox-app-zigbee2mqtt`
## License
Apache-2.0