codetheweb / tuyapi

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.
MIT License
2.06k stars 339 forks source link

codetheweb/tuyapi or tuyapi #653

Open jonnytest1 opened 1 month ago

jonnytest1 commented 1 month ago

Describe the bug i think the npm package is just "tuyapi" but the readme says to isntall a different one

jonnytest1 commented 1 month ago

btw i found an easier path to get the "key"

you can just use the normal api from @tuya/tuya-connector-nodejs set accessKEy and secretKey (which are easier available)

and then const deviceData = await tuya.request<{ id: string, category: string }>({ method: "GET", path: /v2.0/cloud/thing/${deviceId} }) deviceData.result.local_key