AMoo-Miki / homebridge-tuya-lan

Homebridge plugin for IoT devices that use Tuya Smart's platform
MIT License
204 stars 51 forks source link

Teckin Smart Plug SP23 connection issue #178

Open nbaosullivan opened 4 years ago

nbaosullivan commented 4 years ago

After switching to use the Ucomen Home app I was able to retrieve the id and key needed. The accessory is now discovered which is great, but it is unresponsive. Here is the output from the logs after it connecting and manually switching it on and off a few times.

[Homebridge] [3/14/2020, 10:24:21 AM] [TuyaLan] Connected to TV
[Homebridge] [TuyaAccessory] Odd message from TV with command 8: { cmd: 8, data: "`AëÊ©\u000eÖ³'€·î\bp8Þ" }
[Homebridge] [TuyaAccessory] Odd message from TV with command 8: { cmd: 8, data: 'HY•Wx}©2\u0006¢l\u0016÷\u0018\tc' }
[Homebridge] [TuyaAccessory] Odd message from TV with command 8: { cmd: 8, data: '7.r³äyo•Œ®ùeDJøA' }
[Homebridge] [TuyaAccessory] Socket had a problem and will reconnect to TV (ECONNRESET)
[Homebridge] [TuyaAccessory] Closed connection with TV

I also created the test files mentioned here: https://github.com/AMoo-Miki/homebridge-tuya-lan/issues/23#issuecomment-473127112 and here's the output from that:

1584202872532 Connecting ...
1584202872683 Socket connected
1584202872707 Socket ready
1584202873720 Sending handshake...
1584202873831 ----
 U�
,���D`#�gԯK�ܕ^��YE1�Q.9�H�^��b�U
----
1584202903942 Socket error Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:205:27) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
}
1584202904000 Socket closed: true

Do you have any suggestions on how to resolve this? Thanks for your great work on this project 💪

edbramwell commented 4 years ago

The Ucomen home app has now been updated. You can install the older (working version) 1.1.2, by jailbreaking or alternatively download an android emulator and install the apk that way.