Closed legolass73 closed 5 years ago
Everything sounds right...
Do you ever hear your plug "click" when you run my pairing wizard?
EDIT: Actually, I just realized that since you're in France Tuya might be expecting you to use a different server than the default U.S. one. I'll look into it on Monday.
yes, I heard a "click" when the plug is in pairing mode
can we change the server manually if not?
apologize for the close and reopening of the issue, I unintentionally clicked on my phone while I was translating your message
See my comment here on changing the region. I'm not sure if this is the issue yet, but try it out and see if it works.
okay, I'll let you know if it works
I give you the result of the link?
Yes please.
I have to try pairing the plug with the link?
root@orion:/homebridge/link# DEBUG=* node dev.js module.js:549 throw err; ^
Error: Cannot find module '@tuyapi/cloud'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.
root@orion:/homebridge/link# DEBUG=* node dev.js @tuyapi/cloud Sending parameters: +0ms @tuyapi/cloud { a: 'tuya.m.user.email.register', @tuyapi/cloud deviceId: '0dclmz2gzetg4ir5t37k3f20zewnl98yliii2t14awe8', @tuyapi/cloud os: 'Linux', @tuyapi/cloud lang: 'en', @tuyapi/cloud v: '1.0', @tuyapi/cloud clientId: 'gwep8d8enugjvvcek45d', @tuyapi/cloud time: 1534847377, @tuyapi/cloud postData: '{"countryCode":"EU","email":"**.**@gmail.com","passwd":"a458c09dcd96bc0552817e83d30e8529"}', @tuyapi/cloud sign: 'd38c7f27682118a2a375c9793b350993' } +6ms @tuyapi/cloud Received response: +675ms @tuyapi/cloud {"t":1534847381300,"success":false,"errorCode":"USER_NAME_IS_EXIST","status":"error","errorMsg":"Username exists."} @tuyapi/cloud +0ms @tuyapi/cloud Sending parameters: +2ms @tuyapi/cloud { a: 'tuya.m.user.email.password.login', @tuyapi/cloud deviceId: '0dclmz2gzetg4ir5t37k3f20zewnl98yliii2t14awe8', @tuyapi/cloud os: 'Linux', @tuyapi/cloud lang: 'en', @tuyapi/cloud v: '1.0', @tuyapi/cloud clientId: 'gwep8d8enugjvvcek45d', @tuyapi/cloud time: 1534847378, @tuyapi/cloud postData: '{"countryCode":"EU","email":"**.**@gmail.com","passwd":"a458c09dcd96bc0552817e83d30e8529"}', @tuyapi/cloud sign: 'b8b2d3c405ac8f9108063de675b258b7' } +1ms @tuyapi/cloud Received response: +1s @tuyapi/cloud {"result":{"dataVersion":0,"timezone":"","sex":0,"accountType":1,"tempUnit":1,"mobile":"","headPic":"","sid":"az153484252168453mPUChS3a44ec2d5fe2e7cee8386ed5b5fe08507","ecode":"z2z45323141z8234","uid":"az15348452168453PUCh","domain":{"gwApiUrl":"http://a.gw.tuyaus.com/gw.json","mobileApiUrl":"https://a1.tuyaus.com","regionCode":"AZ","deviceHttpUrl":"http://a.tuyaus.com","mobileMqttUrl":"mq.mb.tuyaus.com","deviceMediaMqttUrl":"s.tuyaus.com","pxApiUrl":"http://px.tuyaus.com","deviceHttpsUrl":"https://a2.tuyaus.com","deviceMqttsUrl":"m2.tuyaus.com","gwMqttUrl":"mq.gw.tuyaus.com","mobileMediaMqttUrl":"s.tuyaus.com","mobileMqttsUrl":"m1.tuyaus.com"},"nickname":"","phoneCode":"EU","timezoneId":"","userType":1,"partnerIdentity":"p1096919","email":"******.******@gmail.com","snsNickname":"","improveCompanyInfo":false,"username":"******.******@gmail.com"},"t":1534847382324,"success":true,"status":"ok"} @tuyapi/cloud +0ms @tuyapi/cloud Sending parameters: +2ms @tuyapi/cloud { a: 'tuya.m.device.token.create', @tuyapi/cloud deviceId: '0dclmz2gzetg4ir5t37k3f20zewnl98yliii2t14awe8', @tuyapi/cloud os: 'Linux', @tuyapi/cloud lang: 'en', @tuyapi/cloud v: '1.0', @tuyapi/cloud clientId: 'gwep8d8enugjvvcek45d', @tuyapi/cloud time: 1534847379, @tuyapi/cloud postData: '{"timeZone":"-05:00"}', @tuyapi/cloud sid: 'az153484252168453mPUChS3a44ec2d5fe2e7cee8386ed5b5fe08507', @tuyapi/cloud sign: '9beec93c6e3aa47043090b48ad9b6cb0' } +1ms @tuyapi/cloud Received response: +270ms @tuyapi/cloud {"t":1534847382681,"success":false,"errorCode":"USER_SESSION_INVALID","status":"error","errorMsg":"Session Expired, please log in again"} @tuyapi/cloud +0ms (node:876) UnhandledPromiseRejectionWarning: #
root@orion:/homebridge/link# DEBUG=* node dev.js @tuyapi/cloud Sending parameters: +0ms @tuyapi/cloud { a: 'tuya.m.user.email.register', @tuyapi/cloud deviceId: '78iwr2j2ry3c5p7ecytgraustuvtpf097pakxruu5yuo', @tuyapi/cloud os: 'Linux', @tuyapi/cloud lang: 'en', @tuyapi/cloud v: '1.0', @tuyapi/cloud clientId: 'gwep8d8enugjvvcek45d', @tuyapi/cloud time: 1534851998, @tuyapi/cloud postData: '{"countryCode":"EU","email":"legolass73@live.fr","passwd":"532d973bf3cb17b8800d7f6787d3888c"}', @tuyapi/cloud sign: 'd2f3551c7f9eb22b6859d77f6a84074c' } +4ms @tuyapi/cloud Received response: +918ms @tuyapi/cloud {"result":{"dataVersion":0,"sex":0,"tempUnit":1,"headPic":"","sid":"az153485W2002436wt0BfMH395497bd85cc646466110aa82ea222583","ecode":"z0z453W451aa1358","uid":"az1534852002436w0BfM","domain":{"gwApiUrl":"http://a.gw.tuyaus.com/gw.json","mobileApiUrl":"https://a1.tuyaus.com","regionCode":"AZ","deviceHttpUrl":"http://a.tuyaus.com","mobileMqttUrl":"mq.mb.tuyaus.com","deviceMediaMqttUrl":"s.tuyaus.com","pxApiUrl":"http://px.tuyaus.com","deviceHttpsUrl":"https://a2.tuyaus.com","deviceMqttsUrl":"m2.tuyaus.com","gwMqttUrl":"mq.gw.tuyaus.com","mobileMediaMqttUrl":"s.tuyaus.com","mobileMqttsUrl":"m1.tuyaus.com"},"nickname":"","phoneCode":"EU","timezoneId":"","userType":1,"partnerIdentity":"p1096919","email":"legolass73@live.fr","snsNickname":"","improveCompanyInfo":false,"username":"legolass73@live.fr"},"t":1534852002495,"success":true,"status":"ok"} @tuyapi/cloud +0ms @tuyapi/cloud Sending parameters: +2ms @tuyapi/cloud { a: 'tuya.m.device.token.create', @tuyapi/cloud deviceId: '78iwr2j2ry3c5p7ecytgraustuvtpf097pakxruu5yuo', @tuyapi/cloud os: 'Linux', @tuyapi/cloud lang: 'en', @tuyapi/cloud v: '1.0', @tuyapi/cloud clientId: 'gwep8d8enugjvvcek45d', @tuyapi/cloud time: 1534851999, @tuyapi/cloud postData: '{"timeZone":"-05:00"}', @tuyapi/cloud sid: 'az153485W2002436wt0BfMH395497bd85cc646466110aa82ea222583', @tuyapi/cloud sign: '82f36c3dbb66e6e17c49dfeddbe30097' } +0ms @tuyapi/cloud Received response: +276ms @tuyapi/cloud {"t":1534852002871,"success":false,"errorCode":"USER_SESSION_INVALID","status":"error","errorMsg":"Session Expired, please log in again"} @tuyapi/cloud +0ms (node:886) UnhandledPromiseRejectionWarning: #
were you able to look around and find the problem?
I put two more or less the same message but one came from my pc under windows with terminal "babun" and cmd and the second came from the docker linux or homebridge, I tested on both system in case or one of them have a problem but it had put both the same mistake
Ok.
It looks like your region might not be the issue. Are you able to sniff the traffic of your phone with Charles? Instructions are here. I want to see if the official apps are changing their parameters based on region or not.
I don't know how to do it, I installed and launch charles on my iphone but after I don't know what to do
I tried to follow up by adapting the tuto to add the plug with the charles proxy on my iphone but unfortunately, the plug doesn't want to be added with the app when charles is active
Did you install Charles' SSL certificate?
On Aug 25 2018, at 9:36 am, legolass73 notifications@github.com wrote:
I tried to follow up by adapting the tuto to add the plug with the charles proxy on my iphone but unfortunately, the plug doesn't want to be added with the app when charles is active — You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://link.getmailspring.com/link/1535330871.local-96a8b47e-a3e6-v1.4.2-f587b7b7@getmailspring.com/0?redirect=https%3A%2F%2Fgithub.com%2Fcodetheweb%2Ftuyapi%2Fissues%2F69%23issuecomment-415973458&recipient=cmVwbHkrMDA3MTEyZTU2MDQ0NTBjNDY0MjQyN2Q5MDliN2JhYzc3ZDVjZjk4ZmQ1MzIyMzAxOTJjZjAwMDAwMDAxMTc5OTJiNTg5MmExNjljZTE0Zjc1MWQ1QHJlcGx5LmdpdGh1Yi5jb20%3D), or mute the thread (https://link.getmailspring.com/link/1535330871.local-96a8b47e-a3e6-v1.4.2-f587b7b7@getmailspring.com/1?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHES5U0JzCprv20mLRhR-2rRzPmm5WpAks5uUWDYgaJpZM4WCQig&recipient=cmVwbHkrMDA3MTEyZTU2MDQ0NTBjNDY0MjQyN2Q5MDliN2JhYzc3ZDVjZjk4ZmQ1MzIyMzAxOTJjZjAwMDAwMDAxMTc5OTJiNTg5MmExNjljZTE0Zjc1MWQ1QHJlcGx5LmdpdGh1Yi5jb20%3D).
yes
Created a short survey in an attempt to collect more data, I'd appreciate it if you took it: codetheweb.typeform.com/to/rTXsWg. Thanks.
I received a note from someone who said they had a similar issue until they updated their device's firmware. Can you please try adding your device back to the app, updating the firmware, and then attempting to use the link wizard again?
Have you tried again recently? Any update?
Closing, please see https://github.com/codetheweb/tuyapi/issues/65#issuecomment-431626504.
I've created the Tuya account and obtained the ID and Key from the site.
When I go to add a device I get the following error. Device(s) failed to be registered! Error: Timed out wating for device(s) to connect to cloud at Promise (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/cloud/index.js:275:12) at
the wizard is on a Docker environment with oznu homebridge and its homebridge-config-ui-x installed via its homebridge-syno-spk package on my nas synology ds218+
I'm using this smart plug "https://www.amazon.fr/gp/product/B07BKY4QFV/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1" with the Smart Life app.
I put the switch in pairing mode but the wizard never finds it. Instantly can add it back to the Smart Life app though.
I 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?
I am French and quite bad in English, excuse me in advance for errors in pronunciation, spelling, grammar and especially comprehension.