Browse Source

Added wifi garden and wardrobe light sleep ffe

master
Dirk Alders 3 months ago
parent
commit
248e9432d1
6 changed files with 23 additions and 4 deletions
  1. 1
    1
      .vscode/launch.json
  2. 1
    1
      devdi
  3. 1
    0
      devices/__init__.py
  4. 7
    0
      function/first_floor_east.py
  5. 9
    0
      function/garden.py
  6. 4
    2
      topics.py

+ 1
- 1
.vscode/launch.json View File

6
     "configurations": [
6
     "configurations": [
7
         {
7
         {
8
             "name": "Python: Main File execution",
8
             "name": "Python: Main File execution",
9
-            "type": "python",
9
+            "type": "debugpy",
10
             "request": "launch",
10
             "request": "launch",
11
             "program": "${workspaceFolder}/smart_brain.py",
11
             "program": "${workspaceFolder}/smart_brain.py",
12
             "console": "integratedTerminal",
12
             "console": "integratedTerminal",

+ 1
- 1
devdi

1
-Subproject commit 1b8ad26f21c138580764a0f6355afeb2663d2a1f
1
+Subproject commit 66a471979d41bb6477b676dddd3f5959ba0326cc

+ 1
- 0
devices/__init__.py View File

43
 from devices.mydevices import powerplug as my_powerplug
43
 from devices.mydevices import powerplug as my_powerplug
44
 from devices.mydevices import audio_status
44
 from devices.mydevices import audio_status
45
 from devices.mydevices import remote
45
 from devices.mydevices import remote
46
+my_ambient = None
46
 
47
 
47
 
48
 
48
 class group(object):
49
 class group(object):

+ 7
- 0
function/first_floor_east.py View File

191
         self.heating_valve = pd.get(props.STG_ZFE, loc, roo, props.FUN_HEA)
191
         self.heating_valve = pd.get(props.STG_ZFE, loc, roo, props.FUN_HEA)
192
         # button
192
         # button
193
         self.button_tradfri = pd.get(props.STG_ZFE, loc, roo, props.FUN_INP)
193
         self.button_tradfri = pd.get(props.STG_ZFE, loc, roo, props.FUN_INP)
194
+        # wardrobe light
195
+        self.wardrobe_light = pd.get(props.STG_ZFE, loc, roo, props.FUN_WLI)
194
 
196
 
195
         super().__init__(mqtt_client, pd, vd)
197
         super().__init__(mqtt_client, pd, vd)
196
 
198
 
248
             mqtt_client, config.TOPIC_FFE_SLEEP_ACTIVE_BRIGHTNESS_DEVICE_VIDEV,
250
             mqtt_client, config.TOPIC_FFE_SLEEP_ACTIVE_BRIGHTNESS_DEVICE_VIDEV,
249
             brightness_choose_n_action.KEY_ACTIVE_DEVICE, self.brightness_functions, 2
251
             brightness_choose_n_action.KEY_ACTIVE_DEVICE, self.brightness_functions, 2
250
         )
252
         )
253
+        self.wardrobe_light_videv = videv_switch_brightness(
254
+            mqtt_client, config.TOPIC_FFE_SLEEP_WARDROBE_LIGHT_VIDEV,
255
+            self.wardrobe_light, self.wardrobe_light.KEY_OUTPUT_0,
256
+            self.wardrobe_light, self.wardrobe_light.KEY_BRIGHTNESS,
257
+        )
251
 
258
 
252
 
259
 
253
 class first_floor_east_living(room):
260
 class first_floor_east_living(room):

+ 9
- 0
function/garden.py View File

32
         #
32
         #
33
         self.day_events = day_event((6, 0), (22, 0), 30, -30)
33
         self.day_events = day_event((6, 0), (22, 0), 30, -30)
34
 
34
 
35
+        # garden powerplugs
35
         self.garland_powerplug = pd.get(props.STG_ZGW, loc, roo, props.FUN_GAR)
36
         self.garland_powerplug = pd.get(props.STG_ZGW, loc, roo, props.FUN_GAR)
37
+        # repeater
38
+        self.repeater = pd.get(props.STG_ZGW, loc, roo, props.FUN_REP)
39
+
36
         super().__init__(mqtt_client, pd, vd)
40
         super().__init__(mqtt_client, pd, vd)
37
 
41
 
38
         #
42
         #
52
             mqtt_client, config.TOPIC_GAR_GARDEN_GARLAND_VIDEV,
56
             mqtt_client, config.TOPIC_GAR_GARDEN_GARLAND_VIDEV,
53
             self.garland_powerplug, self.garland_powerplug.KEY_OUTPUT_0
57
             self.garland_powerplug, self.garland_powerplug.KEY_OUTPUT_0
54
         )
58
         )
59
+        # repeater
60
+        self.repeater_videv = videv_switching(
61
+            mqtt_client, config.TOPIC_GAR_GARDEN_REPEATER_VIDEV,
62
+            self.repeater, self.repeater.KEY_OUTPUT_0
63
+        )
55
 
64
 
56
     def __day_events__(self, device, key, data):
65
     def __day_events__(self, device, key, data):
57
         if self.mode_videv.get(self.mode_videv.KEY_STATE):
66
         if self.mode_videv.get(self.mode_videv.KEY_STATE):

+ 4
- 2
topics.py View File

25
 TOPIC_GFW_DIRK_HEATING_VALVE_VIDEV = "videv/gfw/dirk/heating_valve"
25
 TOPIC_GFW_DIRK_HEATING_VALVE_VIDEV = "videv/gfw/dirk/heating_valve"
26
 
26
 
27
 # garden
27
 # garden
28
-TOPIC_GAR_GARDEN_MODE_VIDEV = 'videv/gar/garden/mode'
29
-TOPIC_GAR_GARDEN_GARLAND_VIDEV = 'videv/gar/garden/garland'
28
+TOPIC_GAR_GARDEN_MODE_VIDEV = "videv/gar/garden/mode"
29
+TOPIC_GAR_GARDEN_GARLAND_VIDEV = "videv/gar/garden/garland"
30
+TOPIC_GAR_GARDEN_REPEATER_VIDEV = "videv/gar/garden/repeater"
30
 
31
 
31
 # first floor west
32
 # first floor west
32
 # julian
33
 # julian
66
 TOPIC_FFE_SLEEP_BED_LIGHT_MA_VIDEV = "videv/ffe/sleep/bed_light_ma"
67
 TOPIC_FFE_SLEEP_BED_LIGHT_MA_VIDEV = "videv/ffe/sleep/bed_light_ma"
67
 TOPIC_FFE_SLEEP_ACTIVE_BRIGHTNESS_DEVICE_VIDEV = "videv/ffe/sleep/active_brightness_device"
68
 TOPIC_FFE_SLEEP_ACTIVE_BRIGHTNESS_DEVICE_VIDEV = "videv/ffe/sleep/active_brightness_device"
68
 TOPIC_FFE_SLEEP_HEATING_VALVE_VIDEV = "videv/ffe/sleep/heating_valve"
69
 TOPIC_FFE_SLEEP_HEATING_VALVE_VIDEV = "videv/ffe/sleep/heating_valve"
70
+TOPIC_FFE_SLEEP_WARDROBE_LIGHT_VIDEV = "videv/ffe/sleep/wardrobe_light"
69
 
71
 
70
 # livingroom
72
 # livingroom
71
 TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_VIDEV = "videv/ffe/livingroom/main_light"
73
 TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_VIDEV = "videv/ffe/livingroom/main_light"

Loading…
Cancel
Save