Accessory Runtime Information
UUID: 00000203-0000-1000-8000-00000239
Required Characteristics
Optional Characteristics
Example
The example below is automatically generated and may not be a complete example of what is required to create a working "Accessory Runtime Information" Homebridge plugin. Note
// Example Accessory Runtime Information Plugin module.exports = (api) => { api.registerAccessory('ExampleAccessoryRuntimeInformationPlugin', ExampleAccessoryRuntimeInformationAccessory); }; class ExampleAccessoryRuntimeInformationAccessory { constructor(log, config, api) { this.log = log; this.config = config; this.api = api; this.Service = this.api.hap.Service; this.Characteristic = this.api.hap.Characteristic; // extract name from config this.name = config.name; // create a new Accessory Runtime Information service this.service = new this.Service(this.Service.AccessoryRuntimeInformation); // create handlers for required characteristics this.service.getCharacteristic(this.Characteristic.Ping) .on('get', this.handlePingGet.bind(this)); } /** * Handle requests to get the current value of the "Ping" characteristic */ handlePingGet(callback) { this.log.debug('Triggered GET Ping'); // set this to a valid value for Ping const currentValue = 1; callback(null, currentValue); } }