Device definitions and intialisation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. from devdi import props
  5. from devices import group
  6. import logging
  7. import sys
  8. try:
  9. from config import APP_NAME as ROOT_LOGGER_NAME
  10. except ImportError:
  11. ROOT_LOGGER_NAME = 'root'
  12. logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
  13. class base(dict):
  14. def __init__(self, mqtt_client):
  15. super().__init__(self)
  16. def add(self, mqtt_client, stg, loc, roo, fun, dty, num=None, ot=None):
  17. """Method to initilise a device
  18. Args:
  19. stg (numeric): Source transmittion group (see SIS_* in props)
  20. loc (numeric): Location (see LOC_* in props)
  21. roo (numeric): Room (see ROO_* in props)
  22. fun (numeric): Function (see FUN_* in props)
  23. dty (numeric): Device type (see DTP_* in props)
  24. num (numeric): Device number in case of multiple devices
  25. """
  26. def get_device(dty, mqtt_client, topic, ot):
  27. # Temporary to fit to current implementation
  28. if ot != topic:
  29. logger.error("Topic change for %s: Using this one: %s", topic, ot)
  30. topic = ot
  31. dev_class = props.dty_repr(dty)
  32. if dev_class is None:
  33. logger.warning('Device type %d is not yet implemented. Topic %s will not be supported.', dty, topic)
  34. else:
  35. return dev_class(mqtt_client, topic)
  36. topic = self.__topic__(stg, loc, roo, fun)
  37. if num is None:
  38. this_device = get_device(dty, mqtt_client, topic, ot)
  39. if this_device is None:
  40. logger.warning('Device type %d is not yet implemented. Topic %s will not be supported.', dty, topic)
  41. else:
  42. self[topic] = this_device
  43. else:
  44. dg = []
  45. for i in num:
  46. device_topic = self.__topic__(stg, loc, roo, fun) + '_%d' % i
  47. dg.append(get_device(dty, mqtt_client, device_topic, ot=ot % i))
  48. self[topic] = group(*dg)
  49. def get(self, stg, loc, roo, fun):
  50. """Method to get a device
  51. Args:
  52. stg (numeric): Source transmittion group (see SIS_* in props)
  53. loc (numeric): Location (see LOC_* in props)
  54. roo (numeric): Room (see ROO_* in props)
  55. fun (numeric): Function (see FUN_* in props)
  56. num (numeric): Device number in case of multiple devices
  57. """
  58. topic = self.__topic__(stg, loc, roo, fun)
  59. return self[topic]
  60. def __topic__(self, stg, loc, roo, fun):
  61. if stg in [props.STG_ZFE, props.STG_ZFW, props.STG_ZGW]:
  62. # Temporary to fit to current implementation
  63. return '/'.join([
  64. props.stg_repr(stg),
  65. props.roo_repr(roo),
  66. props.fun_repr(fun)
  67. ])
  68. else:
  69. return '/'.join([
  70. props.stg_repr(stg),
  71. props.loc_repr(loc),
  72. props.roo_repr(roo),
  73. props.fun_repr(fun)
  74. ])
  75. class physical_devices(base):
  76. """
  77. Class to create and store physical smarthome devices
  78. """
  79. def __init__(self, mqtt_client):
  80. super().__init__(self)
  81. self.__init_gfw__(mqtt_client)
  82. self.__init_ffw__(mqtt_client)
  83. self.__init_ffe__(mqtt_client)
  84. self.__init_stw__(mqtt_client)
  85. def __init_gfw__(self, mqtt_client):
  86. loc = props.LOC_GFW
  87. # MARION
  88. roo = props.ROO_MAR
  89. #
  90. # Temporary to fit to current implementation ###################################################
  91. TOPIC_GFW_MARION_MAIN_LIGHT_SHELLY = "shellies/gfw/marion/main_light"
  92. TOPIC_GFW_MARION_HEATING_VALVE_ZIGBEE = "zigbee/gfw/marion/heating_valve"
  93. # Temporary to fit to current implementation ###################################################
  94. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  95. ot=TOPIC_GFW_MARION_MAIN_LIGHT_SHELLY) # Shelly Main Light
  96. self.add(mqtt_client, props.STG_ZGW, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  97. ot=TOPIC_GFW_MARION_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  98. # FLOOR
  99. roo = props.ROO_FLO
  100. #
  101. # Temporary to fit to current implementation ###################################################
  102. TOPIC_GFW_FLOOR_MAIN_LIGHT_SHELLY = "shellies/gfw/floor/main_light"
  103. TOPIC_GFW_FLOOR_MAIN_LIGHT_ZIGBEE = "zigbee/gfw/floor/main_light_%d"
  104. # Temporary to fit to current implementation ###################################################
  105. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  106. ot=TOPIC_GFW_FLOOR_MAIN_LIGHT_SHELLY) # Shelly Main Light
  107. self.add(mqtt_client, props.STG_ZGW, loc, roo, props.FUN_MAL, props.DTY_LLI_SBT,
  108. range(1, 3), ot=TOPIC_GFW_FLOOR_MAIN_LIGHT_ZIGBEE) # Tradfri Main Light
  109. # DIRK
  110. roo = props.ROO_DIR
  111. #
  112. # Temporary to fit to current implementation ###################################################
  113. TOPIC_GFW_DIRK_MAIN_LIGHT_SHELLY = "shellies/gfw/dirk/main_light"
  114. TOPIC_GFW_DIRK_MAIN_LIGHT_ZIGBEE = "zigbee/gfw/dirk/main_light"
  115. TOPIC_GFW_DIRK_INPUT_DEVICE = "zigbee/gfw/dirk/input_device"
  116. TOPIC_GFW_DIRK_POWERPLUG = "my_apps/gfw/dirk/powerplug"
  117. TOPIC_GFW_DIRK_DESK_LIGHT_ZIGBEE = "zigbee/gfw/dirk/desk_light"
  118. TOPIC_GFW_DIRK_AMPLIFIER_REMOTE = "my_apps/gfw/dirk/remote/RAS5"
  119. TOPIC_GFW_DIRK_SPOTIFY = "my_apps/gfw/dirk/hifi/spotify"
  120. TOPIC_GFW_DIRK_MPD = "my_apps/gfw/dirk/hifi/mpd"
  121. TOPIC_GFW_DIRK_HEATING_VALVE_ZIGBEE = "zigbee/gfw/dirk/heating_valve"
  122. # Temporary to fit to current implementation ###################################################
  123. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  124. ot=TOPIC_GFW_DIRK_MAIN_LIGHT_SHELLY) # Shelly Main Light
  125. self.add(mqtt_client, props.STG_ZGW, loc, roo, props.FUN_MAL, props.DTY_TLI_SBT,
  126. ot=TOPIC_GFW_DIRK_MAIN_LIGHT_ZIGBEE) # Tradfri Main Light
  127. self.add(mqtt_client, props.STG_ZGW, loc, roo, props.FUN_INP, props.DTY_TIN_5xx,
  128. ot=TOPIC_GFW_DIRK_INPUT_DEVICE) # Tradfri Input Device 5 Buttons
  129. self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_MPP, props.DTY_MPP_4xx, ot=TOPIC_GFW_DIRK_POWERPLUG) # My 4 port Powerplug
  130. self.add(mqtt_client, props.STG_ZGW, loc, roo, props.FUN_DEL, props.DTY_TLI_SBT, ot=TOPIC_GFW_DIRK_DESK_LIGHT_ZIGBEE), # Tradfri Desklight
  131. self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_RCA, props.DTY_MRE_xxx,
  132. ot=TOPIC_GFW_DIRK_AMPLIFIER_REMOTE) # Remote Control IR Amplifier
  133. self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_ASS, props.DTY_MAS_xxx, ot=TOPIC_GFW_DIRK_SPOTIFY) # Audio status Spotify
  134. self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_ASM, props.DTY_MAS_xxx, ot=TOPIC_GFW_DIRK_MPD) # Audio status MPD
  135. self.add(mqtt_client, props.STG_ZGW, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  136. ot=TOPIC_GFW_DIRK_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  137. def __init_ffw__(self, mqtt_client):
  138. loc = props.LOC_FFW
  139. # JULIAN
  140. roo = props.ROO_JUL
  141. #
  142. # Temporary to fit to current implementation ###################################################
  143. TOPIC_FFW_JULIAN_MAIN_LIGHT_SHELLY = "shellies/ffw/julian/main_light"
  144. TOPIC_FFW_JULIAN_MAIN_LIGHT_ZIGBEE = "zigbee/ffw/julian/main_light"
  145. TOPIC_FFW_JULIAN_HEATING_VALVE_ZIGBEE = "zigbee/ffw/julian/heating_valve"
  146. # Temporary to fit to current implementation ###################################################
  147. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  148. ot=TOPIC_FFW_JULIAN_MAIN_LIGHT_SHELLY) # Shelly Main Light
  149. self.add(mqtt_client, props.STG_ZFW, loc, roo, props.FUN_MAL, props.DTY_TLI_SBT,
  150. ot=TOPIC_FFW_JULIAN_MAIN_LIGHT_ZIGBEE) # Tradfri Main Light
  151. self.add(mqtt_client, props.STG_ZFW, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  152. ot=TOPIC_FFW_JULIAN_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  153. # BATH
  154. roo = props.ROO_BAT
  155. #
  156. # Temporary to fit to current implementation
  157. # Temporary to fit to current implementation ###################################################
  158. TOPIC_FFW_BATH_HEATING_VALVE_ZIGBEE = "zigbee/ffw/bath/heating_valve"
  159. # Temporary to fit to current implementation ###################################################
  160. self.add(mqtt_client, props.STG_ZFW, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  161. ot=TOPIC_FFW_BATH_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  162. # LIVINGROOM
  163. roo = props.ROO_LIV
  164. #
  165. # Temporary to fit to current implementation ###################################################
  166. TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_SHELLY = "shellies/ffw/livingroom/main_light"
  167. TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_ZIGBEE = "zigbee/ffw/livingroom/main_light"
  168. # Temporary to fit to current implementation ###################################################
  169. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  170. ot=TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_SHELLY) # Shelly Main Light
  171. self.add(mqtt_client, props.STG_ZFW, loc, roo, props.FUN_MAL, props.DTY_TLI_SBT,
  172. ot=TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_ZIGBEE) # Tradfri Main Light
  173. # SLEEP
  174. roo = props.ROO_SLP
  175. #
  176. # Temporary to fit to current implementation ###################################################
  177. TOPIC_FFW_SLEEP_MAIN_LIGHT_SHELLY = "shellies/ffw/sleep/main_light"
  178. TOPIC_FFW_SLEEP_MAIN_LIGHT_ZIGBEE = "zigbee/ffw/sleep/main_light"
  179. TOPIC_FFW_SLEEP_HEATING_VALVE_ZIGBEE = "zigbee/ffw/sleep/heating_valve"
  180. # Temporary to fit to current implementation ###################################################
  181. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  182. ot=TOPIC_FFW_SLEEP_MAIN_LIGHT_SHELLY) # Shelly Main Light
  183. self.add(mqtt_client, props.STG_ZFW, loc, roo, props.FUN_MAL, props.DTY_TLI_SBx,
  184. ot=TOPIC_FFW_SLEEP_MAIN_LIGHT_ZIGBEE) # Tradfri Main Light
  185. self.add(mqtt_client, props.STG_ZFW, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  186. ot=TOPIC_FFW_SLEEP_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  187. def __init_ffe__(self, mqtt_client):
  188. loc = props.LOC_FFE
  189. # FLOOR
  190. roo = props.ROO_FLO
  191. #
  192. # Temporary to fit to current implementation ###################################################
  193. TOPIC_FFE_FLOOR_MAIN_LIGHT_SHELLY = "shellies/ffe/floor/main_light"
  194. # Temporary to fit to current implementation ###################################################
  195. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  196. ot=TOPIC_FFE_FLOOR_MAIN_LIGHT_SHELLY) # Shelly Main Light
  197. # KITCHEN
  198. roo = props.ROO_KIT
  199. #
  200. # Temporary to fit to current implementation ###################################################
  201. TOPIC_FFE_KITCHEN_MAIN_LIGHT_SHELLY = "shellies/ffe/kitchen/main_light"
  202. TOPIC_FFE_KITCHEN_CIRCULATION_PUMP_SHELLY = "shellies/ffe/kitchen/circulation_pump"
  203. TOPIC_FFE_KITCHEN_HEATING_VALVE_ZIGBEE = "zigbee/ffe/kitchen/heating_valve"
  204. # Temporary to fit to current implementation ###################################################
  205. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  206. ot=TOPIC_FFE_KITCHEN_MAIN_LIGHT_SHELLY) # Shelly Main Light
  207. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_CIR, props.DTY_SHY_SW1,
  208. ot=TOPIC_FFE_KITCHEN_CIRCULATION_PUMP_SHELLY) # Shelly Main Light
  209. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  210. ot=TOPIC_FFE_KITCHEN_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  211. # DININGROOM
  212. roo = props.ROO_DIN
  213. #
  214. # Temporary to fit to current implementation ###################################################
  215. TOPIC_FFE_DININGROOM_MAIN_LIGHT_SHELLY = "shellies/ffe/diningroom/main_light"
  216. TOPIC_FFE_DININGROOM_FLOOR_LAMP_POWERPLUG = "zigbee/ffe/diningroom/powerplug_floorlamp"
  217. TOPIC_FFE_DININGROOM_GARLAND_POWERPLUG = "zigbee/ffe/diningroom/garland"
  218. TOPIC_FFE_DININGROOM_HEATING_VALVE_ZIGBEE = "zigbee/ffe/diningroom/heating_valve"
  219. # Temporary to fit to current implementation ###################################################
  220. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  221. ot=TOPIC_FFE_DININGROOM_MAIN_LIGHT_SHELLY) # Shelly Main Light
  222. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_FLL, props.DTY_SPP_SW1,
  223. ot=TOPIC_FFE_DININGROOM_FLOOR_LAMP_POWERPLUG) # Powerplug Floor Light
  224. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_GAR, props.DTY_SPP_SW1,
  225. ot=TOPIC_FFE_DININGROOM_GARLAND_POWERPLUG) # Powerplug Garland
  226. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  227. ot=TOPIC_FFE_DININGROOM_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  228. # SLEEP
  229. roo = props.ROO_SLP
  230. #
  231. # Temporary to fit to current implementation ###################################################
  232. TOPIC_FFE_SLEEP_MAIN_LIGHT_SHELLY = "shellies/ffe/sleep/main_light"
  233. TOPIC_FFE_SLEEP_MAIN_LIGHT_ZIGBEE = "zigbee/ffe/sleep/main_light"
  234. TOPIC_FFE_SLEEP_INPUT_DEVICE = "zigbee/ffe/sleep/input_device"
  235. TOPIC_FFE_SLEEP_BED_LIGHT_DI_ZIGBEE = "zigbee/ffe/sleep/bed_light_di"
  236. TOPIC_FFE_SLEEP_BED_LIGHT_MA_POWERPLUG = "zigbee/ffe/sleep/bed_light_ma"
  237. TOPIC_FFE_SLEEP_HEATING_VALVE_ZIGBEE = "zigbee/ffe/sleep/heating_valve"
  238. # Temporary to fit to current implementation ###################################################
  239. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  240. ot=TOPIC_FFE_SLEEP_MAIN_LIGHT_SHELLY) # Shelly Main Light
  241. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_MAL, props.DTY_TLI_SBT,
  242. ot=TOPIC_FFE_SLEEP_MAIN_LIGHT_ZIGBEE) # Tradfri Main Light
  243. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_INP, props.DTY_TIN_5xx,
  244. ot=TOPIC_FFE_SLEEP_INPUT_DEVICE) # Tradfri Input Device 5 Buttons
  245. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_BLD, props.DTY_TLI_SBx,
  246. ot=TOPIC_FFE_SLEEP_BED_LIGHT_DI_ZIGBEE) # Tradfri Bed Light Dirk
  247. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_BLM, props.DTY_SPP_SW1,
  248. ot=TOPIC_FFE_SLEEP_BED_LIGHT_MA_POWERPLUG) # Powerplug Bed Light Marion
  249. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  250. ot=TOPIC_FFE_SLEEP_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  251. # LIVINGROOM
  252. roo = props.ROO_LIV
  253. #
  254. # Temporary to fit to current implementation ###################################################
  255. TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_SHELLY = "shellies/ffe/livingroom/main_light"
  256. TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_ZIGBEE = "zigbee/ffe/livingroom/main_light"
  257. TOPIC_FFE_LIVINGROOM_FLOOR_LAMP_ZIGBEE = "zigbee/ffe/livingroom/floorlamp_%d"
  258. TOPIC_FFE_LIVINGROOM_XMAS_TREE_POWERPLUG = "zigbee/ffe/livingroom/powerplug_xmas-tree"
  259. TOPIC_FFE_LIVINGROOM_XMAS_STAR_POWERPLUG = "zigbee/ffe/livingroom/powerplug_xmas-star"
  260. TOPIC_FFE_LIVINGROOM_HEATING_VALVE_ZIGBEE = "zigbee/ffe/livingroom/heating_valve"
  261. # Temporary to fit to current implementation ###################################################
  262. self.add(mqtt_client, props.STG_SHE, loc, roo, props.FUN_MAL, props.DTY_SHY_SW1,
  263. ot=TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_SHELLY) # Shelly Main Light
  264. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_MAL, props.DTY_TLI_SBT,
  265. ot=TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_ZIGBEE) # Tradfri Main Light
  266. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_FLL, props.DTY_TLI_SBT,
  267. range(1, 7), ot=TOPIC_FFE_LIVINGROOM_FLOOR_LAMP_ZIGBEE) # Tradfri Main Light
  268. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_XTR, props.DTY_SPP_SW1,
  269. ot=TOPIC_FFE_LIVINGROOM_XMAS_TREE_POWERPLUG) # Tradfri Main Light
  270. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_XST, props.DTY_SPP_SW1,
  271. ot=TOPIC_FFE_LIVINGROOM_XMAS_STAR_POWERPLUG) # Tradfri Main Light
  272. self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx,
  273. ot=TOPIC_FFE_LIVINGROOM_HEATING_VALVE_ZIGBEE) # Brennenstuhl Heatingvalve
  274. def __init_stw__(self, mqtt_client):
  275. loc = props.LOC_STW
  276. # FLOOR
  277. #
  278. # Temporary to fit to current implementation ###################################################
  279. TOPIC_STW_STAIRWAY_MAIN_LIGHT_SHELLY = "shellies/stw/stairway/main_light"
  280. TOPIC_STW_STAIRWAY_MAIN_LIGHT_MOTION_SENSOR_FF = "zigbee/ffe/stairway/motion_sensor_ff"
  281. TOPIC_STW_STAIRWAY_MAIN_LIGHT_MOTION_SENSOR_GF = "zigbee/gfw/stairway/motion_sensor_gf"
  282. # Temporary to fit to current implementation ###################################################
  283. self.add(mqtt_client, props.STG_SHE, loc, props.ROO_STF, props.FUN_MAL, props.DTY_SHY_SW1,
  284. ot=TOPIC_STW_STAIRWAY_MAIN_LIGHT_SHELLY) # Shelly Main Light
  285. self.add(mqtt_client, props.STG_ZFE, loc, props.ROO_STF, props.FUN_MSE, props.DTY_SMS_xxx,
  286. ot=TOPIC_STW_STAIRWAY_MAIN_LIGHT_MOTION_SENSOR_FF) # Motion Sensor First Floor
  287. self.add(mqtt_client, props.STG_ZGW, loc, props.ROO_STG, props.FUN_MSE, props.DTY_SMS_xxx,
  288. ot=TOPIC_STW_STAIRWAY_MAIN_LIGHT_MOTION_SENSOR_GF) # Motion Sensor Ground Floor
  289. class videv_devices(base):
  290. """
  291. Class to create and store videv smarthome devices
  292. """
  293. def __init__(self, mqtt_client):
  294. super().__init__(self)
  295. self.__init_gfw__(mqtt_client)
  296. self.__init_ffw__(mqtt_client)
  297. self.__init_ffe__(mqtt_client)
  298. self.__init_stw__(mqtt_client)
  299. def __init_gfw__(self, mqtt_client):
  300. loc = props.LOC_GFW
  301. # TODO: Add devices
  302. def __init_ffw__(self, mqtt_client):
  303. loc = props.LOC_FFW
  304. # TODO: Add devices
  305. def __init_ffe__(self, mqtt_client):
  306. loc = props.LOC_FFE
  307. # TODO: Add devices
  308. def __init_stw__(self, mqtt_client):
  309. loc = props.LOC_STW
  310. # TODO: Add devices