Releases: codetheweb/tuyapi
Releases · codetheweb/tuyapi
v7.1.1
v7.0.0
v6.0.0
Version 5.0.0
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
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
Fixes XO build errors.
Version 2.0.3
Improves stability, and adds a timeout when resolving a device ID to an IP.
🎉 Version 2.0 🎉
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.