Tuyapi Versions Save

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.

v7.1.1

3 years ago

Update README.

v7.0.0

3 years ago

Versions 6.2.x and up may be breaking: https://github.com/codetheweb/tuyapi/issues/448.

v6.0.0

3 years ago

🚨 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.

v5.0.0

4 years ago

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).

v4.0.0

5 years ago

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.

v3.0.2

5 years ago

Fixes XO build errors.

v2.0.3

6 years ago

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

v2.0.0

6 years ago

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.