Skip to content

Latest commit

Β 

History

History
283 lines (189 loc) Β· 8.2 KB

CHANGELOG.md

File metadata and controls

283 lines (189 loc) Β· 8.2 KB

Change Log

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