示例#1
0
    def __init__(self):
        GroupController.__INSTANCE = self

        self.__db = Database.instance()
        self.__lock = threading.Lock()
        self.__lock___group_icon_change = threading.Lock()
        self.__group_icon_change_callbacks = set([])
        
        ControllerModule.ON_SHARED_METHOD_GROUP_UPDATED = self.__on_shared_method_group_updated
        ControllerModule.ON_SHARED_METHOD_GROUP_DELETED = self.__on_shared_method_group_deleted
示例#2
0
    def __init__(self):
        GroupController.__INSTANCE = self

        self.__db = Database.instance()
        self.__lock = threading.Lock()
        self.__lock___group_icon_change = threading.Lock()
        self.__group_icon_change_callbacks = set([])

        ControllerModule.ON_SHARED_METHOD_GROUP_UPDATED = self.__on_shared_method_group_updated
        ControllerModule.ON_SHARED_METHOD_GROUP_DELETED = self.__on_shared_method_group_deleted
示例#3
0
 def __init__(self):
     MethodController.__INSTANCE = self
     
     self.__db = Database.instance()
     self.__groupController = GroupController.instance()
     self.__eventController = EventController.instance()
     self.__lock___add = threading.Lock()
     self.__lock___method_status_change = threading.Lock()
     self.__method_status_change_callbacks = set([])
     
     ControllerModule.ON_SHARED_METHOD_UPDATED = self.__on_shared_method_updated
     ControllerModule.ON_SHARED_METHOD_DELETED = self.__on_shared_method_deleted
     
     Database.KBX_METHOD_AFTER_DELETE = self.__on_kbx_method_deleted
示例#4
0
    def __init__(self):
        MethodController.__INSTANCE = self

        self.__db = Database.instance()
        self.__groupController = GroupController.instance()
        self.__eventController = EventController.instance()
        self.__lock___add = threading.Lock()
        self.__lock___method_status_change = threading.Lock()
        self.__method_status_change_callbacks = set([])

        ControllerModule.ON_SHARED_METHOD_UPDATED = self.__on_shared_method_updated
        ControllerModule.ON_SHARED_METHOD_DELETED = self.__on_shared_method_deleted

        Database.KBX_METHOD_AFTER_DELETE = self.__on_kbx_method_deleted
示例#5
0
    def on_start(self):
        Logger.log_info("on_start begins...")
        
        AppInfo.JSON_ENCODER_CLS = AutomationJSONEncoder
        
        Database.instance().initialize()
        
        self.register_module(DebugModule("debug_module", None))
        Logger.log_info("registered module: debug_module")
        
        self.register_module(ControllerModule("controller_module", None))
        Logger.log_info("registered module: debug_module")
        self.register_module(TimerModule("timer_module", None))
        Logger.log_info("registered module: debug_module")

        self.register_module(DeviceManagerModule("device_manager", None))
        Logger.log_info("registered module: debug_module")
        self.register_module(ZWaveModule("zwave_module", None))
        Logger.log_info("registered module: zwave_module")
        
        self.register_module(LocationManagerModule("location_manager", None))
        Logger.log_info("registered module: location_manager")
        
        Logger.log_info("on_start ends...")
示例#6
0
    def on_start(self):
        Logger.log_info("on_start begins...")

        AppInfo.JSON_ENCODER_CLS = AutomationJSONEncoder

        Database.instance().initialize()

        self.register_module(DebugModule("debug_module", None))
        Logger.log_info("registered module: debug_module")

        self.register_module(ControllerModule("controller_module", None))
        Logger.log_info("registered module: debug_module")
        self.register_module(TimerModule("timer_module", None))
        Logger.log_info("registered module: debug_module")

        self.register_module(DeviceManagerModule("device_manager", None))
        Logger.log_info("registered module: debug_module")
        self.register_module(ZWaveModule("zwave_module", None))
        Logger.log_info("registered module: zwave_module")

        self.register_module(LocationManagerModule("location_manager", None))
        Logger.log_info("registered module: location_manager")

        Logger.log_info("on_start ends...")
示例#7
0
 def __init__(self):
     self.__db = Database.instance()
示例#8
0
 def __init__(self):
     self.__db = Database.instance()
     SceneController.__INSTANCE = self
示例#9
0
 def __init__(self):
     self.__db = Database.instance()
     self.__groupController = GroupController.instance()
     self.__eventController = EventController.instance()
     self.__triggerController = TriggerController.instance()
     self.__methodController = MethodController.instance()
示例#10
0
 def __init__(self):
     self.__db = Database.instance()
示例#11
0
 def __init__(self):
     self.__db = Database.instance()
     SceneController.__INSTANCE = self
示例#12
0
 def __init__(self):
     self.__db = Database.instance()
     self.__groupController = GroupController.instance()
     self.__eventController = EventController.instance()
     self.__triggerController = TriggerController.instance()
     self.__methodController = MethodController.instance()