Initial public release
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=HA deCONZ Bridge web debugger
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=%h/ha-deconz-bridge/app
|
||||
EnvironmentFile=%h/ha-deconz-bridge/config/service.env
|
||||
ExecStart=%h/ha-deconz-bridge/.venv/bin/python -m ha_deconz_bridge.debugger.web_debugger %h/ha-deconz-bridge/config/lights_config.py --host 0.0.0.0 --port 8766
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=HA deCONZ Bridge service
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=%h/ha-deconz-bridge/app
|
||||
EnvironmentFile=-%h/ha-deconz-bridge/config/service.env
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
Environment=HA_DECONZ_BRIDGE_LOG_FILE=%h/ha-deconz-bridge/ha-deconz-bridge.log
|
||||
ExecStart=%h/ha-deconz-bridge/.venv/bin/ha-deconz-bridge-service %h/ha-deconz-bridge/config/lights_config.py
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,57 @@
|
||||
from ha_deconz_bridge.color import Color
|
||||
from ha_deconz_bridge.lights import ChannelSpec, ControllerModeSpec, ControllerSpec, VirtualLightSpec
|
||||
from ha_deconz_bridge.settings import Settings
|
||||
|
||||
|
||||
SETTINGS = Settings.from_env()
|
||||
|
||||
# Replace the controller IDs with real deCONZ light IDs.
|
||||
# The chromaticity and brightness numbers here are placeholders that are good
|
||||
# enough for an initial hardware smoke test.
|
||||
LIGHTS = {
|
||||
"test_ct": VirtualLightSpec(
|
||||
name="test_ct",
|
||||
supported_color_modes=("color_temp",),
|
||||
controllers={
|
||||
"1": ControllerSpec(
|
||||
zigbee_id="1",
|
||||
name="Replace with real CT controller",
|
||||
modes={
|
||||
"color_temp": ControllerModeSpec(
|
||||
name="color_temp",
|
||||
channels={
|
||||
"ww": ChannelSpec(
|
||||
"ww",
|
||||
Color.from_color_temp(500, brightness=300, temp_range=(153, 500)),
|
||||
),
|
||||
"cw": ChannelSpec(
|
||||
"cw",
|
||||
Color.from_color_temp(153, brightness=320, temp_range=(153, 500)),
|
||||
),
|
||||
},
|
||||
)
|
||||
},
|
||||
)
|
||||
},
|
||||
),
|
||||
"test_rgb": VirtualLightSpec(
|
||||
name="test_rgb",
|
||||
supported_color_modes=("rgb",),
|
||||
controllers={
|
||||
"2": ControllerSpec(
|
||||
zigbee_id="2",
|
||||
name="Replace with real RGB controller",
|
||||
modes={
|
||||
"rgb": ControllerModeSpec(
|
||||
name="rgb",
|
||||
channels={
|
||||
"r": ChannelSpec("r", Color.from_xy((0.68, 0.31), brightness=180)),
|
||||
"g": ChannelSpec("g", Color.from_xy((0.18, 0.70), brightness=420)),
|
||||
"b": ChannelSpec("b", Color.from_xy((0.14, 0.05), brightness=110)),
|
||||
},
|
||||
)
|
||||
},
|
||||
)
|
||||
},
|
||||
),
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# Copy or edit this file on the target host at:
|
||||
# <install-dir>/config/service.env
|
||||
|
||||
HA_DECONZ_BRIDGE_MQTT_HOST=homeassistant
|
||||
HA_DECONZ_BRIDGE_MQTT_PORT=1883
|
||||
HA_DECONZ_BRIDGE_MQTT_USER=
|
||||
HA_DECONZ_BRIDGE_MQTT_PASSWORD=
|
||||
|
||||
HA_DECONZ_BRIDGE_DECONZ_HOST=localhost
|
||||
HA_DECONZ_BRIDGE_DECONZ_HTTP_PORT=80
|
||||
HA_DECONZ_BRIDGE_DECONZ_WS_PORT=443
|
||||
HA_DECONZ_BRIDGE_DECONZ_API_KEY=
|
||||
|
||||
# Lower values make nearby color/CT requests share solver cache entries.
|
||||
# This improves repeated nearby solves, but can create visible color dead zones.
|
||||
HA_DECONZ_BRIDGE_TARGET_CACHE_SCALE=10000
|
||||
|
||||
# CT-only uv slack for preferring CT-labeled emitters over exact RGB emulation.
|
||||
HA_DECONZ_BRIDGE_APPROXIMATE_CHROMA_BAND=0.025
|
||||
|
||||
# Run one representative solver request per HA mode in the background so
|
||||
# Numba-backed paths are compiled without blocking MQTT or debugger startup.
|
||||
HA_DECONZ_BRIDGE_WARMUP_ON_STARTUP=true
|
||||
|
||||
# Numeric backend for color solves. Keep "scipy" unless optional speed
|
||||
# dependencies were installed, for example with pip install -e '.[speed]'.
|
||||
# Allowed values: scipy, numba, auto.
|
||||
HA_DECONZ_BRIDGE_NUMERIC_BACKEND=scipy
|
||||
Reference in New Issue
Block a user