TuyaAPI / link

📡 Effortlessly connect devices to WiFi and the cloud. Documentation: https://tuyaapi.github.io/link.
MIT License
14 stars 9 forks source link

Documentation for initial setup #1

Closed codehearts closed 6 years ago

codehearts commented 6 years ago

I've been following the discussions on the tuyapi repo, but I still find myself a little confused about how to set this thing up. It would be good to have concise documentation on how to set up a cloud account (and around how long to wait for that), how manually generating your device key isn't possible (or is it?), and how to find the ssid of your device.

I'm going through this process right now, so I wouldn't mind drafting something and opening a PR once I've set up things on my end.

codetheweb commented 6 years ago

Sorry about the confusion.

I've been working on a CLI NodeJS package over the last couple of days that will effectively act as a more user-friendly wrapper around this package (@tuyapi/link) and the base tuyapi package (codetheweb/tuyapi).

Once that's finished, I'm planning to add documentation for using it to set up devices in tuyapi's readme.

For now, if you copy the usage example for this package into a new file and replace apiKey, apiSecret, ssid, and wifiPassword with the appropriate values it should work (parameters for WiFi should be taken from your network; devices don't broadcast a network).

codehearts commented 6 years ago

I've been looking into this again, but I can't figure out where to obtain an API key and secret. Do I need to sign up at developer.tuya.com and then complete the enterprise information form (with fake data, I assume?), or is that the wrong avenue?

codetheweb commented 6 years ago

Yep, apply for an account @codehearts. Doesn't necessarily need to be fake information; they don't seem to care if individuals register. It took me around 3 days to be approved for API access.

Although just as a warning some of the endpoints are not working for me right now, meaning they likely updated them without updating the documentation

codetheweb commented 6 years ago

Hey @codehearts, everything is now working. Follow these instructions to obtain API keys and link a device.