Comments (8)
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.
Did you resolve it ???
from python-tuya.
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.
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.
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:
- 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
- Disable ipv6 on my ubuntu pc
- Disable data on my cellular.
Without these steps nothing worked. With them I have been able to extract the keys.
Regards.
from python-tuya.
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.
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://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md
from python-tuya.
you need the "Linking a Tuya Device with MITM (deprecated)"
from python-tuya.
Related Issues (20)
- Logo Design Offer as Open Source Contribution HOT 1
- Logging is blocked when pytuya is imported HOT 1
- Web version
- BHT-6000 Thermostat (Decrypt) HOT 3
- dps status
- Vaccum Cleaner HOT 1
- ImportError: No module named 'pytuya' HOT 4
- Tuya 3.3 version support HOT 9
- Cannot use module, OutletDevice method does not exist HOT 2
- Support for curtain switch HOT 2
- Smart Life / Jinvoo request latest release installed HOT 1
- Error when changing color on the light
- Tuya App 2.8 No Longer Valid
- 7.0.4 release on PyPI HOT 2
- new switches different port HOT 3
- PIR & Door/Window Sensor Support? HOT 4
- Get Device Local Key HOT 1
- 7.0.6 release HOT 2
- socket.timeout: timed out
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-tuya.