ct-Open-Source / tuya-convert

A collection of scripts to flash Tuya IoT devices to alternative firmwares
MIT License
4.67k stars 502 forks source link

Neo Coolcam Smoke detector #919

Open SM-26 opened 3 years ago

SM-26 commented 3 years ago

Hello folks!

I'm trying to flash my Neo Coolcam smoke detector. I was using the Smart life app, but for some reason I can't connect to it anymore, so I thought I'd switch FW.

Setup is RPI4 - running 32 bit 2021-01-11-raspios-buster-armhf. I did Raspi-config to set up wifi.

Using my Android 11 Xiaomi Mi6 I've got into the vtrust-flash AP.

Set my IoT into fast blinking mode.

but got stuck at:

SmartConfig complete.
Auto retry in 1s. ...............................................................................................................
Timed out while waiting for the device to (re)connect

I've looked at all of the logs, but honestly I don't understant what I'm even looking for any help would be much appreciated Thanks in advanced.

/scripts/Logs: smarthack-mqtt.log:

1613741170: mosquitto version 1.5.7 starting
1613741170: Using default config.
1613741170: Opening ipv4 listen socket on port 1883.
1613741170: Opening ipv6 listen socket on port 1883.
1613741180: New connection from 10.42.42.1 on port 1883.
1613741180: New client connected from 10.42.42.1 as 38037867d8bfc0dc8c3c (c1, k60, u'38037867d8bfc0dc8c3c').
1613741180: No will message specified.
1613741180: Sending CONNACK to 38037867d8bfc0dc8c3c (0, 0)
1613741180: Received SUBSCRIBE from 38037867d8bfc0dc8c3c
1613741180:     smart/device/in/38037867d8bfc0dc8c3c (QoS 0)
1613741180: 38037867d8bfc0dc8c3c 0 smart/device/in/38037867d8bfc0dc8c3c
1613741180: Sending SUBACK to 38037867d8bfc0dc8c3c
1613741198: New connection from 10.42.42.1 on port 1883.
1613741198: Client 38037867d8bfc0dc8c3c already connected, closing old connection.
1613741198: Socket error on client 38037867d8bfc0dc8c3c, disconnecting.
1613741198: New client connected from 10.42.42.1 as 38037867d8bfc0dc8c3c (c1, k60, u'38037867d8bfc0dc8c3c').
1613741198: No will message specified.
1613741198: Sending CONNACK to 38037867d8bfc0dc8c3c (0, 0)
1613741198: Received SUBSCRIBE from 38037867d8bfc0dc8c3c
1613741198:     smart/device/in/38037867d8bfc0dc8c3c (QoS 0)
1613741198: 38037867d8bfc0dc8c3c 0 smart/device/in/38037867d8bfc0dc8c3c
1613741198: Sending SUBACK to 38037867d8bfc0dc8c3c
1613741207: New connection from 127.0.0.1 on port 1883.
1613741207: New client connected from 127.0.0.1 as b5ca2932-d955-471b-bc73-29b9ea2d2785 (c1, k60).
1613741207: No will message specified.
1613741207: Sending CONNACK to b5ca2932-d955-471b-bc73-29b9ea2d2785 (0, 0)
1613741207: Received PUBLISH from b5ca2932-d955-471b-bc73-29b9ea2d2785 (d0, q0, r0, m0, 'smart/device/in/38037867d8bfc0dc8c3c', ... (111 bytes))
1613741207: Sending PUBLISH to 38037867d8bfc0dc8c3c (d0, q0, r0, m0, 'smart/device/in/38037867d8bfc0dc8c3c', ... (111 bytes))
1613741207: Received DISCONNECT from b5ca2932-d955-471b-bc73-29b9ea2d2785
1613741207: Client b5ca2932-d955-471b-bc73-29b9ea2d2785 disconnected.
1613741288: Client 38037867d8bfc0dc8c3c has exceeded timeout, disconnecting.
1613741288: Socket error on client 38037867d8bfc0dc8c3c, disconnecting.
^C1613741304: mosquitto version 1.5.7 terminating
1613741431: mosquitto version 1.5.7 starting
1613741431: Using default config.
1613741431: Opening ipv4 listen socket on port 1883.
1613741431: Opening ipv6 listen socket on port 1883.
1613741438: New connection from 10.42.42.1 on port 1883.
1613741438: New client connected from 10.42.42.1 as 38037867d8bfc0dc8c3c (c1, k60, u'38037867d8bfc0dc8c3c').
1613741438: No will message specified.
1613741438: Sending CONNACK to 38037867d8bfc0dc8c3c (0, 0)
1613741438: Received SUBSCRIBE from 38037867d8bfc0dc8c3c
1613741438:     smart/device/in/38037867d8bfc0dc8c3c (QoS 0)
1613741438: 38037867d8bfc0dc8c3c 0 smart/device/in/38037867d8bfc0dc8c3c
1613741438: Sending SUBACK to 38037867d8bfc0dc8c3c
1613741454: New connection from 10.42.42.1 on port 1883.
1613741454: Client 38037867d8bfc0dc8c3c already connected, closing old connection.
1613741454: Socket error on client 38037867d8bfc0dc8c3c, disconnecting.
1613741454: New client connected from 10.42.42.1 as 38037867d8bfc0dc8c3c (c1, k60, u'38037867d8bfc0dc8c3c').
1613741454: No will message specified.
1613741454: Sending CONNACK to 38037867d8bfc0dc8c3c (0, 0)
1613741454: Received SUBSCRIBE from 38037867d8bfc0dc8c3c
1613741454:     smart/device/in/38037867d8bfc0dc8c3c (QoS 0)
1613741454: 38037867d8bfc0dc8c3c 0 smart/device/in/38037867d8bfc0dc8c3c
1613741454: Sending SUBACK to 38037867d8bfc0dc8c3c
1613741463: New connection from 127.0.0.1 on port 1883.
1613741463: New client connected from 127.0.0.1 as fb45f20d-43d2-4262-b8e4-45158a55502c (c1, k60).
1613741463: No will message specified.
1613741463: Sending CONNACK to fb45f20d-43d2-4262-b8e4-45158a55502c (0, 0)
1613741463: Received PUBLISH from fb45f20d-43d2-4262-b8e4-45158a55502c (d0, q0, r0, m0, 'smart/device/in/38037867d8bfc0dc8c3c', ... (111 bytes))
1613741463: Sending PUBLISH to 38037867d8bfc0dc8c3c (d0, q0, r0, m0, 'smart/device/in/38037867d8bfc0dc8c3c', ... (111 bytes))
1613741463: Received DISCONNECT from fb45f20d-43d2-4262-b8e4-45158a55502c
1613741463: Client fb45f20d-43d2-4262-b8e4-45158a55502c disconnected.
1613741467: New connection from 10.42.42.1 on port 1883.
1613741467: Client 38037867d8bfc0dc8c3c already connected, closing old connection.
1613741467: Socket error on client 38037867d8bfc0dc8c3c, disconnecting.
1613741467: New client connected from 10.42.42.1 as 38037867d8bfc0dc8c3c (c1, k60, u'38037867d8bfc0dc8c3c').
1613741467: No will message specified.
1613741467: Sending CONNACK to 38037867d8bfc0dc8c3c (0, 0)
1613741467: Received SUBSCRIBE from 38037867d8bfc0dc8c3c
1613741467:     smart/device/in/38037867d8bfc0dc8c3c (QoS 0)
1613741467: 38037867d8bfc0dc8c3c 0 smart/device/in/38037867d8bfc0dc8c3c
1613741467: Sending SUBACK to 38037867d8bfc0dc8c3c
1613741558: Client 38037867d8bfc0dc8c3c has exceeded timeout, disconnecting.
1613741558: Socket error on client 38037867d8bfc0dc8c3c, disconnecting.
^C1613741712: mosquitto version 1.5.7 terminating

smarthack-psk.log:

new client on port 443 from 10.42.42.36:40529
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40533
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40541
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40543
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40549
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40551
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40553
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40555
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40557
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40559
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40561
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40565
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40569
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40575
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40581
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40583
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 8886 from 10.42.42.23:16832
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.23:7452
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.23:20247
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.23:8517
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.36:40589
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.23:15559
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 8886 from 10.42.42.23:36821
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.23:48510
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.36:40591
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40593
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40595
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40599
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40601
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40603
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40609
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40611
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40613
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40615
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40619
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40621
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40623
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40625
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40627
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40629
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40631
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40633
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40635
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40637
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40639
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40643
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40645
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40649
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40651
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
^CTraceback (most recent call last):
  File "./psk-frontend.py", line 113, in <module>
    main()
  File "./psk-frontend.py", line 106, in main
    r,_,_ =  select.select(readables, [], [])
KeyboardInterrupt
new client on port 443 from 10.42.42.36:40679
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40683
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40685
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40687
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40693
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40695
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40699
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 8886 from 10.42.42.23:17131
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.23:12126
ID: 0142416f68626d643f3f3f3f3f3f3f3f3fb47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
Prefix: b'BAohbmd?????????'
PSK: 476e5acf842796850b947112067167eee4e40b2869268348f8c1880aebfc1e4a
new client on port 443 from 10.42.42.36:40705
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.23:8933
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.36:40707
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40709
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40713
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40715
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.23:11113
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.36:40717
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.23:1552
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 8886 from 10.42.42.23:62737
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.23:31779
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.36:40723
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 8886 from 10.42.42.23:49621
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.23:17893
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.36:40727
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.23:63580
ID: 0142416f68626d64366147393149465231b47311471b7cfa9833d392ea8e7911295f1ac9df9873d10c056a707ab28c9f81b7
PSK: 35df0c21754d9fefea90b357177da9c0ba178601d0513943442c3aa7a58ac53c
new client on port 443 from 10.42.42.36:40729
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40731
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40733
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40737
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40739
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40741
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40743
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40745
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40747
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40749
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40753
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40755
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40757
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40759
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40761
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40763
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40765
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40767
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40771
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40777
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40779
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40781
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40783
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40785
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40787
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40791
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40793
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40795
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40797
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40799
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40801
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40803
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40805
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40807
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40811
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
new client on port 443 from 10.42.42.36:40813
could not establish sslpsk socket: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1056)
don't panic this is probably just your phone!
^CTraceback (most recent call last):
  File "./psk-frontend.py", line 113, in <module>
    main()
  File "./psk-frontend.py", line 106, in main
    r,_,_ =  select.select(readables, [], [])
KeyboardInterrupt

smarthack-udp.log:

Listening for Tuya broadcast on UDP 6666
Listening for encrypted Tuya broadcast on UDP 6667
^CListening for Tuya broadcast on UDP 6666
Listening for encrypted Tuya broadcast on UDP 6667
^C

smarthack-web.log:

Listening on 10.42.42.1:80
[I 210219 15:26:11 web:2243] 302 GET /generate_204 (10.42.42.36) 1.70ms
[I 210219 15:26:11 web:2243] 302 GET /gslb/?ver=4.0&type=wifi&uuid=0&list=app.chat.global.xiaomi.net%2Cresolver.msg.global.xiaomi.net&countrycode=US&sdkver=39&osver=30&os=MI%206%3Aeng.enderh.20210122.122535&mi=0&key=3554eb735fad8c2586722f9bdef1fdb5 (10.42.42.36) 2.55ms
[I 210219 15:26:11 web:2243] 200 GET /?ver=4.0&type=wifi&uuid=0&list=app.chat.global.xiaomi.net%2Cresolver.msg.global.xiaomi.net&countrycode=US&sdkver=39&osver=30&os=MI+6%3Aeng.enderh.20210122.122535&mi=0&key=3554eb735fad8c2586722f9bdef1fdb5 (10.42.42.36) 1.88ms
[I 210219 15:26:15 web:2243] 200 GET / (10.42.42.36) 1.89ms
[I 210219 15:26:15 web:2243] 302 GET /favicon.ico (10.42.42.36) 1.75ms
[I 210219 15:26:15 web:2243] 302 GET /generate_204 (10.42.42.36) 2.06ms
[I 210219 15:26:15 web:2243] 304 GET / (10.42.42.36) 1.63ms
[I 210219 15:26:15 web:2243] 302 GET /generate_204 (10.42.42.36) 2.08ms

POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=1&v=1.0&sign=b795c424121b2899448b119118f78b3c
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 0

Answer tuya.device.dynamic.config.get
reply {"result":"fn8oBaEAaJe3I+enO7OkYdd0LkD9WHnY6k8vmvctrJaNmLK/1/0SJKDAKqebJ1fA9F2VBmqNqTqJcWuiX4YubK0jdNw1NzB7iTgqJHbkAKu7mevrGF2WUpAllBDW/Q5l","t":1613741180,"sign":"5abaf8a0d65c4e4d"}
[I 210219 15:26:20 web:2243] 200 POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=1&v=1.0&sign=b795c424121b2899448b119118f78b3c (10.42.42.1) 3.80ms

POST /gw.json?a=s.gw.reset&et=1&gwId=38037867d8bfc0dc8c3c&t=1613741181&sign=8209983d3a2497e2eb822e180d3987ff
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 0

Answer generic (s.gw.reset)
reply {"result":"JqgC3KcL+PhFfrJ6QVst1qG4qLNFM0vre1xUly6JQv2FXmAf4muUZeCPnR1XSN8u","t":1613741182,"sign":"594b8c64bf5c8f2d"}
[I 210219 15:26:22 web:2243] 200 POST /gw.json?a=s.gw.reset&et=1&gwId=38037867d8bfc0dc8c3c&t=1613741181&sign=8209983d3a2497e2eb822e180d3987ff (10.42.42.1) 3.63ms

GET /gw.json?a=s.gw.token.get&et=1&gwId=38037867d8bfc0dc8c3c&other={"token":"00000000","region":"US","tlinkStat":{"configure":"smartconfig","time":2,"source":"ap","path":"multicast"}}&t=4&v=3.0&sign=69bcc1a6a37916ddad433bf3db1bd8a5
Host: a3.tuyaus.com
User-Agent: ESP8266SDK
Connection: keep-alive

Answer s.gw.token.get
reply {"t":1613741196,"e":false,"success":true,"result":{"gwApiUrl":"http://10.42.42.1/gw.json","stdTimeZone":"-05:00","mqttRanges":"","timeZone":"-05:00","httpsPSKUrl":"https://10.42.42.1/gw.json","mediaMqttUrl":"10.42.42.1","gwMqttUrl":"10.42.42.1","dstIntervals":[],"mqttsUrl":"10.42.42.1","mqttsPSKUrl":"10.42.42.1","mediaMqttsUrl":"10.42.42.1","aispeech":"10.42.42.1"}}
[I 210219 15:26:36 web:2243] 200 GET /gw.json?a=s.gw.token.get&et=1&gwId=38037867d8bfc0dc8c3c&other={"token":"00000000","region":"US","tlinkStat":{"configure":"smartconfig","time":2,"source":"ap","path":"multicast"}}&t=4&v=3.0&sign=69bcc1a6a37916ddad433bf3db1bd8a5 (10.42.42.1) 57.74ms

POST /gw.json?a=s.gw.dev.pk.active&et=1&gwId=38037867d8bfc0dc8c3c&other={"token":"00000000"}&t=5&v=3.0&sign=9556f95870c2a53df200d3c376796dfa
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 549

payload 698139C263471229AD011567526A7F4406300BCC81374A31F59A18C7F1E8A2DB03864071B28DC8313D273F68D23A022BED1E7ED2DC9DFE3FEE8D6D3333DDD4089A7777935CFDD0DC2DA570CA35B21880E6B4C51D617C2D864CA8EB7B8C5E86557532BE1FB162960AB7D0D5E0F43BE40F228F6B96F9DA7265BF779EB9B1DF9695BCD9363F7F4F98971D2794A17A1BF5CD192DFFC8D5B0F7A8484367042B1639BE98B8B5F8716605848004DD353528FDEE3F0840F0F720C8DED2A0A49C2599F27B856B2DD0E5B28921CB2CAC30D9A4F4F3338AE3F3F47498F57B7C5FEAD5C58AC6D589EF885FDD0A3BEF731F2E840AD817CBA7B57D5EE9B23A6CAB5745E5A43A490894B86FFA962F6DCDA35A674A89C6B2
Answer s.gw.dev.pk.active
reply {"t":1613741196,"e":false,"success":true,"result":{"schema":"[{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"}]","uid":"00000000000000000000","devEtag":"0000000000","secKey":"0000000000000000","schemaId":"0000000000","localKey":"0000000000000000"}}
TRIGGER UPGRADE IN 10 SECONDS
[I 210219 15:26:36 web:2243] 200 POST /gw.json?a=s.gw.dev.pk.active&et=1&gwId=38037867d8bfc0dc8c3c&other={"token":"00000000"}&t=5&v=3.0&sign=9556f95870c2a53df200d3c376796dfa (10.42.42.1) 27.72ms

POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=6&v=1.0&sign=a53ea73e188068e20611a1f3cb4c6c6c
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 0

Answer tuya.device.dynamic.config.get
reply {"result":"fn8oBaEAaJe3I+enO7OkYdd0LkD9WHnY6k8vmvctrJYGIsZVV+lELRTgUllczDoZ9F2VBmqNqTqJcWuiX4YubGLvWf9V8E+87n/cFplw+Ki7mevrGF2WUpAllBDW/Q5l","t":1613741198,"sign":"502bebbeda55853f"}
[I 210219 15:26:38 web:2243] 200 POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=6&v=1.0&sign=a53ea73e188068e20611a1f3cb4c6c6c (10.42.42.1) 4.82ms
encoding {"data":{"gwId":"38037867d8bfc0dc8c3c"},"protocol":15,"s":"1523715","t":"1613741207"} using protocol 2.2
b'2.2\xb5\xa2\x08\xd974120710\xb7\x98\xa7\x08\xc0\xc7\xa5\xc2JB\x9c_9\xed\x91m\n\x07\xe9+\x83U{7\xab\x1b\xf4W\xe1\n\x06\xea\xe6\xc1\xd0\xd5\xe5d\xa8\xce\xec{j\x9b\x07 \xd2\xb9\x91\xfa\xef\xd4\xa8\xffL\x1a\xef\x01\r\x8e\xbd\xf5EL\x19\x0c\xf467\x0e\xb9\x7f\x08\xf4(\x1exI\xce\xdeIT\x87\n6\xf3I\xd7\xabzlS\xdc\xc8w\t'
^CReceived SIGINT, exiting...
Listening on 10.42.42.1:80
[I 210219 15:30:31 web:2243] 302 GET /generate_204 (10.42.42.36) 1.45ms
[I 210219 15:30:33 web:2243] 200 GET / (10.42.42.36) 2.39ms
[I 210219 15:30:33 web:2243] 302 GET /favicon.ico (10.42.42.36) 1.52ms
[I 210219 15:30:33 web:2243] 304 GET / (10.42.42.36) 1.62ms
[I 210219 15:30:33 web:2243] 302 GET /generate_204 (10.42.42.36) 1.90ms
[I 210219 15:30:33 web:2243] 302 GET /generate_204 (10.42.42.36) 1.91ms

POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=1&v=1.0&sign=b795c424121b2899448b119118f78b3c
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 0

Answer tuya.device.dynamic.config.get
reply {"result":"fn8oBaEAaJe3I+enO7OkYdd0LkD9WHnY6k8vmvctrJbKK6yMIgPsgY0Fthks2FkZ9F2VBmqNqTqJcWuiX4YubIDtOB2GS8E1av56zLU9kze7mevrGF2WUpAllBDW/Q5l","t":1613741438,"sign":"b250acdfc8c1a5d9"}
[I 210219 15:30:38 web:2243] 200 POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=1&v=1.0&sign=b795c424121b2899448b119118f78b3c (10.42.42.1) 4.13ms

POST /gw.json?a=s.gw.reset&et=1&gwId=38037867d8bfc0dc8c3c&t=1613741439&sign=4e453880aefaf8a3acff9eb65ef1ce85
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 0

Answer generic (s.gw.reset)
reply {"result":"JqgC3KcL+PhFfrJ6QVst1mm24+RrxxExlwu/9+r/HX2FXmAf4muUZeCPnR1XSN8u","t":1613741440,"sign":"e67eb3ca0ee2337c"}
[I 210219 15:30:40 web:2243] 200 POST /gw.json?a=s.gw.reset&et=1&gwId=38037867d8bfc0dc8c3c&t=1613741439&sign=4e453880aefaf8a3acff9eb65ef1ce85 (10.42.42.1) 4.00ms

GET /gw.json?a=s.gw.token.get&et=1&gwId=38037867d8bfc0dc8c3c&other={"token":"00000000","region":"US","tlinkStat":{"configure":"smartconfig","time":2,"source":"ap","path":"multicast"}}&t=4&v=3.0&sign=69bcc1a6a37916ddad433bf3db1bd8a5
Host: a3.tuyaus.com
User-Agent: ESP8266SDK
Connection: keep-alive

Answer s.gw.token.get
reply {"t":1613741452,"e":false,"success":true,"result":{"gwApiUrl":"http://10.42.42.1/gw.json","stdTimeZone":"-05:00","mqttRanges":"","timeZone":"-05:00","httpsPSKUrl":"https://10.42.42.1/gw.json","mediaMqttUrl":"10.42.42.1","gwMqttUrl":"10.42.42.1","dstIntervals":[],"mqttsUrl":"10.42.42.1","mqttsPSKUrl":"10.42.42.1","mediaMqttsUrl":"10.42.42.1","aispeech":"10.42.42.1"}}
[I 210219 15:30:52 web:2243] 200 GET /gw.json?a=s.gw.token.get&et=1&gwId=38037867d8bfc0dc8c3c&other={"token":"00000000","region":"US","tlinkStat":{"configure":"smartconfig","time":2,"source":"ap","path":"multicast"}}&t=4&v=3.0&sign=69bcc1a6a37916ddad433bf3db1bd8a5 (10.42.42.1) 61.26ms

POST /gw.json?a=s.gw.dev.pk.active&et=1&gwId=38037867d8bfc0dc8c3c&other={"token":"00000000"}&t=5&v=3.0&sign=9556f95870c2a53df200d3c376796dfa
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 549

payload 698139C263471229AD011567526A7F4406300BCC81374A31F59A18C7F1E8A2DB03864071B28DC8313D273F68D23A022BED1E7ED2DC9DFE3FEE8D6D3333DDD4089A7777935CFDD0DC2DA570CA35B21880E6B4C51D617C2D864CA8EB7B8C5E86557532BE1FB162960AB7D0D5E0F43BE40F228F6B96F9DA7265BF779EB9B1DF9695BCD9363F7F4F98971D2794A17A1BF5CD192DFFC8D5B0F7A8484367042B1639BE98B8B5F8716605848004DD353528FDEE3F0840F0F720C8DED2A0A49C2599F27B856B2DD0E5B28921CB2CAC30D9A4F4F3338AE3F3F47498F57B7C5FEAD5C58AC6D589EF885FDD0A3BEF731F2E840AD817CBA7B57D5EE9B23A6CAB5745E5A43A490894B86FFA962F6DCDA35A674A89C6B2
Answer s.gw.dev.pk.active
reply {"t":1613741453,"e":false,"success":true,"result":{"schema":"[{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"},{\"mode\":\"rw\",\"property\":{\"type\":\"bool\"},\"id\":1,\"type\":\"obj\"}]","uid":"00000000000000000000","devEtag":"0000000000","secKey":"0000000000000000","schemaId":"0000000000","localKey":"0000000000000000"}}
TRIGGER UPGRADE IN 10 SECONDS
[I 210219 15:30:53 web:2243] 200 POST /gw.json?a=s.gw.dev.pk.active&et=1&gwId=38037867d8bfc0dc8c3c&other={"token":"00000000"}&t=5&v=3.0&sign=9556f95870c2a53df200d3c376796dfa (10.42.42.1) 31.96ms

POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=6&v=1.0&sign=a53ea73e188068e20611a1f3cb4c6c6c
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 0

Answer tuya.device.dynamic.config.get
reply {"result":"fn8oBaEAaJe3I+enO7OkYdd0LkD9WHnY6k8vmvctrJb2VxAtBKZTEhsFHJR2ns+E9F2VBmqNqTqJcWuiX4YubK0bq0kGro25yWOuLA9ZGQO7mevrGF2WUpAllBDW/Q5l","t":1613741454,"sign":"93a177a3f94813b3"}
[I 210219 15:30:54 web:2243] 200 POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=6&v=1.0&sign=a53ea73e188068e20611a1f3cb4c6c6c (10.42.42.1) 4.92ms
encoding {"data":{"gwId":"38037867d8bfc0dc8c3c"},"protocol":15,"s":"1523715","t":"1613741463"} using protocol 2.2
b'2.2q$\xccj74146365\xb7\x98\xa7\x08\xc0\xc7\xa5\xc2JB\x9c_9\xed\x91m\n\x07\xe9+\x83U{7\xab\x1b\xf4W\xe1\n\x06\xea\xe6\xc1\xd0\xd5\xe5d\xa8\xce\xec{j\x9b\x07 \xd2\xb9\x91\xfa\xef\xd4\xa8\xffL\x1a\xef\x01\r\x8e\xbd\xf5EL\x19\x0c\xf467\x0e\xb9\x7f\x08\xf4(\x1exI\xce\xden\x97\xe1\xa4L\xad\xa8\xb3\xda\x87\xf2\xa4\x8a\xca\x94\n'

POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=2&v=1.0&sign=d1b1dcb67b5c1b1d2507f897c80bca6e
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 0

Answer tuya.device.dynamic.config.get
reply {"result":"fn8oBaEAaJe3I+enO7OkYdd0LkD9WHnY6k8vmvctrJZbLAiiOz6D8ndKxYu0CBIw9F2VBmqNqTqJcWuiX4YubPETNqzmxph5s0/XG9+LZ1q7mevrGF2WUpAllBDW/Q5l","t":1613741467,"sign":"49bb82edfade1687"}
[I 210219 15:31:07 web:2243] 200 POST /gw.json?a=tuya.device.dynamic.config.get&et=1&gwId=38037867d8bfc0dc8c3c&t=2&v=1.0&sign=d1b1dcb67b5c1b1d2507f897c80bca6e (10.42.42.1) 3.45ms

POST /gw.json?a=s.gw.reset&et=1&gwId=38037867d8bfc0dc8c3c&t=1613741467&sign=2f2f2dc8ae44accc24d6432f857971b4
Host: 10.42.42.1
User-Agent: ESP8266SDK
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 0

Answer generic (s.gw.reset)
reply {"result":"JqgC3KcL+PhFfrJ6QVst1mNFulV0AJkTlYIsLZ3EvH+FXmAf4muUZeCPnR1XSN8u","t":1613741468,"sign":"599433ab144d8ebf"}
[I 210219 15:31:08 web:2243] 200 POST /gw.json?a=s.gw.reset&et=1&gwId=38037867d8bfc0dc8c3c&t=1613741467&sign=2f2f2dc8ae44accc24d6432f857971b4 (10.42.42.1) 3.87ms
^CReceived SIGINT, exiting...

smarthack-wifi.log:

System info
===========
61ba060
Linux raspberrypi 5.10.16-v7l+ #1402 SMP Tue Feb 16 14:12:18 GMT 2021 armv7l GNU/Linux
OpenSSL 1.1.1d  10 Sep 2019
Dnsmasq version 2.80  Copyright (c) 2000-2018 Simon Kelley
Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile

This software comes with ABSOLUTELY NO WARRANTY.
Dnsmasq is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2 or 3.
hostapd v2.8-devel
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2019, Jouni Malinen <j@w1.fi> and contributors
Python 3.7.3
===========
Configuring AP interface...
RTNETLINK answers: File exists
RTNETLINK answers: File exists
Starting DNSMASQ server...
Starting AP on wlan0...
Configuration file: /dev/stdin
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr dc:a6:32:9e:08:73 and ssid "vtrust-flash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
wlan0: AP-STA-CONNECTED 7e:d3:c7:ca:f5:ca
wlan0: AP-STA-CONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-DISCONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-CONNECTED d8:bf:c0:dc:8c:3c
wlan0: interface state ENABLED->DISABLED
wlan0: AP-STA-DISCONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-DISCONNECTED 7e:d3:c7:ca:f5:ca
wlan0: AP-DISABLED 
wlan0: CTRL-EVENT-TERMINATING 
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
AP closed
Stopping DNSMASQ server...
System info
===========
61ba060
Linux raspberrypi 5.10.16-v7l+ #1402 SMP Tue Feb 16 14:12:18 GMT 2021 armv7l GNU/Linux
OpenSSL 1.1.1d  10 Sep 2019
Dnsmasq version 2.80  Copyright (c) 2000-2018 Simon Kelley
Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile

This software comes with ABSOLUTELY NO WARRANTY.
Dnsmasq is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2 or 3.
hostapd v2.8-devel
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2019, Jouni Malinen <j@w1.fi> and contributors
Python 3.7.3
===========
Configuring AP interface...
RTNETLINK answers: File exists
RTNETLINK answers: File exists
Starting DNSMASQ server...
Starting AP on wlan0...
Configuration file: /dev/stdin
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr dc:a6:32:9e:08:73 and ssid "vtrust-flash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
wlan0: AP-STA-CONNECTED 7e:d3:c7:ca:f5:ca
wlan0: AP-STA-CONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-DISCONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-CONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-DISCONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-CONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-DISCONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-CONNECTED d8:bf:c0:dc:8c:3c
wlan0: AP-STA-DISCONNECTED d8:bf:c0:dc:8c:3c
wlan0: interface state ENABLED->DISABLED
wlan0: AP-STA-DISCONNECTED 7e:d3:c7:ca:f5:ca
wlan0: AP-DISABLED 
wlan0: CTRL-EVENT-TERMINATING 
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
AP closed
Stopping DNSMASQ server...
kueblc commented 3 years ago

Hi @SM-26

Thanks for taking the time to post your logs for review.

It looks like it's getting stuck at the Tuya firmware configuration step. This is where the device expects to receive schema information, but due to the fact we have to support a large variety of devices, we send a generic schema instead.

Have you tried the process multiple times? You may want to try with a fresh instance of start_flash.sh. The first connection attempt by any given device will receive a short schema, and subsequent attempts will try a different schema.

SM-26 commented 3 years ago

Hello @kueblc

I've tried to repeat it several times, here is what I did.

  1. clean the logs.
  2. run script (in sudo).
  3. after the first "SmartConfig complete." (about 10 seconds in) the fast blinking stops. then I get time out error.
  4. When asked if I want to flash another device, I type Y
  5. then on the second try, I get a bit ferther,
    SmartConfig complete.
    Resending SmartConfig Packets
    .................................................
  6. tried again, now got only to step 2.
  7. when asked again, I said no.
  8. re ran the script again - this time without sudo.

I've tried again to look at the logs, can't understand what's going on. sorry

Logs: (hope it's ok that I just dragged them here) smarthack-udp (1).log smarthack-wifi (1).log smarthack-psk (1).log smarthack-mqtt (1).log smarthack-web (1).log

SM-26 commented 3 years ago

I've thought maybe I'd give Docker way a try

image

I must be doing something wrong here.

SM-26 commented 3 years ago

if there is anything more I can contribute?

I feel like the device is turning off just after the initial pairing, and would not stay on for the duration of the flashing. am I close?

SM-26 commented 3 years ago

Would tuya cconvert over work on sonoff s26? That way I could maybe try another device?