AMoo-Miki / homebridge-tuya-lan

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

Add New Device - Smart Switch #112

Open sebcastrov opened 4 years ago

sebcastrov commented 4 years ago

Hi I tried to add this device as a outlet and os not working

image

{ "name": "Portátil", "type": "Outlet", "manufacturer": "SmartLife", "model": "SCW NF101", "id": "xx", "key": "zz"

}

That's my config, the log shows that it can discover it and connect to

[10/31/2019, 7:48:01 PM] [TuyaLan] Discovered Portátil (xx) [10/31/2019, 7:48:01 PM] [TuyaLan] Connected to Portátil

But when performing any action on home app (the app appears) not doing anything or showing as No Answer

also I got odd 8 when performing action on tuya app

[TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: '4s.E\u0019\b~>NÂùM¡<«ö' } [TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: 'þI.3\u0016\u0002»ÙyßÀ' } [TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: 'þI.3\u0016\u0002»ÙyßÀ' } [TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: 'àÙì\u0016#¢\u001d%\u0003¯drm' } [TuyaAccessory] Odd message from Cafetera with command 8: { cmd: 8, data: '£¹\wH\u0006Oô:r~' } [TuyaAccessory] Odd message from Cafetera with command 8: { cmd: 8, data: '\u000eÇn:XÔqk1\b|\u000f{ê' } [TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: '¢Ë\u0000ñ\u0000iöóe\u001d4lM³·' } [TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: '\u000eìñ\u0003lÓ@Ü\u000b.H9\u0004' } [TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: "#U³t\u0003^s«j«'6" } [TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: '\u001d¡êb¸;=p=£þѵ¨b£' } [TuyaAccessory] Odd message from Portátil with command 8: { cmd: 8, data: '¿ö2lCÑ\u001aks©u õùì' }

thanks!!

codyc1515 commented 4 years ago

You may need to try the latest version by running the following command: npm i -g homebridge-tuya-lan@rc

Odd message tends to indicate this issue.

sebcastrov commented 4 years ago

Ok I'll try that I also got this before, forgot to add:

Socket had a problem and will reconnect to Cafetera (ECONNRESET) [TuyaAccessory] Sending first query to Cafetera (3.2) [TuyaAccessory] Malformed update from Cafetera with command 10: json obj data unvalid [TuyaAccessory] Raw update from Cafetera (3.2) with command 10: 000055aa000000000000000a00000021000000016a736f6e206f626a206461746120756e76616c6964d25378690000aa55 [TuyaAccessory] Socket had a problem and will reconnect to Cafetera (ECONNRESET) [TuyaAccessory] Sending first query to Cafetera (3.2) [TuyaAccessory] Malformed update from Cafetera with command 10: json obj data unvalid [TuyaAccessory] Raw update from Cafetera (3.2) with command 10: 000055aa000000000000000a00000021000000016a736f6e206f626a206461746120756e76616c6964d25378690000aa55 [TuyaAccessory] Socket had a problem and will reconnect to Cafetera (ECONNRESET) [TuyaAccessory] Sending first query to Cafetera (3.2) [TuyaAccessory] Malformed update from Cafetera with command 10: json obj data unvalid [TuyaAccessory] Raw update from Cafetera (3.2) with command 10: 000055aa000000000000000a00000021000000016a736f6e206f626a206461746120756e76616c6964d25378690000aa55 [TuyaAccessory] Socket had a problem and will reconnect to Cafetera (ECONNRESET) [TuyaAccessory] Sending first query to Cafetera (3.2) [TuyaAccessory] Malformed update from Cafetera with command 10: json obj data unvalid [TuyaAccessory] Raw update from Cafetera (3.2) with command 10: 000055aa000000000000000a00000021000000016a736f6e206f626a206461746120756e76616c6964d25378690000aa55 [TuyaAccessory] Socket had a problem and will reconnect to Cafetera (ECONNRESET) [TuyaAccessory] Sending first query to Cafetera (3.2) [TuyaAccessory] Malformed update from Cafetera with command 10: json obj data unvalid [TuyaAccessory] Raw update from Cafetera (3.2) with command 10: 000055aa000000000000000a00000021000000016a736f6e206f626a206461746120756e76616c6964d25378690000aa55 [TuyaAccessory] Socket had a problem and will reconnect to Cafetera (ECONNRESET) [TuyaAccessory] Sending first query to Cafetera (3.2) [TuyaAccessory] Malformed update from Cafetera with command 10: json obj data unvalid [TuyaAccessory] Raw update from Cafetera (3.2) with command 10: 000055aa000000000000000a00000021000000016a736f6e206f626a206461746120756e76616c6964d25378690000aa55 [TuyaAccessory] Socket had a problem and will reconnect to Cafetera (ECONNRESET)

sebcastrov commented 4 years ago

Ok, applied the update and got this as HB starts:

[11/6/2019, 7:02:03 PM] [TuyaLan] Discovered Cafetera (eb042a752fc4242de7tzfe) identified as Outlet (3.2) [11/6/2019, 7:02:03 PM] [TuyaLan] Connected to Cafetera [TuyaAccessory] Sending first query to Cafetera (3.2) [TuyaAccessory] Malformed update from Cafetera with command 10: json obj data unvalid [TuyaAccessory] Raw update from Cafetera (3.2) with command 10: 000055aa000000000000000a00000021000000016a736f6e206f626a206461746120756e76616c6964d25378690000aa55

TheHomekitWayFinder commented 4 years ago

Have you tried getting the key again and also tried setting the switch as a different device type

Sent with GitHawk

sebcastrov commented 4 years ago

Key didn't changed, just checked also tried as light and not working