WiFi Transport
UUID: 00000203-0000-1000-8000-0000022A
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 "WiFi Transport" Homebridge plugin. Note
// Example WiFi Transport Plugin module.exports = (api) => { api.registerAccessory('ExampleWiFiTransportPlugin', ExampleWiFiTransportAccessory); }; class ExampleWiFiTransportAccessory { 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 WiFi Transport service this.service = new this.Service(this.Service.WiFiTransport); // create handlers for required characteristics this.service.getCharacteristic(this.Characteristic.CurrentTransport) .on('get', this.handleCurrentTransportGet.bind(this)); this.service.getCharacteristic(this.Characteristic.WiFiCapabilities) .on('get', this.handleWiFiCapabilitiesGet.bind(this)); } /** * Handle requests to get the current value of the "Current Transport" characteristic */ handleCurrentTransportGet(callback) { this.log.debug('Triggered GET CurrentTransport'); // set this to a valid value for CurrentTransport const currentValue = 1; callback(null, currentValue); } /** * Handle requests to get the current value of the "Wi-Fi Capabilities" characteristic */ handleWiFiCapabilitiesGet(callback) { this.log.debug('Triggered GET WiFiCapabilities'); // set this to a valid value for WiFiCapabilities const currentValue = 1; callback(null, currentValue); } }