Skip to content

Releases: codetheweb/tuyapi

v7.1.1

05 May 01:38
ca9af63
Compare
Choose a tag to compare

Update README.

v7.0.0

05 Apr 23:37
c23d1b4
Compare
Choose a tag to compare

Versions 6.2.x and up may be breaking: #448.

v6.0.0

01 Oct 17:05
aaedf98
Compare
Choose a tag to compare

🚨 Breaking Changes: 🚨

The behavior described here is now opt-in, instead of being enabled by default.

Update your code to new TuyAPI({... nullPayloadOnJSONError: true}) if you wish to keep this behavior enabled when upgrading.

Version 5.0.0

02 Jun 00:29
Compare
Choose a tag to compare

This release focuses on reliability updates.

The only breaking change is that .set() will now resolve with the new status, instead of true (see docs for details).

Version 4.0.0

16 Feb 20:42
Compare
Choose a tag to compare

The majority of changes in this release deal with simplifying TuyAPI's code for better readability and maintainability, as well as simplifying the interface.

✅ Non-Breaking Changes:

  • Only necessary files are now bundled for publishing on NPM, resulting in a smaller overall package size.
  • Both the TuyaCipher and MessageParser classes were converted to ES6 classes.
  • .get() and .set() will now both emit an event and return a Promise simultaneously, no extra options needed. In practice, this means TuyAPI gets out of your way and lets you decide if you want to use the synchronous-style callbacks or event-based programming (or both) with less friction.
  • Debug statements were cleaned up, so hopefully the output of DEBUG=* ... is a little less overwhelming and easier to understand.
  • Added argument checks to functions so they throw an error if called incorrectly.

🚨 Breaking Changes

  • .resolveId() was renamed to .find(), as the function can now resolve either a missing ID or missing IP. For compatibility purposes, .resolveId() now wraps .find(); but .resolveId() is deprecated and will be removed in v5.0.0.
  • .resolveIds() was removed. It previously wrapped .resolveId() for compatibility purposes.
  • The persistent connection option has been removed, as a persistent connection is now the default. This means that you must call .connect() before interacting with a device, and .disconnect() when you want your script to exit.

Fix build errors

11 Sep 14:44
Compare
Choose a tag to compare

Fixes XO build errors.

Version 2.0.3

14 Apr 20:35
Compare
Choose a tag to compare

Improves stability, and adds a timeout when resolving a device ID to an IP.

🎉 Version 2.0 🎉

12 Jan 21:11
Compare
Choose a tag to compare

Includes

  • Autodiscovery of devices
  • Support for an arbitrary number of devices
  • Support for setting a dps index other than 1
  • Ability to get the schema of a device (this functionality is combined with what was previously getStatus(), now changed to simply get())
  • Better error reporting
  • All functions now return Promises
  • Much better documentation, now with examples
  • A huge performance increase, mainly do to the removal of the auto-reconnect cruft
  • Much better JSON parsing, it should fix Unexpected token � in JSON at position x

Because functions now return Promises, this is a breaking update. Make sure you update your code appropriately.