lib/Characteristic.js
function Characteristic(displayName, UUID, props) {
  this.displayName = displayName;
  this.UUID = UUID;
  this.iid = null; // assigned by our containing Service
  this.value = null;
  this.status = null;
  this.eventOnlyCharacteristic = false;
  this.props = props || {
    format: null,
    unit: null,
    minValue: null,
    maxValue: null,
    minStep: null,
    perms: []
  };

  this.subscriptions = 0;
}
function Characteristic(displayName, UUID, props) {
  this.displayName = displayName;
  this.UUID = UUID;
  this.iid = null; // assigned by our containing Service
  this.value = null;
  this.status = null;
  this.eventOnlyCharacteristic = false;
  this.props = props || {
    format: null,
    unit: null,
    minValue: null,
    maxValue: null,
    minStep: null,
    perms: []
  };

  this.subscriptions = 0;
}
function Characteristic ( displayName , UUID , props ) { this . displayName = displayName ; this . UUID = UUID ; this . iid = null ; // assigned by our containing Service this . value = null ; this . status = null ; this . eventOnlyCharacteristic = false ; this . props = props || { format : null , unit : null , minValue : null , maxValue : null , minStep : null , perms : [ ] } ; this . subscriptions = 0 ; }
Characteristic represents a particular typed variable that can be assigned to a Service. For instance, a
"Hue" Characteristic might store a 'float' value of type 'arcdegrees'. You could add the Hue Characteristic
to a Service in order to store that value. A particular Characteristic is distinguished from others by its
UUID. HomeKit provides a set of known Characteristic UUIDs defined in HomeKitTypes.js along with a
corresponding concrete subclass.

You can also define custom Characteristics by providing your own UUID. Custom Characteristics can be added
to any native or custom Services, but Siri will likely not be able to work with these.

Note that you can get the "value" of a Characteristic by accessing the "value" property directly, but this
is really a "cached value". If you want to fetch the latest value, which may involve doing some work, then
call getValue().

@event 'get' => function(callback(err, newValue), context) { }
Emitted when someone calls getValue() on this Characteristic and desires the latest non-cached
value. If there are any listeners to this event, one of them MUST call the callback in order
for the value to ever be delivered. The `context` object is whatever was passed in by the initiator
of this event (for instance whomever called `getValue`).

@event 'set' => function(newValue, callback(err), context) { }
Emitted when someone calls setValue() on this Characteristic with a desired new value. If there
are any listeners to this event, one of them MUST call the callback in order for this.value to
actually be set. The `context` object is whatever was passed in by the initiator of this change
(for instance, whomever called `setValue`).

@event 'change' => function({ oldValue, newValue, context }) { }
Emitted after a change in our value has occurred. The new value will also be immediately accessible
in this.value. The event object contains the new value as well as the context object originally
passed in by the initiator of this change (if known).
Characteristic represents a particular typed variable that can be assigned to a Service . For instance a Hue Characteristic might store a float value of type arcdegrees . You could add the Hue Characteristic to a Service in order to store that value . A particular Characteristic is distinguished from others by its UUID . HomeKit provides a set of known Characteristic UUIDs defined in HomeKitTypes . js along with a corresponding concrete subclass .