Device#macNormalized
- Basic automated testing of CLI
- Changed TCP response handling to timeout when device responds but does not close connection
- CLI: Fixed reboot, reset, setLocation commands that expect integer arguments
- Reject instead of incorrectly throwing error for network errors
- new name,
hs100-api
is nowtplink-smarthome-api
Device
/Bulb
/Plug
- Many methods were moved to mirror the TPLink API.
- Example:
Plug#getScheduleRules()
is nowPlug.schedule#getRules()
- Example:
Bulb#getCloudInfo()
is nowBulb.cloud#getInfo()
- See API documenation for details.
- Example:
- Many methods were moved to mirror the TPLink API.
Device
/Bulb
/Plug
- Dozens of new methods, see documentation for details.
options
added as last argument to functions that send commandsoptions.timeout
andoptions.transport
can be set to customize the timeout and transport (tcp, udp) used for a single command
defaultSendOptions
added to constructor
Client
send
/sendCommand
- Receiving large TCP responses split across multiple segments are now supported
- Support UDP in addition to TCP
- UDP can be unreliable, also large replies may not be sent back from the device
ResponseError
now exported so consumer can check errors withinstanceof
Plug
#addTimerRule
#editTimerRule
#deleteAllTimerRules
Client#startDiscovery
now emitsdiscovery-invalid
when receiving an invalid response (perhaps from a non-tplink device)
encrypt
andencyptWithHeader
now work properly with non-ascii characters
- plasticrake/homebridge-hs100#35: Switch to utf8 from ascii to support special characters in Alias (thanks @wzaatar)
Device#name
re-added as alias forDevice#alias
for backwards compatibilityClient.startDiscovery
has additional parametermacAddresses
- if specified only devices matching MAC will be found
Bulb
#supportsBrightness
#supportsColor
#supportsColorTemperature
#getColorTemperatureRange
- #18
#togglePowerState
(thanks @adamsandle!)
Plug
- #18
#togglePowerState
(thanks @adamsandle!)
- #18
Client#getGeneralDevice
is nowClient#getCommonDevice
Device#name
is nowDevice#alias
Device#type
is nowDevice#deviceType
Device#getConsumption()
is nowDevice#getEmeterRealtime()
supportsConsumption
is nowsupportsEmeter
consumption-update
is nowemeter-realtime-update
- Existing
Device
/Bulb
/Plug
events have changed to no longer emit withthis
as argument
- Support for older Node 4.8
Bulb#getInfo()
added to mirrorPlug#getInfo()
- New
Bulb
events:lightstate-on
,lightstate-off
,lightstate-change
,lightstate-update
- Updated examples