homebridge-tuya-lan icon indicating copy to clipboard operation
homebridge-tuya-lan copied to clipboard

New Kogan Smart Plug (Kaspemha) can’t find ID

Open ErikVeland opened this issue 5 years ago • 24 comments

Having perused some threads here I’ve installed the latest rc (12 as of now), followed the instructions to a tee, reinstalled the certificate and yet the only message I get running tuya-lan-find and tuya-lan-find --schema is "Intercepted certificate request”.

In the Tuya Smart App I’ve succesfully added the plug, but when I run the app with the proxy enabled the app complains “Network is unavailable, please check the network” and nothing shows up in Terminal.

Had no problems installing my previous plugs from the same place. Although I used anyproxy with that, which also doesn’t seem to get any messages from the app.

ErikVeland avatar Nov 01 '19 04:11 ErikVeland

No help with this one? They look identical (same model) as my previous two I bought a year ago, which I had no problems getting the ID off :/

ErikVeland avatar Nov 05 '19 09:11 ErikVeland

What app have you got the devices in

Sent with GitHawk

TheHomekitWayFinder avatar Nov 05 '19 09:11 TheHomekitWayFinder

I can connect it both to TuyaSmart and to the Kogan branded Tuya app “Smarter Home”.

ErikVeland avatar Nov 05 '19 10:11 ErikVeland

Follow the instructions on https://github.com/AMoo-Miki/homebridge-tuya-lan/wiki/Setup-Instructions Proxy IP: 10.0.0.88 Proxy Port: 8080

Error: undefined [Error: 4488428992:error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_srvr.c:1663: ]

…but that could be from other protocols on my iPhone trying to connect? There’s nothing from refreshing the Tuya app, or force closing and reopening. I can turn the light on and off using the app whilst connected to the proxy as well.

ErikVeland avatar Nov 05 '19 10:11 ErikVeland

If you open what ever app you’re using then click on the device and go into the more tab and then click device information and then you should find your device ID in ghere

Sent with GitHawk

TheHomekitWayFinder avatar Nov 05 '19 10:11 TheHomekitWayFinder

That gets me half way there. How can I use that to get the key?

ErikVeland avatar Nov 05 '19 10:11 ErikVeland

Could this be an SSL mismatch between Catalina 10.15.1, iOS 13.2 and tuya-lan-find somehow?

ErikVeland avatar Nov 05 '19 10:11 ErikVeland

Had a brainwave that my wifi autoswitches from 5Ghz to 2.4Ghz based on your device, so switched both phone and Mac to a 2.4Ghz WiFi only. Still no dice.

Getting no output from tuya-home-lan and Tuya smart app on the iPhone just complains about “Network is unavailable, please check the network” regardless of refreshing all devices, or going to Device Information. Check Device Network reports that everything is normal with the Device and its signal. And can turn it off and on as before.

ErikVeland avatar Nov 05 '19 10:11 ErikVeland

Back on the unproxied network:

Check for Firmware Upgrade: Wi-Fi Module 1.0.3 MCU Module 1.0.3

The virtual ID is 00343721 and then the MAC address

ErikVeland avatar Nov 05 '19 11:11 ErikVeland

Have you made sure that you have granted the certificate full access as I hadn’t done that when I was getting my keys and therefore it wouldn’t work

Sent with GitHawk

TheHomekitWayFinder avatar Nov 05 '19 13:11 TheHomekitWayFinder

One other thing is to make sure nothing is open apart from settings when you’re setting it up and then close settings before opening TuyaSmart or Kogan Smarterhome as this will minimise the amount of trash you get. Also as soon as the plugin detects the ID and key the plugin will automatically stop searching. Be patient as it can take about 15 seconds for the info to be detected once the TuyaSmart app has been opened

Sent with GitHawk

TheHomekitWayFinder avatar Nov 05 '19 14:11 TheHomekitWayFinder

Have you made sure that you have granted the certificate full access as I hadn’t done that when I was getting my keys and therefore it wouldn’t work

On the iPhone? I can go to certificates, and even into it but there’s no further access I can grant it that I can see.

ErikVeland avatar Nov 07 '19 08:11 ErikVeland

It’s under General > about > certificate trust settings which is located at the bottom

Sent with GitHawk

TheHomekitWayFinder avatar Nov 09 '19 05:11 TheHomekitWayFinder

Champion!

Sent from my iPhone

On 9 Nov 2019, at 15:32, TheHomekitWayFinder [email protected] wrote:

 It’s under General > about > certificate trust settings which is located at the bottom

Sent with GitHawk

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

ErikVeland avatar Nov 09 '19 05:11 ErikVeland

Did that work

Sent with GitHawk

TheHomekitWayFinder avatar Nov 09 '19 06:11 TheHomekitWayFinder

Sigh. Even with the trusted root certificate. Either network with manual proxy Tuya Smart app still complains about Network is unavailable, please check the network. Nothing shows up in tuya-lan-find except Error: undefined [Error: 4470922688:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:299: ]

Tried adding a new device, but still nothing.

ErikVeland avatar Nov 10 '19 03:11 ErikVeland

FINALLY! I had to reinstall the certificate. I probably didn’t have the latest one on my phone after installing the latest rc.

ErikVeland avatar Nov 10 '19 03:11 ErikVeland

So did you get it working

Sent with GitHawk

TheHomekitWayFinder avatar Nov 10 '19 06:11 TheHomekitWayFinder

Sure did. Thanks!

Sent from my iPhone

On 10 Nov 2019, at 16:53, TheHomekitWayFinder [email protected] wrote:

 So did you get it workibg

Sent with GitHawk

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

ErikVeland avatar Nov 10 '19 08:11 ErikVeland

I worked around this issue by installing AppStore++ on a jailbroken device and downgraded the app to get the id and key.

tom-23 avatar Jan 06 '20 18:01 tom-23

I am still having this issue. I have tried it on my iPhone XS with latest OS.

Tuya app just won't update and gives network error.

Interesting thought... I am running my own a VM on a Raspberry Pi.. could that be the issue.

daven1985 avatar Feb 19 '20 09:02 daven1985

I am also having a similar problem. Running tuya-lan-find on a Pi4 w/ Raspbian GNU/Linux 10 and running Tuya Smart on an iPhone 11 iOS 13.3.1 and getting :- Error: ERR_SSL_WRONG_VERSION_NUMBER [Error: 3069471184:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355: ] { library: 'SSL routines', function: 'ssl3_get_record', reason: 'wrong version number', code: 'ERR_SSL_WRONG_VERSION_NUMBER' }

Any help would be greatly appreciated.

lukemackinnon75 avatar Feb 29 '20 12:02 lukemackinnon75

I have also similar issue. Error: ERR_SSL_UNSUPPORTED_PROTOCOL [Error: 140434724980608:error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_srvr.c:1686: ] { library: 'SSL routines', function: 'tls_early_post_process_client_hello', reason: 'unsupported protocol', code: 'ERR_SSL_UNSUPPORTED_PROTOCOL' }

alexpad16 avatar Jun 20 '21 22:06 alexpad16

Pretty sure this is due to Tuya app now pinning ssl certs, related issue https://github.com/AMoo-Miki/homebridge-tuya-lan/issues/142

nickd-beemit avatar Nov 03 '22 13:11 nickd-beemit