Skip to content

Releases: codetheweb/tuyapi

7.7.0

Choose a tag to compare

@Apollon77 Apollon77 released this 06 Jan 16:23
ffa64c3

This includes the changes from 7.6.0 (Adding protocol 3.5) and optimizes set/get handling, but adds throwing on set in timeout cases which was missing in the past

v7.1.1

Choose a tag to compare

@codetheweb codetheweb released this 05 May 01:38
ca9af63

Update README.

v7.0.0

Choose a tag to compare

@codetheweb codetheweb released this 05 Apr 23:37
c23d1b4

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

v6.0.0

Choose a tag to compare

@codetheweb codetheweb released this 01 Oct 17:05
aaedf98

🚨 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

Choose a tag to compare

@codetheweb codetheweb released this 02 Jun 00:29

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

Choose a tag to compare

@codetheweb codetheweb released this 16 Feb 20:42

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

Choose a tag to compare

@codetheweb codetheweb released this 11 Sep 14:44

Fixes XO build errors.

Version 2.0.3

Choose a tag to compare

@codetheweb codetheweb released this 14 Apr 20:35

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

🎉 Version 2.0 🎉

Choose a tag to compare

@codetheweb codetheweb released this 12 Jan 21:11

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.