{"action":"created","issue":{"url":"https://api.github.com/repos/codetheweb/tuyapi/issues/65","repository_url":"https://api.github.com/repos/codetheweb/tuyapi","labels_url":"https://api.github.com/repos/codetheweb/tuyapi/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/codetheweb/tuyapi/issues/65/comments","events_url":"https://api.github.com/repos/codetheweb/tuyapi/issues/65/events","html_url":"https://github.com/codetheweb/tuyapi/issues/65","id":351019312,"node_id":"MDU6SXNzdWUzNTEwMTkzMTI=","number":65,"title":"Device(s) Failed to be registered!","user":{"login":"rbyers8252","id":42424402,"node_id":"MDQ6VXNlcjQyNDI0NDAy","avatar_url":"https://avatars3.githubusercontent.com/u/42424402?v=4","gravatar_id":"","url":"https://api.github.com/users/rbyers8252","html_url":"https://github.com/rbyers8252","followers_url":"https://api.github.com/users/rbyers8252/followers","following_url":"https://api.github.com/users/rbyers8252/following{/other_user}","gists_url":"https://api.github.com/users/rbyers8252/gists{/gist_id}","starred_url":"https://api.github.com/users/rbyers8252/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbyers8252/subscriptions","organizations_url":"https://api.github.com/users/rbyers8252/orgs","repos_url":"https://api.github.com/users/rbyers8252/repos","events_url":"https://api.github.com/users/rbyers8252/events{/privacy}","received_events_url":"https://api.github.com/users/rbyers8252/received_events","type":"User","site_admin":false},"labels":[{"id":730686323,"node_id":"MDU6TGFiZWw3MzA2ODYzMjM=","url":"https://api.github.com/repos/codetheweb/tuyapi/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":71,"created_at":"2018-08-16T01:04:29Z","updated_at":"2018-10-17T19:50:33Z","closed_at":null,"author_association":"NONE","body":"I've created the Tuya account and obtained the ID and Key from the site.\r\n\r\nWhen I go to add a device I get the following error.\r\n× Device(s) failed to be registered!\r\nError: Timed out wating for device(s) to connect to cloud\r\n    at Promise (C:\\Users\\xxxxxx\\AppData\\Roaming\\npm\\node_modules\\@tuyapi\\cli\\node_modules\\@tuyapi\\cloud\\index.js:275:12)\r\n    at <anonymous>\r\n\r\nI'm using this smart plug [https://www.amazon.com/gp/product/B07CHMDP1G/ref=oh_aui_detailpage_o09_s00?ie=UTF8&psc=1](url) with the Smart Life app. Running Charles on my iPhone I can confirm it's communicating through the Tuya Cloud. I put the switch in pairing mode but the wizard never finds it. Instantly can add it back to the Smart Life app though. \r\n\r\nI use the iOS APP KEY from Tuya for apikey in the wizard and iOS APP Secret from Tuya for apisecret in the wizard. Am I doing something wrong?"},"comment":{"url":"https://api.github.com/repos/codetheweb/tuyapi/issues/comments/430764521","html_url":"https://github.com/codetheweb/tuyapi/issues/65#issuecomment-430764521","issue_url":"https://api.github.com/repos/codetheweb/tuyapi/issues/65","id":430764521,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDc2NDUyMQ==","user":{"login":"codetheweb","id":7410405,"node_id":"MDQ6VXNlcjc0MTA0MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/7410405?v=4","gravatar_id":"","url":"https://api.github.com/users/codetheweb","html_url":"https://github.com/codetheweb","followers_url":"https://api.github.com/users/codetheweb/followers","following_url":"https://api.github.com/users/codetheweb/following{/other_user}","gists_url":"https://api.github.com/users/codetheweb/gists{/gist_id}","starred_url":"https://api.github.com/users/codetheweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codetheweb/subscriptions","organizations_url":"https://api.github.com/users/codetheweb/orgs","repos_url":"https://api.github.com/users/codetheweb/repos","events_url":"https://api.github.com/users/codetheweb/events{/privacy}","received_events_url":"https://api.github.com/users/codetheweb/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T19:50:33Z","updated_at":"2018-10-17T19:50:33Z","author_association":"OWNER","body":"**TL;DR**: current linking method probably won't work in the future, I'm looking into using a proxy instead.\r\n\r\nMy code is generating a slightly different set of packets than the app, which is probably why it works for some devices and not for others (@Apollon77, I tried removing the delays and it still didn't work).  The fact that it might take multiple retries for certain devices is probably a result of one of the parameter's length not being encoded properly.\r\n\r\nHowever, all the above is probably moot as @eddeandres [pointed out](https://github.com/codetheweb/tuyapi/issues/90) that apparently Tuya no longer allows \"free\" app creations, and now charges a $149 fee to acquire a pair of keys.  Unfortunately, that probably means the end of support for the current linking scheme, as I doubt the majority of new users will be willing to fork over $149.  I'm looking into using a proxy instead that sniffs for requests to Tuya servers and captures the token pair.  If it works, it might actually end up being a better user experience.\r\n\r\nThose of you who haven't gotten it working: for now, I would recommend just using Charles to sniff for the token pair.  There's a guide [here](https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP_DEPRECATED.md)."}}
{"actor":{"display_login":"codetheweb"}}