def get_status(pairedDeviceId, language=AppInfo.DEFAULT_API_LANGUAGE):
     return SharedMethod.call(kbxMethodAppId=SharedMethod.get_system_id(),
                              kbxMethodName="get_status",
                              kbxModuleName="device_manager.horn_controller",
                              pyapi=SharedMethod.get_pyapi(),
                              pairedDeviceId=pairedDeviceId,
                              **{AppInfo.REQUEST_KEY_LANGUAGE:language})
 def get_status(pairedDeviceId, language=AppInfo.DEFAULT_API_LANGUAGE):
     return SharedMethod.call(
         kbxMethodAppId=SharedMethod.get_system_id(),
         kbxMethodName="get_status",
         kbxModuleName="device_manager.horn_controller",
         pyapi=SharedMethod.get_pyapi(),
         pairedDeviceId=pairedDeviceId,
         **{AppInfo.REQUEST_KEY_LANGUAGE: language})
 def set_off(pairedDeviceId, language=AppInfo.DEFAULT_API_LANGUAGE):
     '''
     Turn off switch.
     pairedDeviceId:Number :- Paired Device ID return from DeviceManagerService.get_paired_device_list
     transitionTime:Number :- Optional. the duration of the transition from the light's current state to the new state.
     '''
     return SharedMethod.call(kbxMethodAppId=SharedMethod.get_system_id(),
                              kbxMethodName="set_off",
                              kbxModuleName="device_manager.horn_controller",
                              pyapi=SharedMethod.get_pyapi(),
                              pairedDeviceId=pairedDeviceId,
                              **{AppInfo.REQUEST_KEY_LANGUAGE:language})
 def set_off(pairedDeviceId, language=AppInfo.DEFAULT_API_LANGUAGE):
     '''
     Turn off switch.
     pairedDeviceId:Number :- Paired Device ID return from DeviceManagerService.get_paired_device_list
     transitionTime:Number :- Optional. the duration of the transition from the light's current state to the new state.
     '''
     return SharedMethod.call(
         kbxMethodAppId=SharedMethod.get_system_id(),
         kbxMethodName="set_off",
         kbxModuleName="device_manager.horn_controller",
         pyapi=SharedMethod.get_pyapi(),
         pairedDeviceId=pairedDeviceId,
         **{AppInfo.REQUEST_KEY_LANGUAGE: language})
Exemple #5
0
 def get_pyapi(self, request):
     pyapi = SharedMethod.get_pyapi()
     returnData = {}
     returnData["pyapi"] = pyapi
     self.send_response(returnData, request.requestId)