示例#1
0
 def __init__(self, iid, manufacturer):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.MANUFACTURER,
                                     CharacteristicFormats.string)
     self.value = manufacturer
     self.maxLen = 64
     self.description = 'Manufacturer'
示例#2
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.TEMPERATURE_CURRENT, CharacteristicFormats.float)
     self.perms = [CharacteristicPermissions.paired_read, CharacteristicPermissions.events]
     self.description = 'the current temperature'
     self.minValue = 0.0
     self.maxValue = 100.0
     self.minStep = 0.1
     self.unit = CharacteristicUnits.celsius
     self.value = 23.0
示例#3
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.ACTIVE,
                                     CharacteristicFormats.uint8)
     self.valid_values = {0: "Inactive", 1: "Active"}
     self.name = "Active"
     self.description = "Active"
     self.format = "uint8"
     self.perms = ['pr', 'pw', 'ev']
     self.type = "000000B0-0000-1000-8000-0026BB765291"
示例#4
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(
         self, iid, CharacteristicsTypes.ADMINISTRATOR_ONLY_ACCESS,
         CharacteristicFormats.bool)
     self.perms = [
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.paired_write,
         CharacteristicPermissions.events
     ]
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.AUDIO_FEEDBACK,
                                     CharacteristicFormats.bool)
     self.perms = [
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.paired_write,
         CharacteristicPermissions.events
     ]
示例#6
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.HEATING_COOLING_CURRENT,
                                     CharacteristicFormats.uint8)
     self.perms = [CharacteristicPermissions.paired_read, CharacteristicPermissions.events]
     self.description = 'Current mode of operation'
     self.minValue = 0
     self.maxValue = 2
     self.minStep = 1
     self.value = 0
示例#7
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.ON,
                                     CharacteristicFormats.bool)
     self.description = 'Switch state (on/off)'
     self.perms = [
         CharacteristicPermissions.paired_write,
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.events
     ]
     self.value = False
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.ACTIVE_IDENTIFIER,
                                     CharacteristicFormats.uint32)
     self.name = "ActiveIdentifier"
     self.description = "ActiveIdentifier"
     self.format = "uint32"
     self.perms = ['pr', 'pw', 'ev']
     self.type = "000000E7-0000-1000-8000-0026BB765291"
     self.minValue = 0
示例#9
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.OUTLET_IN_USE,
                                     CharacteristicFormats.bool)
     self.description = 'Outlet in use'
     self.perms = [
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.events
     ]
     self.value = False
示例#10
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.BATTERY_LEVEL,
                                     CharacteristicFormats.uint8)
     self.perms = [
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.events
     ]
     self.description = 'Battery level in percent'
     self.minValue = 0
     self.maxValue = 100
     self.minStep = 1
     self.value = 0
     self.unit = CharacteristicUnits.percentage
示例#11
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.VOLUME,
                                     CharacteristicFormats.uint8)
     self.perms = [
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.paired_write,
         CharacteristicPermissions.events
     ]
     self.description = 'Volume in percent'
     self.minValue = 0
     self.maxValue = 100
     self.minStep = 1
     self.value = 0
     self.unit = CharacteristicUnits.percentage
示例#12
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.HUE,
                                     CharacteristicFormats.float)
     self.perms = [
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.paired_write,
         CharacteristicPermissions.events
     ]
     self.description = 'Hue in arc degrees'
     self.minValue = 0
     self.maxValue = 360
     self.minStep = 1
     self.value = 0
     self.unit = CharacteristicUnits.arcdegrees
示例#13
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.SATURATION,
                                     CharacteristicFormats.float)
     self.perms = [
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.paired_write,
         CharacteristicPermissions.events
     ]
     self.description = 'Saturation in percent'
     self.minValue = 0
     self.maxValue = 100
     self.minStep = 1
     self.value = 0
     self.unit = CharacteristicUnits.percentage
示例#14
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.BRIGHTNESS,
                                     CharacteristicFormats.int)
     self.perms = [
         CharacteristicPermissions.paired_read,
         CharacteristicPermissions.paired_write,
         CharacteristicPermissions.events
     ]
     self.description = 'Brightness in percent'
     self.minValue = 0
     self.maxValue = 100
     self.minStep = 1
     self.value = 0
     self.unit = CharacteristicUnits.percentage
示例#15
0
 def __init__(self, iid, name):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.NAME,
                                     CharacteristicFormats.string)
     self.value = name
     self.maxLen = 64
     self.description = 'Name'
示例#16
0
 def __init__(self, iid: int, characteristic_type: str,
              characteristic_format: str):
     AbstractCharacteristic.__init__(self, iid, characteristic_type,
                                     characteristic_format)
示例#17
0
 def __init__(self, iid, number):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.SERIAL_NUMBER, CharacteristicFormats.string)
     self.value = number
     self.maxLen = 64
     self.description = 'Serial Number'
示例#18
0
 def __init__(self, iid):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.IDENTIFY,
                                     CharacteristicFormats.bool)
     self.perms = [CharacteristicPermissions.paired_write]
     self.description = 'Identify'
示例#19
0
 def __init__(self, iid, revision):
     AbstractCharacteristic.__init__(self, iid,
                                     CharacteristicsTypes.HARDWARE_REVISION,
                                     CharacteristicFormats.string)
     self.value = revision
     self.description = 'Hardware Revision'
示例#20
0
 def __init__(self, iid, model):
     AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.MODEL, CharacteristicFormats.string)
     self.value = model
     self.maxLen = 64
     self.description = 'Model'