Config extensions
- KNX consumption in W by template filter - pool pump: runtime in h
This commit is contained in:
parent
e6f5504181
commit
87e199e260
|
@ -0,0 +1,238 @@
|
|||
attr global userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride
|
||||
attr global autoload_undefined_devices 1
|
||||
attr global logfile ./log/fhem-%Y-%m.log
|
||||
attr global modpath .
|
||||
attr global motd Error messages while initializing FHEM:\
|
||||
attr global statefile ./log/fhem.save
|
||||
attr global updateInBackground 1
|
||||
attr global verbose 3
|
||||
attr global genericDeviceType:switch,light,blind,thermostat
|
||||
|
||||
|
||||
define telnetPort telnet 7072 global
|
||||
|
||||
define WEB FHEMWEB 8083 global
|
||||
|
||||
#define WEBphone FHEMWEB 8084 global
|
||||
#attr WEBphone stylesheetPrefix smallscreen
|
||||
|
||||
#define WEBtablet FHEMWEB 8085 global
|
||||
#attr WEBtablet stylesheetPrefix touchpad
|
||||
|
||||
# Fake FileLog entry, to access the fhem log from FHEMWEB
|
||||
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
|
||||
|
||||
define autocreate autocreate
|
||||
attr autocreate autosave 1
|
||||
#attr autocreate filelog ./log/%NAME-%Y.log
|
||||
|
||||
#define eventTypes eventTypes ./log/eventTypes.txt
|
||||
|
||||
# Disable this to avoid looking for new USB devices on startup
|
||||
define initialUsbCheck notify global:INITIALIZED usb create
|
||||
|
||||
define CUL_0 CUL /dev/ttyACM0@9600 1034
|
||||
attr CUL_0 hmId 62a77d
|
||||
attr CUL_0 rfmode HomeMatic
|
||||
|
||||
define ArbeitszimmerMartin_Rollo CUL_HM 339336
|
||||
attr ArbeitszimmerMartin_Rollo IODev CUL_0
|
||||
attr ArbeitszimmerMartin_Rollo autoReadReg 4_reqStatus
|
||||
attr ArbeitszimmerMartin_Rollo expert 2_full
|
||||
attr ArbeitszimmerMartin_Rollo firmware 2.3
|
||||
attr ArbeitszimmerMartin_Rollo model HM-LC-Bl1PBU-FM
|
||||
attr ArbeitszimmerMartin_Rollo room CUL_HM
|
||||
attr ArbeitszimmerMartin_Rollo serialNr LEQ1440417
|
||||
attr ArbeitszimmerMartin_Rollo subType blindActuator
|
||||
attr ArbeitszimmerMartin_Rollo webCmd statusRequest:toggleDir:on:off:up:down:stop
|
||||
attr ArbeitszimmerMartin_Rollo room Homekit
|
||||
|
||||
|
||||
define ArbeitszimmerMartin_Deckenlampe CUL_HM 1AA382
|
||||
attr ArbeitszimmerMartin_Deckenlampe IODev CUL_0
|
||||
attr ArbeitszimmerMartin_Deckenlampe autoReadReg 4_reqStatus
|
||||
attr ArbeitszimmerMartin_Deckenlampe expert 2_full
|
||||
attr ArbeitszimmerMartin_Deckenlampe firmware 2.2
|
||||
attr ArbeitszimmerMartin_Deckenlampe model HM-LC-Dim1TPBU-FM
|
||||
attr ArbeitszimmerMartin_Deckenlampe room CUL_HM
|
||||
attr ArbeitszimmerMartin_Deckenlampe serialNr JEQ0201891
|
||||
attr ArbeitszimmerMartin_Deckenlampe subType dimmer
|
||||
attr ArbeitszimmerMartin_Deckenlampe webCmd getConfig:clear msgEvents
|
||||
define ArbeitszimmerMartin_Deckenlampe_Sw CUL_HM 1AA38201
|
||||
attr ArbeitszimmerMartin_Deckenlampe_Sw model HM-LC-Dim1TPBU-FM
|
||||
attr ArbeitszimmerMartin_Deckenlampe_Sw peerIDs
|
||||
attr ArbeitszimmerMartin_Deckenlampe_Sw webCmd statusRequest:toggle:on:off:up:down
|
||||
define ArbeitszimmerMartin_Deckenlampe_Sw1_V_01 CUL_HM 1AA38202
|
||||
attr ArbeitszimmerMartin_Deckenlampe_Sw1_V_01 model HM-LC-Dim1TPBU-FM
|
||||
attr ArbeitszimmerMartin_Deckenlampe_Sw1_V_01 webCmd statusRequest:toggle:on:off:up:down
|
||||
define ArbeitszimmerMartin_Deckenlampe_Sw1_V_02 CUL_HM 1AA38203
|
||||
attr ArbeitszimmerMartin_Deckenlampe_Sw1_V_02 model HM-LC-Dim1TPBU-FM
|
||||
attr ArbeitszimmerMartin_Deckenlampe_Sw1_V_02 webCmd statusRequest:toggle:on:off:up:down
|
||||
attr ArbeitszimmerMartin_Deckenlampe room Homekit
|
||||
|
||||
|
||||
|
||||
define Schlafzimmer_Deckenlampe CUL_HM 1AA1C7
|
||||
attr Schlafzimmer_Deckenlampe IODev CUL_0
|
||||
attr Schlafzimmer_Deckenlampe autoReadReg 4_reqStatus
|
||||
attr Schlafzimmer_Deckenlampe expert 2_full
|
||||
attr Schlafzimmer_Deckenlampe firmware 2.2
|
||||
attr Schlafzimmer_Deckenlampe model HM-LC-Dim1TPBU-FM
|
||||
attr Schlafzimmer_Deckenlampe room CUL_HM
|
||||
attr Schlafzimmer_Deckenlampe serialNr JEQ0201456
|
||||
attr Schlafzimmer_Deckenlampe subType dimmer
|
||||
attr Schlafzimmer_Deckenlampe webCmd getConfig:clear msgEvents
|
||||
define Schlafzimmer_Deckenlampe_Sw CUL_HM 1AA1C701
|
||||
attr Schlafzimmer_Deckenlampe_Sw model HM-LC-Dim1TPBU-FM
|
||||
attr Schlafzimmer_Deckenlampe_Sw peerIDs
|
||||
attr Schlafzimmer_Deckenlampe_Sw webCmd statusRequest:toggle:on:off:up:down
|
||||
define Schlafzimmer_Deckenlampe_Sw1_V_01 CUL_HM 1AA1C702
|
||||
attr Schlafzimmer_Deckenlampe_Sw1_V_01 model HM-LC-Dim1TPBU-FM
|
||||
attr Schlafzimmer_Deckenlampe_Sw1_V_01 webCmd statusRequest:toggle:on:off:up:down
|
||||
define Schlafzimmer_Deckenlampe_Sw1_V_02 CUL_HM 1AA1C703
|
||||
attr Schlafzimmer_Deckenlampe_Sw1_V_02 model HM-LC-Dim1TPBU-FM
|
||||
attr Schlafzimmer_Deckenlampe_Sw1_V_02 webCmd statusRequest:toggle:on:off:up:down
|
||||
attr Schlafzimmer_Deckenlampe room Homekit
|
||||
|
||||
|
||||
|
||||
|
||||
define Schlafzimmer_RolloKlein CUL_HM 338C2A
|
||||
attr Schlafzimmer_RolloKlein IODev CUL_0
|
||||
attr Schlafzimmer_RolloKlein autoReadReg 4_reqStatus
|
||||
attr Schlafzimmer_RolloKlein expert 2_full
|
||||
attr Schlafzimmer_RolloKlein firmware 2.3
|
||||
attr Schlafzimmer_RolloKlein model HM-LC-Bl1PBU-FM
|
||||
attr Schlafzimmer_RolloKlein room CUL_HM
|
||||
attr Schlafzimmer_RolloKlein serialNr LEQ1439693
|
||||
attr Schlafzimmer_RolloKlein subType blindActuator
|
||||
attr Schlafzimmer_RolloKlein webCmd statusRequest:toggleDir:on:off:up:down:stop
|
||||
attr Schlafzimmer_RolloKlein room Homekit
|
||||
|
||||
|
||||
|
||||
|
||||
define Schlafzimmer_RolloGross CUL_HM 338C33
|
||||
attr Schlafzimmer_RolloGross IODev CUL_0
|
||||
attr Schlafzimmer_RolloGross autoReadReg 4_reqStatus
|
||||
attr Schlafzimmer_RolloGross expert 2_full
|
||||
attr Schlafzimmer_RolloGross firmware 2.3
|
||||
attr Schlafzimmer_RolloGross model HM-LC-Bl1PBU-FM
|
||||
attr Schlafzimmer_RolloGross room CUL_HM
|
||||
attr Schlafzimmer_RolloGross serialNr LEQ1439702
|
||||
attr Schlafzimmer_RolloGross subType blindActuator
|
||||
attr Schlafzimmer_RolloGross webCmd statusRequest:toggleDir:on:off:up:down:stop
|
||||
attr Schlafzimmer_RolloGross room Homekit
|
||||
|
||||
|
||||
|
||||
define ArbeitszimmerRebecca_Deckenlampe CUL_HM 1B5305
|
||||
attr ArbeitszimmerRebecca_Deckenlampe IODev CUL_0
|
||||
attr ArbeitszimmerRebecca_Deckenlampe autoReadReg 4_reqStatus
|
||||
attr ArbeitszimmerRebecca_Deckenlampe expert 2_full
|
||||
attr ArbeitszimmerRebecca_Deckenlampe firmware 2.2
|
||||
attr ArbeitszimmerRebecca_Deckenlampe model HM-LC-Dim1TPBU-FM
|
||||
attr ArbeitszimmerRebecca_Deckenlampe room CUL_HM
|
||||
attr ArbeitszimmerRebecca_Deckenlampe serialNr JEQ0199674
|
||||
attr ArbeitszimmerRebecca_Deckenlampe subType dimmer
|
||||
attr ArbeitszimmerRebecca_Deckenlampe webCmd getConfig:clear msgEvents
|
||||
define ArbeitszimmerRebecca_Deckenlampe_Sw CUL_HM 1B530501
|
||||
attr ArbeitszimmerRebecca_Deckenlampe_Sw model HM-LC-Dim1TPBU-FM
|
||||
attr ArbeitszimmerRebecca_Deckenlampe_Sw peerIDs
|
||||
attr ArbeitszimmerRebecca_Deckenlampe_Sw webCmd statusRequest:toggle:on:off:up:down
|
||||
define ArbeitszimmerRebecca_Deckenlampe_Sw1_V_01 CUL_HM 1B530502
|
||||
attr ArbeitszimmerRebecca_Deckenlampe_Sw1_V_01 model HM-LC-Dim1TPBU-FM
|
||||
attr ArbeitszimmerRebecca_Deckenlampe_Sw1_V_01 webCmd statusRequest:toggle:on:off:up:down
|
||||
define ArbeitszimmerRebecca_Deckenlampe_Sw1_V_02 CUL_HM 1B530503
|
||||
attr ArbeitszimmerRebecca_Deckenlampe_Sw1_V_02 model HM-LC-Dim1TPBU-FM
|
||||
attr ArbeitszimmerRebecca_Deckenlampe_Sw1_V_02 webCmd statusRequest:toggle:on:off:up:down
|
||||
attr ArbeitszimmerRebecca_Deckenlampe room Homekit
|
||||
|
||||
|
||||
|
||||
|
||||
define ArbeitszimmerRebecca_Rollo CUL_HM 1AF5DD
|
||||
attr ArbeitszimmerRebecca_Rollo IODev CUL_0
|
||||
attr ArbeitszimmerRebecca_Rollo autoReadReg 4_reqStatus
|
||||
attr ArbeitszimmerRebecca_Rollo expert 2_full
|
||||
attr ArbeitszimmerRebecca_Rollo firmware 2.1
|
||||
attr ArbeitszimmerRebecca_Rollo model HM-LC-Bl1PBU-FM
|
||||
attr ArbeitszimmerRebecca_Rollo room CUL_HM
|
||||
attr ArbeitszimmerRebecca_Rollo serialNr JEQ0109195
|
||||
attr ArbeitszimmerRebecca_Rollo subType blindActuator
|
||||
attr ArbeitszimmerRebecca_Rollo webCmd statusRequest:toggleDir:on:off:up:down:stop
|
||||
attr ArbeitszimmerRebecca_Rollo room Homekit
|
||||
|
||||
|
||||
|
||||
define Steckdose_Dimmer CUL_HM 20E8F1
|
||||
attr Steckdose_Dimmer IODev CUL_0
|
||||
attr Steckdose_Dimmer autoReadReg 4_reqStatus
|
||||
attr Steckdose_Dimmer expert 2_full
|
||||
attr Steckdose_Dimmer firmware 2.3
|
||||
attr Steckdose_Dimmer model HM-LC-Dim1T-Pl-2
|
||||
attr Steckdose_Dimmer room CUL_HM
|
||||
attr Steckdose_Dimmer serialNr KEQ0124588
|
||||
attr Steckdose_Dimmer subType dimmer
|
||||
attr Steckdose_Dimmer webCmd statusRequest:toggle:on:off:up:down
|
||||
attr Steckdose_Dimmer room Homekit
|
||||
|
||||
|
||||
|
||||
define Bad_Luefter CUL_HM 1B7501
|
||||
attr Bad_Luefter IODev CUL_0
|
||||
attr Bad_Luefter autoReadReg 4_reqStatus
|
||||
attr Bad_Luefter expert 2_full
|
||||
attr Bad_Luefter firmware 2.1
|
||||
attr Bad_Luefter model HM-LC-Sw1PBU-FM
|
||||
attr Bad_Luefter room CUL_HM
|
||||
attr Bad_Luefter serialNr JEQ0099033
|
||||
attr Bad_Luefter subType switch
|
||||
attr Bad_Luefter webCmd statusRequest:toggle:on:off
|
||||
attr Bad_Luefter room Homekit
|
||||
|
||||
|
||||
|
||||
define ArbeitszimmerMartin_Bewegungsmelder CUL_HM 2F2A4B
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder IODev CUL_0
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder actCycle 000:20
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder actStatus alive
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder autoReadReg 4_reqStatus
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder expert 2_full
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder firmware 1.6
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder model HM-SEC-MDIR-2
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder room CUL_HM
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder serialNr LEQ0797237
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder subType motionDetector
|
||||
attr ArbeitszimmerMartin_Bewegungsmelder room Homekit
|
||||
|
||||
|
||||
define ActionDetector CUL_HM 000000
|
||||
attr ActionDetector event-on-change-reading .*
|
||||
attr ActionDetector model ActionDetector
|
||||
|
||||
|
||||
attr SteckdosenSchalter IODev CUL_0
|
||||
attr SteckdosenSchalter actCycle 000:10
|
||||
attr SteckdosenSchalter actStatus alive
|
||||
attr SteckdosenSchalter autoReadReg 4_reqStatus
|
||||
attr SteckdosenSchalter expert 2_full
|
||||
attr SteckdosenSchalter firmware 1.6
|
||||
attr SteckdosenSchalter model HM-ES-PMSw1-Pl
|
||||
attr SteckdosenSchalter room CUL_HM
|
||||
attr SteckdosenSchalter serialNr LEQ1345055
|
||||
attr SteckdosenSchalter subType powerMeter
|
||||
attr SteckdosenSchalter webCmd getConfig:clear msgEvents
|
||||
define SteckdosenSchalter_Sw CUL_HM 338E7201
|
||||
attr SteckdosenSchalter_Sw model HM-ES-PMSw1-Pl
|
||||
attr SteckdosenSchalter_Sw peerIDs
|
||||
define SteckdosenSchalter_Pwr CUL_HM 338E7202
|
||||
attr SteckdosenSchalter_Pwr model HM-ES-PMSw1-Pl
|
||||
define SteckdosenSchalter_SenPwr CUL_HM 338E7203
|
||||
attr SteckdosenSchalter_SenPwr model HM-ES-PMSw1-Pl
|
||||
define SteckdosenSchalter_SenI CUL_HM 338E7204
|
||||
attr SteckdosenSchalter_SenI model HM-ES-PMSw1-Pl
|
||||
define SteckdosenSchalter_SenU CUL_HM 338E7205
|
||||
attr SteckdosenSchalter_SenU model HM-ES-PMSw1-Pl
|
||||
define SteckdosenSchalter_SenF CUL_HM 338E7206
|
||||
attr SteckdosenSchalter_SenF model HM-ES-PMSw1-Pl
|
|
@ -78,6 +78,7 @@ switch:
|
|||
- name: Pool Pumpe
|
||||
fhem_ids:
|
||||
- SteckdosenSchalter_Sw
|
||||
- SteckdosenSchalter
|
||||
|
||||
|
||||
# ------------------------------ Motion Sensors ------------------------------------
|
||||
|
@ -102,3 +103,4 @@ sensor:
|
|||
fhem_sensor_type: power
|
||||
fhem_ids:
|
||||
- SteckdosenSchalter_Pwr
|
||||
- SteckdosenSchalter
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from typing import List
|
||||
from util import DeviceInfo
|
||||
from util import DeviceInfo, name_to_id
|
||||
from util import extent as extend_general
|
||||
import functools
|
||||
|
||||
|
@ -21,7 +21,8 @@ def extent(result_dict, input_dict):
|
|||
if k not in result_dict:
|
||||
result_dict[k] = []
|
||||
for entry in v:
|
||||
entry['platform'] = 'knx'
|
||||
if 'platform' not in entry:
|
||||
entry['platform'] = 'knx'
|
||||
result_dict[k] += v
|
||||
|
||||
|
||||
|
@ -81,9 +82,18 @@ def create_power_plug(device_info: List[DeviceInfo],
|
|||
consumption = csv_contents.get(entry.csv_name + postfix_consumption, None)
|
||||
if consumption:
|
||||
result['sensor'].append({
|
||||
'name': entry.display_name + " Verbrauch",
|
||||
'name': entry.display_name + " Verbrauch mA",
|
||||
'address': consumption,
|
||||
'type': 'current',
|
||||
'type': 'DPT-9',
|
||||
})
|
||||
name = name_to_id(entry.display_name + " Verbrauch mA", 'sensor')
|
||||
result['sensor'].append({
|
||||
'platform': 'template',
|
||||
'sensors': {
|
||||
name_to_id(entry.display_name + " Verbrauch", None):
|
||||
{'friendly_name': entry.display_name + " Verbrauch",
|
||||
'unit_of_measurement': 'W',
|
||||
'value_template': f"{{{{ (states('{name}') | float / 1000 * 230) | round(1) }}}}"}}
|
||||
})
|
||||
consumption_sum = csv_contents.get(entry.csv_name + postfix_consumption_sum, None)
|
||||
if consumption_sum:
|
||||
|
@ -152,6 +162,8 @@ def create_switches(device_info: List[DeviceInfo], csv_contents,
|
|||
}
|
||||
if on_off_read_addr:
|
||||
entry['state_address'] = on_off_read_addr
|
||||
else:
|
||||
entry['state_address'] = on_off_write_addr
|
||||
result.append(entry)
|
||||
except KeyError as e:
|
||||
raise ValueError(f"Skipping switch {entry.csv_name} - Could not find CSV File entry: {e}")
|
||||
|
|
|
@ -9,6 +9,9 @@ yaml = YAML()
|
|||
|
||||
|
||||
def add_knx_devices(devices, groups):
|
||||
imported_csv = knx.import_ets5_csv_file(os.path.join(script_path, 'knx_data/export_project1.csv'))
|
||||
imported_csv.update(knx.import_ets5_csv_file(os.path.join(script_path, 'knx_data/export_project2.csv')))
|
||||
|
||||
lights = [
|
||||
# Dimmers
|
||||
DeviceInfo('Wohnzimmerlampe', 'Wohnzimmer Deckenlampe', 'living_area'),
|
||||
|
@ -56,15 +59,15 @@ def add_knx_devices(devices, groups):
|
|||
|
||||
power_plugs = [
|
||||
# Vorratsraum
|
||||
DeviceInfo("VorratsraumSteckdose1", "Vorratsraum Steckdose", 'other'),
|
||||
DeviceInfo("VorratsraumSteckdose2", "Vorratsraum Steckdose", 'other'),
|
||||
DeviceInfo("VorratsraumSteckdose1", "Vorratsraum Steckdose 1", 'other'),
|
||||
DeviceInfo("VorratsraumSteckdose2", "Vorratsraum Steckdose 2", 'other'),
|
||||
DeviceInfo("VorratsraumSteckdose3", "Gefrierschrank", 'other'),
|
||||
# Waschraum
|
||||
DeviceInfo("Trockner", "Trockner", 'other'),
|
||||
DeviceInfo("Waschmaschine", "Waschmaschine", 'other'),
|
||||
# Küche
|
||||
DeviceInfo("KücheSteckdose1", "Küche Steckdose 1"),
|
||||
DeviceInfo("KücheSteckdose2", "Küche Steckdose 2"),
|
||||
DeviceInfo("KücheSteckdose1", "Küche Steckdosen rechts"),
|
||||
DeviceInfo("KücheSteckdose2", "Dunstabzug"),
|
||||
DeviceInfo("Spülmaschine", "Spülmaschine", 'living_area'),
|
||||
DeviceInfo("Backofen", "Backofen", 'living_area'),
|
||||
DeviceInfo("HerdP1", "Herd Phase 1", 'living_area'),
|
||||
|
@ -76,9 +79,51 @@ def add_knx_devices(devices, groups):
|
|||
DeviceInfo("WohnzimmerSteckdose2", "Wohnzimmer Steckdose 2", 'living_area'),
|
||||
]
|
||||
|
||||
imported_csv = knx.import_ets5_csv_file(os.path.join(script_path, 'knx_data/export_project1.csv'))
|
||||
imported_csv.update(knx.import_ets5_csv_file(os.path.join(script_path, 'knx_data/export_project2.csv')))
|
||||
|
||||
motion_sensors = {
|
||||
'sensor': [
|
||||
# Brightness
|
||||
{'name': 'Gang Bewegungsmelder West Helligkeit',
|
||||
'address': imported_csv['BewegungsmelderWest Helligkeit'],
|
||||
'type': 'illuminance'},
|
||||
{'name': 'Gang Bewegungsmelder Mitte Helligkeit',
|
||||
'address': imported_csv['BewegungsmelderMitte Helligkeit'],
|
||||
'type': 'illuminance'},
|
||||
{'name': 'Gang Bewegungsmelder Ost Helligkeit',
|
||||
'address': imported_csv['BewegungsmelderOst Helligkeit'],
|
||||
'type': 'illuminance'},
|
||||
# Temperature
|
||||
{'name': 'Esszimmer Temperatur',
|
||||
'address': imported_csv['TemperaturEsszimmer'],
|
||||
'type': 'temperature'},
|
||||
{'name': 'Treppenhaus Oben Temperatur',
|
||||
'address': imported_csv['TreppenhausObenTemperatur'],
|
||||
'type': 'temperature'},
|
||||
{'name': 'Eingangsbereich Temperatur',
|
||||
'address': imported_csv['TemperaturGang'],
|
||||
'type': 'temperature'},
|
||||
{'name': 'Wohnzimmer Gang Temperatur',
|
||||
'address': imported_csv['TemperaturWohnzimmerGangTuer'],
|
||||
'type': 'temperature'},
|
||||
{'name': 'Wohnzimmer Terassentür Temperatur',
|
||||
'address': imported_csv['TemperaturWohnzimmerAussenTuer'],
|
||||
'type': 'temperature'},
|
||||
],
|
||||
'binary_sensor': [
|
||||
{'name': 'Gang Bewegungsmelder Schlafzimmer',
|
||||
'address': imported_csv['BewegungsmelderWest Motion Links'],
|
||||
'device_class': 'motion'},
|
||||
{'name': 'Gang Bewegungsmelder Wohnzimmer',
|
||||
'address': imported_csv['BewegungsmelderWest Motion Rechts'],
|
||||
'device_class': 'motion'},
|
||||
{'name': 'Gang Bewegungsmelder Mitte',
|
||||
'address': imported_csv['BewegungsmelderMitte Motion'],
|
||||
'device_class': 'motion'},
|
||||
{'name': 'Gang Bewegungsmelder Ost',
|
||||
'address': imported_csv['BewegungsmelderOst Motion'],
|
||||
'device_class': 'motion'},
|
||||
]
|
||||
}
|
||||
knx.extent(devices, motion_sensors)
|
||||
knx.extent(devices, knx.create_lights(lights, imported_csv))
|
||||
knx.extent(devices, knx.create_shutters(shutters, imported_csv))
|
||||
knx.extent(devices, knx.create_switches(switches, imported_csv))
|
||||
|
@ -118,6 +163,7 @@ def create_config(target_directory, development=False):
|
|||
groups_yaml_path = os.path.join(script_path, 'groups.yaml')
|
||||
manual_config_path = os.path.join(script_path, 'manual_config.yaml')
|
||||
group_dict = yaml.load(open(groups_yaml_path))
|
||||
manual_config_dict = yaml.load(open(manual_config_path))
|
||||
|
||||
all_devices = {}
|
||||
add_knx_devices(all_devices, group_dict)
|
||||
|
@ -125,7 +171,11 @@ def create_config(target_directory, development=False):
|
|||
|
||||
with open(os.path.join(target_directory, 'configuration.yaml'), 'w') as output:
|
||||
output.write("# Dont' edit manually! this is generated!\n\n")
|
||||
output.write(open(manual_config_path, 'r').read())
|
||||
for key in ['sensor', 'switch', 'light', 'cover']:
|
||||
if key in manual_config_dict:
|
||||
all_devices[key].extend(manual_config_dict[key])
|
||||
del manual_config_dict[key]
|
||||
yaml.dump(manual_config_dict, output)
|
||||
yaml.dump(all_devices, output)
|
||||
add_light_groups(group_dict)
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ owntracks:
|
|||
|
||||
|
||||
homekit:
|
||||
name: BauerHome
|
||||
name: !secret homekit_name
|
||||
filter:
|
||||
include_domains:
|
||||
- scene
|
||||
|
@ -115,6 +115,23 @@ vacuum:
|
|||
token: !secret vacuum_token
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: history_stats
|
||||
name: Pool Pumpe Heute
|
||||
entity_id: switch.pool_pumpe
|
||||
type: time
|
||||
state: 'on'
|
||||
start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
|
||||
end: '{{ now() }}'
|
||||
- platform: history_stats
|
||||
name: Pool Pumpe Gestern
|
||||
entity_id: switch.pool_pumpe
|
||||
type: time
|
||||
state: 'on'
|
||||
start: '{{ as_timestamp(now().replace(hour=0).replace(minute=0).replace(second=0)) - (60*60 * 24) }}'
|
||||
end: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
|
||||
|
||||
|
||||
group: !include groups.yaml
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
local_ip: 192.168.178.80
|
||||
knxd_host: 192.168.178.80 #directly the network bridge: 192.168.178.65
|
||||
homekit_name: BauerHome
|
|
@ -1,2 +1,3 @@
|
|||
local_ip: 192.168.178.76
|
||||
local_ip: 192.168.178.78
|
||||
knxd_host: server #directly the network bridge: 192.168.178.65
|
||||
homekit_name: BauerHomeDev
|
||||
|
|
|
@ -20,7 +20,10 @@ def extent(result_dict, input_dict, platform):
|
|||
|
||||
|
||||
def name_to_id(name, device_type):
|
||||
return "{}.{}".format(device_type, slugify.slugify(name, separator='_'))
|
||||
if device_type is None:
|
||||
return slugify.slugify(name, separator='_')
|
||||
else:
|
||||
return "{}.{}".format(device_type, slugify.slugify(name, separator='_'))
|
||||
|
||||
|
||||
def add_to_group(groups_dict, device_groups, device_name, device_type):
|
||||
|
|
46
todo
46
todo
|
@ -1,9 +1,35 @@
|
|||
- setup two-factor auth
|
||||
- setup two-factor auth [ok]
|
||||
|
||||
- make public
|
||||
- make new domain ha.bauer.tech
|
||||
- make dockerfile
|
||||
-
|
||||
- make new domain ha.bauer.tech [ok]
|
||||
- make dockerfile [ok]
|
||||
|
||||
- clean up repos & plan a deployment strategy [ok]
|
||||
- enable 2FA [ok]
|
||||
- get domain: ha.bauer.tech [ok]
|
||||
- docker setup & nginx proxy [ok]
|
||||
|
||||
|
||||
- setup pihole at kitchenpi [ok]
|
||||
- add KNX motion sensors + LEDs [ok]
|
||||
- add temperature sensors of scene buttons [ok]
|
||||
- calibrate consumption sensors [ok]
|
||||
|
||||
|
||||
- laufzeit poolpumpe pro tag / gestern / durchschnitt pro woche
|
||||
- make one sensor: last movement + which sensor
|
||||
- device tracker clean setup
|
||||
|
||||
- history and logbook filter
|
||||
- fail2ban
|
||||
|
||||
- node red:
|
||||
- derive docker image where npm packages are installed / deinstalled
|
||||
- adapt theme
|
||||
|
||||
- FHEM
|
||||
- switches: update state when switching
|
||||
- correctly detect non-availibilty e.g. when ACK failed ( test with unplugged power plug)
|
||||
|
||||
|
||||
|
||||
|
@ -18,19 +44,11 @@
|
|||
|
||||
- replace IR remote stuff from old system to new
|
||||
|
||||
- add KNX motion sensors & leds
|
||||
|
||||
- calibrate consumption sensors
|
||||
|
||||
- clean up repos & plan a deployment strategy
|
||||
- enable 2FA
|
||||
- get domain: ha.bauer.tech
|
||||
- docker setup & nginx proxy
|
||||
- fail2ban
|
||||
|
||||
Owntracks
|
||||
- try basic owntracks setup
|
||||
- tokens
|
||||
- try basic owntracks setup [ok]
|
||||
- tokens [ok]
|
||||
- bluetooth scanning
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue