- HAPNodeJSClient
- HAPNodeJSClient#Disconnected
- HAPNodeJSClient#hapEvent
- _reconnectServer
- services
- Request
HAPNodeJSClient - Client for Homebridge and HAP-NodeJS in insecure mode.
Events
options
type description
debug
boolean Enable debug logging, defaults to falsepin
string Homebridge PIN, defaults to '031-45-154'refresh
number Discovery refresh, defaults to 15 minutestimeout
number Discovery timeout, defaults to 20 secondsreqTimeout
number Accessory request timeout, defaults to 7 seconds
HAPNodeJSClient.prototype.HAPaccessories - Returns an array of all homebridge instances, and the accessories for each.
callback
type description
Returns type description
HAPNodeJSClient.prototype.HAPcontrolByDeviceID - Send a characteristic PUT Message to a particular homebridge instance
deviceID
type deviceID of homebridge instancebody
type An array of HomeKit characteristic updates, [{ "aid": 2, "iid": 9, "value": 0}]callback
type Callback to execute upon completion of characteristic setting, function(err, response)
HAPNodeJSClient.prototype.HAPcontrol - Send a characteristic PUT Message to a particular homebridge instance
ipAddress
type IP Address of homebridge instanceport
type Port of homebridge instancebody
type An array of HomeKit characteristic updates, [{ "aid": 2, "iid": 9, "value": 0}]callback
type Callback to execute upon completion of characteristic setting, function(err, response)
HAPNodeJSClient.prototype.HAPeventByDeviceID - Send a characteristic PUT Message to a particular homebridge instance, this maintains a socket connection for use in returning Events
deviceID
type deviceID homebridge instancebody
type An array of HomeKit characteristic updates, [{ "aid": 2, "iid": 9, "value": 0}]callback
type Callback to execute upon completion of characteristic setting, function(err, response)
HAPNodeJSClient.prototype.HAPevent - Send a characteristic PUT Message to a particular homebridge instance, this maintains a socket connection for use in returning Events
ipAddress
type IP Address of homebridge instanceport
type Port of homebridge instancebody
type An array of HomeKit characteristic updates, [{ "aid": 2, "iid": 9, "value": 0}]callback
type Callback to execute upon completion of characteristic setting, function(err, response)
HAPNodeJSClient.prototype.HAPresourceByDeviceID - Send a characteristic PUT Message to a particular homebridge instance using resource interface, ie camera
deviceID
body
type An array of HomeKit characteristic updates, [{ "aid": 2, "iid": 9, "value": 0}]callback
type Callback to execute upon completion of characteristic setting, function(err, response)DeviceID
type DeviceID of homebridge instance
HAPNodeJSClient.prototype.HAPresource - Send a characteristic PUT Message to a particular homebridge instance using resource interface, ie camera
ipAddress
type IP Address of homebridge instanceport
type Port of homebridge instancebody
type An array of HomeKit characteristic updates, [{ "aid": 2, "iid": 9, "value": 0}]callback
type Callback to execute upon completion of characteristic setting, function(err, response)
HAPNodeJSClient.prototype.HAPstatusByDeviceID - Get current status for characteristics
deviceID
type deviceID of homebridge instancebody
type descriptioncallback
type Callback to execute upon completion of characteristic getting, function(err, response)
HAPNodeJSClient.prototype.HAPstatus - Get current status for characteristics
ipAddress
type IP Address of homebridge instanceport
type Port of homebridge instancebody
type descriptioncallback
type Callback to execute upon completion of characteristic getting, function(err, response)
HomeKit Accessory Characteristic event pass thru
server
string IP Address and port of disconnected homebridge
Sample Message
{ host: '192.168.1.4', port: 51826, aid: 16, iid: 11, status: false }
HomeKit Accessory Characteristic event pass thru
host
string IP Address of homebridge instance generating eventport
number Port of homebridge instance generating eventdeviceID
number deviceID of homebridge instance generating eventaid
number Accessory ID of accessory generating eventiid
number Instance ID of accessory characteristic generating eventvalue
object Updated characteristic value
Sample Message
{ host: '192.168.1.4', port: 51826, aid: 16, iid: 11, status: false }
_reconnectServer - Reconnect to event server
server
type IP Address and port of disconnected homebridge server
Returns type description
Ensure UUIDs are long form
var q - Message queuing to prevent requests overstepping each other
options
function
type (request descriptioncb
type description
Returns type description