TuyaLinkWizard

A wrapper that combines @tuya/tuya-connector-nodejs and (@tuyapi/link).manual (included in this package) to make registration Just Work™️. Exported as (@tuyapi/link).wizard.

new TuyaLinkWizard(options: Object)
Parameters
options (Object = {}) construction options
Name Description
options.email String user email
options.password String user password
options.region String (default 'us') region (us=Americas, cn=Asia, eu=Europe)
options.timezone String (default 'America/Chicago') timezone of device in tz format
options.apiKey String API key
options.apiSecret String API secret
options.schema String app schema to register the device under
Example
// Note: user account does not need to already exist
const register = new TuyaLink.wizard({key: 'your-api-key',
                                          secret: 'your-api-secret',
                                          email: 'example@example.com',
                                          password: 'example-password'});
Instance Members
init()
linkDevice(options)

A lower level option for linking devices. Use only if you're not generating a token through @tuyapi/cloud. Exported as (@tuyapi/link).manual.

new TuyaLink()
Example
const register = new TuyaLink.manual();
Instance Members
sendSmartLinkStart()
sendSmartLinkData(data)
abortBroadcastingData()
smartLinkEncode(options)
cleanup()