def check_and_resume_configuration(): configuration = ConfigurationStore().get() device_status = configuration.get_device_status() system_platform = platform.system() Logger.info(LOCATION, "Detected Platform System: " + system_platform) if device_status is DeviceStatus.ACTIVE: Logger.info(LOCATION, "Device is already active, no need to further configure") Logger.info(LOCATION, "Server is waiting for requests to serve...") Logger.info( LOCATION, "Supported Endpoints: /qrcode /actions /pairing /activate" ) elif device_status is DeviceStatus.PAIRED: Logger.info(LOCATION, "Device state is PAIRED, resuming the configuration") ConfigurationService().resume_configuration() elif device_status is DeviceStatus.MULTIPAIR and PairingService().pair(): Logger.info( LOCATION, "Device is paired as MULTIPAIR, Server is waiting for requests to serve..." ) else: Logger.info( LOCATION, "Pair the device either using QRCode or Bluetooth Service through FINN Mobile App" ) if system_platform != 'Darwin' and configuration.is_bluetooth_enabled( ): from bot_python_sdk.bluetooth_service import BluetoothService # Handle BLE specific events and callbacks BluetoothService().initialize() ConfigurationService().resume_configuration()
def __init__(self): Characteristic.__init__(self, { 'uuid': BLENO_DEVICE_CHARACTERISTICS_UUID, 'properties': ['read'], }) # define/create a store for data bytes self.deviceData = bytearray() self.configuration_store = ConfigurationStore()
def __init__(self): Characteristic.__init__(self, { 'uuid': 'CAD1B5132DA446099908234C6D1B2A9C', 'properties': ['read'], }) # define/create a store for data bytes self.byteData = bytearray() self.configuration_store = ConfigurationStore()
def __init__(self): self.configuration = ConfigurationStore().get()
def __init__(self): self.configuration_store = ConfigurationStore() self.configuration = self.configuration_store.get() self.key_generator = KeyGenerator()
def __init__(self): configuration = ConfigurationStore().get() self.maker_id = configuration.get_maker_id() self.device_id = configuration.get_device_id() self.device_status = configuration.get_device_status() self.bot_service = BoTService()
def __init__(self): self.configuration_store = ConfigurationStore()
def __init__(self): self.action_service = ActionService() self.configuration_store = ConfigurationStore()
def __init__(self): self.configuration = ConfigurationStore().get() self.bot_service = BoTService() self.key_generator = KeyGenerator() self.store = Store()