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

New setup issues #92

Closed jpillora closed 5 years ago

jpillora commented 5 years ago

When I run the proxy server tuya-cli list-app I cannot see TLS traffic. I've added the certificate to both my mac and my iPhone. The old link way still works, though I was hoping to have it cloud registered, and have the id/key so I can control it locally as well.

Edit: I just realised this should probably go in the CLI repo...

codetheweb commented 5 years ago

Have you trusted the certificate after installing it? There are instructions for doing so in the setup guide.

On Oct 21, 2018, at 06:51, Jaime Pillora notifications@github.com wrote:

When I run the proxy server tuya-cli list-app I cannot see TLS traffic. I've added the certificate to both my mac and my iPhone. The old link way still works, though I was hoping to have it cloud registered, and have the id/key so I can control it locally as well.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jpillora commented 5 years ago

That did it! Sorry, iOS didn't have that extra step last time I needed to needed to intercept traffic from my phone.

codetheweb commented 5 years ago

Glad you got it working.

On Oct 21, 2018, at 11:21, Jaime Pillora notifications@github.com wrote:

That did it! Sorry, iOS didn't have that extra step last time I needed to needed to intercept traffic from my phone.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

EconomistAds commented 5 years ago

I'm having the same issue. @jpillora how did you resolve the issue? I tried tuya-cli link command and saw an empty object {}.

EconomistAds commented 5 years ago

So here's what I've done.

npm install -g anyproxy npm install -g @tuyapi/cli anyproxy-ca -g and enter Y to generate new rootCA.crt install rootCA.crt and trust in Keychain access tuya-cli list-app Scan the QR code and install anyproxy certificate on iPhone Set iPhone to proxy to my machine's IP on port 8001 Open localhost:8002 on my MBP browser Keep terminal window with tuya-cli list-app open to see log Open Smart Life app on iPhone

I can see some traffic to a1.tuyaeu.com but no id/key from the browser, but in terminal all it shows is "waiting for request..." and nothing else.

jpillora commented 5 years ago

Did you install, and then trust (different step) the certificate on the phone?

On Tue, 23 Oct 2018 at 7:43 am EconomistAds notifications@github.com wrote:

So here's what I've done.

npm install -g anyproxy npm install -g @tuyapi/cli anyproxy-ca -g and enter Y to generate new rootCA.crt install rootCA.crt and trust in Keychain access tuya-cli list-app Scan the QR code and install anyproxy certificate on iPhone Set iPhone to proxy to my machine's IP on port 8001 Open localhost:8002 on my MBP browser Keep terminal window with tuya-cli list-app open to see log Open Smart Life app on iPhone

I can see some traffic to a1.tuyaeu.com but no id/key from the browser, but in terminal all it shows is "waiting for request..." and nothing else.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/codetheweb/tuyapi/issues/92#issuecomment-431977648, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmr88gnnDK4H74z_klxeTewXpwDW8IKks5uni4IgaJpZM4XyZQs .

EconomistAds commented 5 years ago

I didn't trust the certificate. Done and done. Thank u for the help!

codetheweb commented 5 years ago

For anyone else who sees this, there's no need to trust/install the certificate on your computer.

Glad you were able to get it working @EconomistAds.