Compare commits

...

8 Commits

Author SHA1 Message Date
d8780b1790 herdlicht 2
All checks were successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
2025-12-10 21:41:35 +01:00
3d5010b4a1 herdlicht
All checks were successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
2025-12-10 21:40:13 +01:00
b471ab5edc hottis wifi relay 4
All checks were successful
ci/woodpecker/tag/build/5 Pipeline was successful
ci/woodpecker/tag/build/6 Pipeline was successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/7 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/5 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/6 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/ingress Pipeline was successful
2025-12-10 21:26:19 +01:00
3e0a1b49ab hottis wifi relay 3
All checks were successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
2025-12-10 21:21:29 +01:00
befdc8a46c hottis wifi relay 2
All checks were successful
ci/woodpecker/tag/build/5 Pipeline was successful
ci/woodpecker/tag/build/6 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
ci/woodpecker/tag/build/7 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/5 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/6 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/ingress Pipeline was successful
2025-12-10 21:15:49 +01:00
da16c59238 hottis wifi relay
All checks were successful
ci/woodpecker/tag/build/5 Pipeline was successful
ci/woodpecker/tag/build/6 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
ci/woodpecker/tag/build/7 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/5 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/6 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/ingress Pipeline was successful
2025-12-10 21:13:00 +01:00
5f3185894d licht keller flur 3
All checks were successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
2025-12-10 20:58:45 +01:00
fb828c9a2c licht keller flur 2
All checks were successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
2025-12-10 20:50:34 +01:00
4 changed files with 135 additions and 11 deletions

View File

@@ -19,6 +19,7 @@ from apps.abstraction.vendors import (
tasmota, tasmota,
hottis_pv_modbus, hottis_pv_modbus,
hottis_wago_modbus, hottis_wago_modbus,
hottis_wifi_relay,
) )
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -42,6 +43,7 @@ for vendor_name, vendor_module in [
("tasmota", tasmota), ("tasmota", tasmota),
("hottis_pv_modbus", hottis_pv_modbus), ("hottis_pv_modbus", hottis_pv_modbus),
("hottis_wago_modbus", hottis_wago_modbus), ("hottis_wago_modbus", hottis_wago_modbus),
("hottis_wifi_relay", hottis_wifi_relay),
]: ]:
for (device_type, direction), handler in vendor_module.HANDLERS.items(): for (device_type, direction), handler in vendor_module.HANDLERS.items():
key = (device_type, vendor_name, direction) key = (device_type, vendor_name, direction)

View File

@@ -0,0 +1,38 @@
"""Hottis WiFi Relay vendor transformations."""
import logging
from typing import Any
logger = logging.getLogger(__name__)
def transform_relay_to_vendor(payload: dict[str, Any]) -> str:
"""Transform abstract relay payload to Hottis WiFi Relay format.
Hottis WiFi Relay expects plain text 'on' or 'off' (not JSON).
Example:
- Abstract: {'power': 'on'}
- Hottis WiFi Relay: 'ON'
"""
power = payload.get("power", "off").upper()
return power
def transform_relay_to_abstract(payload: str) -> dict[str, Any]:
"""Transform Hottis WiFi Relay relay payload to abstract format.
Hottis WiFi Relay sends plain text 'on' or 'off'.
Example:
- Hottis WiFi Relay: 'ON'
- Abstract: {'power': 'on'}
"""
return {"power": payload.strip().lower()}
# Registry of handlers for this vendor
HANDLERS = {
("relay", "to_vendor"): transform_relay_to_vendor,
("relay", "to_abstract"): transform_relay_to_abstract,
}

View File

@@ -907,4 +907,66 @@ devices:
power: true power: true
topics: topics:
set: "pulsegen/command/10/21" set: "pulsegen/command/10/21"
state: "pulsegen/state/10" state: "pulsegen/status/10"
- device_id: waschkueche_licht
name: Waschküche Licht
type: relay
cap_version: "relay@1.0.0"
technology: hottis_wago_modbus
features:
power: true
topics:
set: "pulsegen/command/8/22"
state: "pulsegen/status/8"
- device_id: werkstatt_licht
name: Werkstatt Licht
type: relay
cap_version: "relay@1.0.0"
technology: hottis_wago_modbus
features:
power: true
topics:
set: "pulsegen/command/7/19"
state: "pulsegen/status/7"
- device_id: sportzimmer_licht
name: Sportzimmer Licht
type: relay
cap_version: "relay@1.0.0"
technology: hottis_wago_modbus
features:
power: true
topics:
set: "pulsegen/command/9/20"
state: "pulsegen/status/9"
- device_id: deckenlampe_patty
name: Deckenlampe Patty
type: relay
cap_version: "relay@1.0.0"
technology: hottis_wago_modbus
features:
power: true
topics:
set: "pulsegen/command/4/16"
state: "pulsegen/status/4"
- device_id: regallampe_esszimmer
name: Regallampe Esszimmer
type: relay
cap_version: "relay@1.0.0"
technology: hottis_wifi_relay
features:
power: true
topics:
set: "IoT/WifiRelay1/State"
state: "IoT/WifiRelay1/State"
- device_id: herdlicht
name: Herdlicht
type: light
cap_version: "relay@1.0.0"
technology: zigbee2mqtt
features:
power: true
brightness: true
topics:
state: "zigbee2mqtt/herdlicht"
set: "zigbee2mqtt/herdlicht/set"

View File

@@ -61,10 +61,10 @@ rooms:
title: Stehlampe Esszimmer Schrank title: Stehlampe Esszimmer Schrank
icon: 💡 icon: 💡
rank: 82 rank: 82
# - device_id: kleine_lampe_rechts_esszimmer - device_id: regallampe_esszimmer
# title: kleine Lampe rechts Esszimmer title: Regallampe Esszimmer
# icon: 💡 icon: 💡
# rank: 90 rank: 90
- device_id: licht_schrank_esszimmer - device_id: licht_schrank_esszimmer
title: Schranklicht Esszimmer title: Schranklicht Esszimmer
icon: 💡 icon: 💡
@@ -144,6 +144,10 @@ rooms:
title: Küche Fensterbank title: Küche Fensterbank
icon: 💡 icon: 💡
rank: 144 rank: 144
- device_id: herdlicht
title: Herdlicht
icon: 💡
rank: 145
- device_id: thermostat_kueche - device_id: thermostat_kueche
title: Kueche title: Kueche
icon: 🌡️ icon: 🌡️
@@ -176,23 +180,27 @@ rooms:
icon: 💡 icon: 💡
rank: 160 rank: 160
- device_id: schranklicht_hinten_patty - device_id: schranklicht_hinten_patty
title: Schranklicht hinten Patty title: Schranklicht hinten
icon: 💡 icon: 💡
rank: 170 rank: 170
- device_id: schranklicht_vorne_patty - device_id: schranklicht_vorne_patty
title: Schranklicht vorne Patty title: Schranklicht vorne
icon: 💡 icon: 💡
rank: 180 rank: 180
- device_id: kugellampe_patty - device_id: kugellampe_patty
title: Kugellampe Patty title: Kugellampe
icon: 💡 icon: 💡
rank: 181 rank: 181
- device_id: licht_schreibtisch_patty - device_id: licht_schreibtisch_patty
title: Licht Schreibtisch Patty title: Licht Schreibtisch
icon: 💡 icon: 💡
rank: 182 rank: 182
- device_id: deckenlampe_patty
title: Deckenlampe
icon: 💡
rank: 183
- device_id: thermostat_patty - device_id: thermostat_patty
title: Thermostat Patty title: Thermostat
icon: 🌡️ icon: 🌡️
rank: 185 rank: 185
- device_id: kontakt_patty_garten_rechts - device_id: kontakt_patty_garten_rechts
@@ -272,6 +280,10 @@ rooms:
title: Sportlicht am Fernseher, Studierzimmer title: Sportlicht am Fernseher, Studierzimmer
icon: 🏃 icon: 🏃
rank: 260 rank: 260
- device_id: sportzimmer_licht
title: Deckenlampe
icon: 💡
rank: 262
- device_id: sensor_sportzimmer - device_id: sensor_sportzimmer
title: Temperatur & Luftfeuchte title: Temperatur & Luftfeuchte
icon: 🌡️ icon: 🌡️
@@ -313,6 +325,11 @@ rooms:
title: Temperatur & Luftfeuchte title: Temperatur & Luftfeuchte
icon: 🌡️ icon: 🌡️
rank: 290 rank: 290
- device_id: waschkueche_licht
title: Waschküche Licht
icon: 💡
rank: 340
- id: outdoor - id: outdoor
name: Outdoor name: Outdoor
devices: devices:
@@ -346,6 +363,11 @@ rooms:
title: Keller Flur Licht title: Keller Flur Licht
icon: 💡 icon: 💡
rank: 330 rank: 330
- device_id: werkstatt_licht
title: Werkstatt Licht
icon: 💡
rank: 350