- Device
- ~Device
- new Device(opts, messenger)
- .id :
string
- .ip :
string
- .name :
string
- .type :
string
- .network :
NetworkProperties
- .fan :
FanProperties
- .light :
LightProperties
- .sensor :
SensorProperties
- .smartMode :
SmartModeProperties
- .sleepMode :
SleepModeProperties
- .device :
DeviceProperties
- .observeAll() ⇒
Observable
- .disconnect()
- .listenAll() ⇒
EventEmitter
- .refreshAll()
- ~Device
Represents one device on the local network, such as a fan.
Kind: inner class of Device
- ~Device
- new Device(opts, messenger)
- .id :
string
- .ip :
string
- .name :
string
- .type :
string
- .network :
NetworkProperties
- .fan :
FanProperties
- .light :
LightProperties
- .sensor :
SensorProperties
- .smartMode :
SmartModeProperties
- .sleepMode :
SleepModeProperties
- .device :
DeviceProperties
- .observeAll() ⇒
Observable
- .disconnect()
- .listenAll() ⇒
EventEmitter
- .refreshAll()
Create a new device.
Param | Type | Description |
---|---|---|
opts | Object |
|
opts.name | string |
The advertised name of the new device |
opts.id | string |
The MAC address of the new device |
opts.type | string |
The type of the new device, such as FAN,HAIKU,HSERIES |
opts.ip | string |
The IP address of the new device |
messenger | EventEmitter |
An EventEmitter for funneling incoming messages from the discovery process. |
The ID (MAC address) of this device.
Kind: instance property of Device
Read only: true
The IP address of this device.
Kind: instance property of Device
Read only: true
The name of this device
Kind: instance property of Device
Read only: true
The type of this device, such as FAN,HAIKU,HSERIES
Kind: instance property of Device
Read only: true
device.network : NetworkProperties
Kind: instance property of Device
Read only: true
device.fan : FanProperties
Kind: instance property of Device
Read only: true
device.light : LightProperties
Kind: instance property of Device
Read only: true
device.sensor : SensorProperties
Kind: instance property of Device
Read only: true
device.smartMode : SmartModeProperties
Kind: instance property of Device
Read only: true
device.sleepMode : SleepModeProperties
Kind: instance property of Device
Read only: true
device.device : DeviceProperties
Kind: instance property of Device
Read only: true
Observe changes to any of the properties of this device. This method is only available if your application has an Observable library installed. See https://www.npmjs.com/package/any-observable for details.
Kind: instance method of Device
Returns: Observable
- An ES7-compatible obsevable that emits objects of the form { path, value }
for each property change.
Disconnect from the device.
Kind: instance method of Device
Listen for changes to any of the properties of this device. Changes are delivered as 'change' events emitted by the returned emitter.
Kind: instance method of Device
Request the current values of all known properties from this device. This method only updates the local state; to be informed of the new values, use Device#listenAll, {@link Device#observeAll}, or the corresponding methods on the individual values of interest.
Kind: instance method of Device
- SenseMe
- static
- .default :
SenseMe
- .default :
- inner
- ~SenseMe
- .getAllDevices() ⇒
Array.<Device>
- .getDeviceById(id) ⇒
Device
- .getDeviceByName(name) ⇒
Device
- .discover([interval], [missingThreshold])
- .cancelDiscovery()
- .getAllDevices() ⇒
- ~SenseMe
- static
Kind: static property of SenseMe
Discover and manage SenseME-enabled devices on the local network.
Kind: inner class of SenseMe
- ~SenseMe
- .getAllDevices() ⇒
Array.<Device>
- .getDeviceById(id) ⇒
Device
- .getDeviceByName(name) ⇒
Device
- .discover([interval], [missingThreshold])
- .cancelDiscovery()
- .getAllDevices() ⇒
Get a list of all currently known devices.
Kind: instance method of SenseMe
Get one discovered device by its ID (usually MAC address).
Kind: instance method of SenseMe
Param | Type | Description |
---|---|---|
id | string |
The ID of the requested device. |
Get one discovered device by its name.
Kind: instance method of SenseMe
Param | Type | Description |
---|---|---|
name | string |
The name of the requested device. |
Begin discovery of all SenseME devices on the local network. Discovery will continue until cancelDiscovery is called.
Kind: instance method of SenseMe
Emits: SenseMe#event:lostdevice
Param | Type | Default | Description |
---|---|---|---|
[interval] | number |
10000 |
How often (in milliseconds) should a discovery request be sent out? |
[missingThreshold] | number |
3 |
How many discovery requests must a device miss before being considered no longer on the network? |
Cancel an ongoing discovery session.
Kind: instance method of SenseMe
A single property of a SenseME device.
Kind: global interface
Template: T
- SenseMeProperty
- .value :
T
- .refresh()
- .listen() ⇒
EventEmitter
- .observe() ⇒
Observable
- .value :
The value of this property
Kind: instance property of SenseMeProperty
Re-fetch the value of this property from the device.
Kind: instance method of SenseMeProperty
Listen for changes to this property value. Changes are delivered as 'change' events emitted by the returned object.
Kind: instance method of SenseMeProperty
Observe this property for changes. Returns an ES7-compatible {Observable}. This method will only be available to applications that include an Observable library. See https://www.npmjs.com/package/any-observable for details.
Kind: instance method of SenseMeProperty
A single read-only property of a SenseME device.
Kind: global interface
Extends: SenseMeProperty<T>
Template: T
The value of this property
Kind: instance property of SenseMeReadonlyProperty
Read only: true
A property of a SenseME device that describes the "level" of something (fan speed, light brightness, etc)
Kind: global interface
Extends: SenseMeProperty<number>
- SenseMeLevelProperty ⇐
SenseMeProperty<number>
The minimum level for this property
Kind: instance property of SenseMeLevelProperty
The maximum level for this property
Kind: instance property of SenseMeLevelProperty
A collection of the properties of a fan.
Kind: global interface
- FanProperties
- .power :
SenseMeProperty.<('on'|'off')>
- .speed :
SenseMeLevelProperty
- .automaticOn :
SenseMeProperty.<('on'|'off')>
- .whooshMode :
SenseMeProperty.<('on'|'off')>
- .direction :
SenseMeProperty.<('forward'|'reverse')>
- .power :
The power state of the fan.
Kind: instance property of FanProperties
fanProperties.speed : SenseMeLevelProperty
The speed of the fan
Kind: instance property of FanProperties
The state of the fan's motion sensor. This is for the purposes of turning the fan on and off automatically; setting this to 'off' will not disable the presence sensor.
Kind: instance property of FanProperties
Is whoosh mode enabled?
Kind: instance property of FanProperties
The fan's direction of spin
Kind: instance property of FanProperties
A collection of the properties of a light.
Kind: global interface
- LightProperties
- .power :
SenseMeProperty.<('on'|'off')>
- .brightness :
SenseMeLevelProperty
- .automaticOn :
SenseMeProperty.<('on'|'off')>
- .power :
The power state of the light.
Kind: instance property of LightProperties
lightProperties.brightness : SenseMeLevelProperty
The brightness of the light
Kind: instance property of LightProperties
The state of the light's motion sensor. This is for the purposes of turning the light on and off automatically; setting this to 'off' will not disable the presence sensor.
Kind: instance property of LightProperties
A collection of the device's properties related to the occupancy sensor.
Kind: global interface
- SensorProperties
- .isRoomOccupied :
SenseMeProperty.<boolean>
- .timeout :
SenseMeLevelProperty
- .isRoomOccupied :
Is the room occupied?
Kind: instance property of SensorProperties
sensorProperties.timeout : SenseMeLevelProperty
The occupancy sensor timeout (in milliseconds). The device will turn itself off automatically after this much time has passed.
Kind: instance property of SensorProperties
A collection of the device's properties related to Smart mode.
Kind: global interface
- SmartModeProperties
- .actual :
SenseMeReadonlyProperty.<('cooling'|'heating'|'off')>
- .state :
SenseMeProperty.<('followThermostat'|'cooling'|'heating'|'off')>
- .minimumSpeed :
SenseMeProperty.<number>
- .maximumSpeed :
SenseMeProperty.<number>
- .idealTemperatureC :
SenseMeProperty.<number>
- .idealTemperatureF :
SenseMeProperty.<number>
- .actual :
The current actual smart mode setting.
Kind: instance property of SmartModeProperties
The current desired smart mode setting.
Kind: instance property of SmartModeProperties
The minimum speed of the fan in smart mode
Kind: instance property of SmartModeProperties
The maximum speed of the fan in smart mode
Kind: instance property of SmartModeProperties
The ideal smart mode temperature in degrees Celsius
Kind: instance property of SmartModeProperties
The ideal smart mode temperature in degrees Fahrenheit
Kind: instance property of SmartModeProperties
A collection of the device's properties related to sleep mode.
Kind: global interface
- SleepModeProperties
- .status :
SenseMeProperty.<('on'|'off')>
- .idealTemperatureC :
SenseMeProperty.<number>
- .idealTemperatureF :
SenseMeProperty.<number>
- .minimumFanSpeed :
SenseMeProperty.<number>
- .maximumFanSpeed :
SenseMeProperty.<number>
- .status :
Is sleep mode on?
Kind: instance property of SleepModeProperties
The ideal sleep mode temperature in degrees Celsius
Kind: instance property of SleepModeProperties
The ideal sleep mode temperature in degrees Fahrenheit
Kind: instance property of SleepModeProperties
The minimum speed of the fan in sleep mode
Kind: instance property of SleepModeProperties
The maximum speed of the fan in sleep mode
Kind: instance property of SleepModeProperties
A collection of properties related to the device itself.
Kind: global interface
- DeviceProperties
- .hasLight :
SenseMeReadonnlyProperty.<boolean>
- .beeperStatus :
SenseMeProperty.<('on'|'off')>
- .indicatorsStatus :
SenseMeProperty.<('on'|'off')>
- .winterMode :
SenseMeProperty.<('on'|'off')>
- .heightInMeters :
SenseMeProperty.<number>
- .heightInFeet :
SenseMeProperty.<number>
- .hasLight :
Does the fan have a light kit attached?
Kind: instance property of DeviceProperties
The power status of the confirmation beep heard when changing settings.
Kind: instance property of DeviceProperties
The power status of the indicator lights on the fan
Kind: instance property of DeviceProperties
The current state of Winter mode
Kind: instance property of DeviceProperties
The height of the device abvoe the floor in meters.
Kind: instance property of DeviceProperties
The height of the device abvoe the floor in feet.
Kind: instance property of DeviceProperties
A collection of properties related to the device's network connection
Kind: global interface
- NetworkProperties
- .token :
SenseMeReadonlyProperty.<number>
- .dhcpStatus :
SenseMeReadonlyProperty.<('on'|'off')>
- .ssid :
SenseMeReadonlyProperty.<string>
- .accessPointStatus :
SenseMeReadonlyProperty.<('on'|'off')>
- .token :
A network token GUID. It's currently not known what this token is useful for.
Kind: instance property of NetworkProperties
DHCP status
Kind: instance property of NetworkProperties
The SSID of the currently associated wireless network.
Kind: instance property of NetworkProperties
The power status of the device's internal access point. It's possible to configure the fan to act as its own wireless access point. This property indicates whether it's in that mode or not.
Kind: instance property of NetworkProperties