Giter Site home page Giter Site logo

Comments (8)

puppinoo avatar puppinoo commented on September 25, 2024

Update: setting version to 3.3 made d.status work but now when I try to set DPS 1 I receive:
Dictionary {'devId': 'xxxxxxxxxxxxxx', 'dps': {'1': True, '9': 0, '18': 0, '19': 0, '20': 2333, '21': 1, '22': 595, '23': 27972, '24': 15484, '25': 1345}} state (bool, true is ON) True Traceback (most recent call last): File "tuyacmd2.py", line 12, in <module> data = d.set_status(not switch_state) # This requires a valid key File "/www/cgi-bin/protected/tuya/python-tuya/new/pytuya/__init__.py", line 329, in set_status data = self._send_receive(payload) File "/www/cgi-bin/protected/tuya/python-tuya/new/pytuya/__init__.py", line 177, in _send_receive data = s.recv(1024) ConnectionResetError: [Errno 104] Connection reset by peer

IMPORTANT: Using latest tuya-cli to set values works.

from python-tuya.

dharichandan avatar dharichandan commented on September 25, 2024

Did you resolve it ???

from python-tuya.

puppinoo avatar puppinoo commented on September 25, 2024

Yes, I implemented a retry logic found on the forum: Maybe this one. Not an ideal solution but worked.
https://github.com/clach04/python-tuya/pull/43/files/cb236da4aa38fa398f238adc1e12003e72114094..f624ef03490995c6780ffa7edccfccc9d885a3a8#diff-85460c06e57fa5b9a18b00b76b19c5bf

from python-tuya.

dharichandan avatar dharichandan commented on September 25, 2024

Hi I used the same but still not able to run device. One question -
How did you extract the deviceKey ?
I have deviceId, IP and port = 6888.
But device Key is something hard to find and my firmware is 1.0.1 does that affect way I use the library?

from python-tuya.

puppinoo avatar puppinoo commented on September 25, 2024

Hi I used the same but still not able to run device. One question -
How did you extract the deviceKey ?
I have deviceId, IP and port = 6888.
But device Key is something hard to find and my firmware is 1.0.1 does that affect way I use the library?

I used the usual procedure (proxy configured on my celphone + tuya-cli on my linux pc) BUT I had to:

  1. Install older Smart Life app on my android phone (3.12.6 version. Find on the web) and disable updates on google play for this app
  2. Disable ipv6 on my ubuntu pc
  3. Disable data on my cellular.

Without these steps nothing worked. With them I have been able to extract the keys.

Regards.

from python-tuya.

dharichandan avatar dharichandan commented on September 25, 2024

Thanks. I will try it out. But here are you capturing packets ? Or do you have any link for step by step procedure to setup tuya-cli and also extract keys?

This is something I found -
https://github.com/TuyaAPI/cloud

from python-tuya.

puppinoo avatar puppinoo commented on September 25, 2024

Thanks. I will try it out. But here are you capturing packets ? Or do you have any link for step by step procedure to setup tuya-cli and also extract keys?

This is something I found -
https://github.com/TuyaAPI/cloud

https://www.apkmirror.com/apk/tuya-inc/smart-life-smart-living/smart-life-smart-living-3-12-6-release/smart-life-smart-living-3-12-6-android-apk-download/

https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md

from python-tuya.

puppinoo avatar puppinoo commented on September 25, 2024

you need the "Linking a Tuya Device with MITM (deprecated)"

from python-tuya.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.