Skip to content

Latest commit

Β 

History

History
384 lines (242 loc) Β· 15.1 KB

CHANGELOG.md

File metadata and controls

384 lines (242 loc) Β· 15.1 KB

Changelog

All notable changes to this project will be documented in this file. See commit-and-tag-version for commit guidelines.

5.0.0 (2023-11-15)

⚠ BREAKING CHANGES

  • Device: Device#startPolling, Device#stopPolling, and Device/Bulb/Plug event polling-error have been removed.

  • Requires minimum node version v16

  • Requires minimum node version v14

  • drop support for node < v14 (348401a)

  • drop support for node < v16 (#156) (893b82b)

Features

  • Bulb: add Bulb#blink method (#162) (a8dd13d)
  • catch more invalid discovery messages (#154) (935d3f3)
  • Device: remove startPolling, stopPolling, that were previously deprecated (#157) (513deca)

Bug Fixes

4.2.0 (2022-02-14)

Features

4.1.0 (2022-02-03)

Features

  • Bulb: add lightstate-sysinfo events (6b844a1)

4.0.0 (2022-02-02)

⚠ BREAKING CHANGES

  • Bulb: removed previously deprecated getColorTemperatureRange. Use colorTemperatureRange instead.
  • apiModules is now non-static property
  • require minimum node version v12.20.0

Features

  • Bulb: removed deprecated getColorTemperatureRange (3dd442b)
  • add color temp ranges for additional models (#137) (48eb046)
  • Plug: add support for light strips such as KL430 (874a431), closes #130 #90
  • change static property apiModules to non-static (6a171aa)
  • Bulb: add getLightDetails (#135) (705392f), closes #92

Bug Fixes

  • cli TypeError: Found non-callable @[@iterator](https://github.com/iterator) (#125) (3e53050), closes #124

  • dimmer.setGentle*Time incorrectly named parameter (db9993f), closes #129

  • keep socket timer going until close emitted (416ce38), closes #108

  • upgrade commander (1911aa4)

3.3.0 (2021-03-01)

Features

  • change emeter#realtime type to RealtimeNormalized (1645215)
  • Plug: add dimmer.brightness property (47f28f7)
  • Plug: emit brightness-change & brightness-update (3fb2897)

Bug Fixes

  • mark startPolling as deprecated (cc658ec)

3.2.1 (2021-02-28)

Bug Fixes

  • rename getColorTemperatureRange to colorTemperatureRange (e3664d2)

3.2.0 (2021-02-28)

Features

  • add EventEmitter types (db259e9)
  • export types Realtime, RealtimeV1, RealtimeV2 (f5f020f)
  • use standard-version (#121) (e3a6cca)

Bug Fixes

  • cli: remove non-functional -c parameter for sendCommand (c3bfe0e), closes #94

3.1.0 / 2020-10-13

Added βž•

  • CLI: add --broadcast option to search command

3.0.0 / 2020-10-13

Added βž•

  • Export types: BulbSysinfo, PlugSysinfo, PlugConstructorOptions

3.0.0-beta.1 / 2020-10-10

Breaking Changes πŸ’₯

  • Bulb/Plug
    • #getInfo now defaults to TCP transport unless specifically overridden in the call to #getInfo.
      • Some newer devices and firmware would crash and reset when sent emeter:{get_realtime:{}} over UDP.

3.0.0-beta.0 / 2020-08-26

Breaking Changes πŸ’₯

  • Client
    • #startDiscovery no longer queries energy usage (emeter:{get_realtime:{}})
      • Some newer devices and firmware would crash and reset when sent emeter:{get_realtime:{}}

3.0.0-beta / 2020-06-28

Breaking Changes πŸ’₯

  • Client
    • #send returns a string instead of an object
    • removed #getCommonDevice
  • Device
    • Cannot be instantiated directly. Use Client or new Bulb() or new Plug();
  • Bulb/Plug
    • sysInfo is now required to be passed in the constructor.
  • Bulb
    • #getColorTemperatureRange now returns null instead of undefined when the bulb does not support color temperature.
  • Plug
    • #relayState changed to better reflect state of plugs with children. If device supports childId, but childId is not set, then it will return true if any child has state === 1.
  • ResponseError
    • properties response and command are now strings instead of objects.
    • property errorModules was renamed to modules.

2.0.0 / 2020-01-01

Added βž•

  • Export Bulb, Device, Plug

Breaking Changes πŸ’₯

  • Drop support for Node.js versions older than v10

1.3.0 / 2019-12-14

Added βž•

  • Device/Bulb/Plug
    • add useSharedSocket and sharedSocketTimeout to sendOptions
    • add #closeConnection function

Changes ⚑

  • Client

    • startDiscovery now queries emeter realtime information and devices may emit emeter-realtime-update if supported
  • Client/Device/Bulb/Plug

    • rewrote and improved TCP/UDP networking code
  • Device/Bulb/Plug

    • change defaultSendOptions to default to Client defaultSendOptions
    • startPoller now emits polling-error (#60)

1.2.0 / 2019-01-18

Added βž•

  • Plug
    • add supportsDimmer property, returns true if dimmable plug (HS220)
    • add dimmer functions
      • dimmer.setBrightness
      • dimmer.getDefaultBehavior
      • dimmer.getDimmerParameters
      • dimmer.setDimmerTransition
      • dimmer.setDoubleClickAction
      • dimmer.setFadeOffTime
      • dimmer.setFadeOnTime
      • dimmer.setGentleOffTime
      • dimmer.setGentleOnTime
      • dimmer.setLongPressAction
      • dimmer.setSwitchState

Changes ⚑

  • Plug
    • schedule
      • add dimmer parameter to addRule
      • add dimmer parameter to editRule

1.1.0 / 2019-01-10

Changes ⚑

  • Client
    • excludedMacAddresses parameter added to startDiscovery
    • filterCallback parameter added to startDiscovery
    • startDiscovery parameters macAddresses and excludedMacAddress now support GLOB style patterns with ? and *

1.0.0 / 2019-01-02

Changes ⚑

  • Device/Bulb/Plug
    • sendCommand
      • ResponseError thrown by sendCommand now includes:
        • command: command sent to device
        • errorModules: array of modules that returned with errors.
    • add id property. Returns deviceId or childId if childId is set.
    • alias returns child alias if childId is set
    • defaultSendOptions.timeout default changed to 10000 ms from 5000 ms
  • Client
    • breakoutChildren parameter added to startDiscovery
    • defaultSendOptions.timeout default changed to 10000 ms from 5000 ms

Fixed πŸ›

  • Plug
    • constructor
      • change default inUseThreshold from 0 to 0.1. Even with nothing plugged into some outlets and relay turned off they may report a small power draw.

Breaking Changes πŸ’₯

  • Device/Bulb/Plug
    • sendCommand
      • BREAKING CHANGE: Add childId parameter that will add "context":{child_ids:[]} to the command. This is to support plugs with multiple outlets.

0.23.1 / 2018-12-02

Fixed πŸ›

  • Plug#getInfo and Emeter#realtime for devices without energy monitoring (Regression introduced in 0.23.0)

0.23.0 / 2018-08-16

Breaking Changes πŸ’₯

  • Requires minimum Node version 6.4

Changes ⚑

  • Bulb/Plug
    • getEmeterRealtime will now simultaneously return both the new and old API style responses, i.e. current and current_ma.

Fixed πŸ›

  • Change Bulb#getInfo() to request system: { get_sysinfo } instead of smartlife.iot.common.system: { get_sysInfo }

0.22.0 / 2017-01-05

Added βž•

  • Device#macNormalized
  • Basic automated testing of CLI

0.21.0 / 2017-01-02

Changes ⚑

  • Changed TCP response handling to timeout when device responds but does not close connection

Fixed πŸ›

  • CLI: Fixed reboot, reset, setLocation commands that expect integer arguments

0.20.1 / 2017-10-24

Fixed πŸ›

  • Reject instead of incorrectly throwing error for network errors

0.20.0 / 2017-10-19

Changes ⚑

  • new name, hs100-api is now tplink-smarthome-api

0.19.0 / 2017-10-18

Breaking Changes πŸ’₯

  • Device/Bulb/Plug
    • Many methods were moved to mirror the TPLink API.
      • Example: Plug#getScheduleRules() is now Plug.schedule#getRules()
      • Example: Bulb#getCloudInfo() is now Bulb.cloud#getInfo()
      • See API documentation for details.

Added βž•

  • Device/Bulb/Plug
    • Dozens of new methods, see documentation for details.
    • options added as last argument to functions that send commands
      • options.timeout and options.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 with instanceof

0.18.0 / 2017-10-11

Added βž•

  • Plug
    • #addTimerRule
    • #editTimerRule
    • #deleteAllTimerRules
  • Client#startDiscovery now emits discovery-invalid when receiving an invalid response (perhaps from a non-tplink device)

Fixed πŸ›

  • encrypt and encryptWithHeader now work properly with non-ascii characters

0.17.0 / 2017-10-10

Fixed πŸ›

0.16.0 / 2017-10-09

Added βž•

  • Device#name re-added as alias for Device#alias for backwards compatibility
  • Client.startDiscovery has additional parameter macAddresses
    • if specified only devices matching MAC will be found
  • Bulb
    • #supportsBrightness
    • #supportsColor
    • #supportsColorTemperature
    • #getColorTemperatureRange
    • #18#togglePowerState (thanks @adamsandle!)
  • Plug

0.15.0 / 2017-10-07

Breaking Changes πŸ’₯

  • Client#getGeneralDevice is now Client#getCommonDevice
  • Device#name is now Device#alias
  • Device#type is now Device#deviceType
  • Device#getConsumption() is now Device#getEmeterRealtime()
  • supportsConsumption is now supportsEmeter
  • consumption-update is now emeter-realtime-update
  • Existing Device/Bulb/Plug events have changed to no longer emit with this as argument

Added βž•

  • Support for older Node 4.8
  • Bulb#getInfo() added to mirror Plug#getInfo()
  • New Bulb events: lightstate-on, lightstate-off, lightstate-change, lightstate-update

Changes ⚑

  • Updated examples