Comments (15)
@Minichota is this tuyapi issue 57 - codetheweb/tuyapi#57 ? If so I'm going to hazard a guess that something has that device open already (codetheweb/tuyapi#57 (comment) indicates that maybe the phone app has it open).
This is one of those "common knowledge" things where we know the devices can only handle one active connection at a time but to know this you either need to have been burnt by this or read alot of the history comments on issues in this and the https://github.com/codetheweb/tuyapi/issues/ project (codetheweb/tuyapi#5 has a ton of information). This has sparked me to create a FAQ page in the wiki. I just need to get this into an entry there https://github.com/clach04/python-tuya/wiki/FAQ :-)
from python-tuya.
well, I'm quite sure that the device isn't connected to by multiple things as when the indicator light is blinking it is disconnected.
from python-tuya.
@clach04 I've also unplugged the device and replugged it.
from python-tuya.
@Minichota if the device light is blinking, then the device is not on the network. This project expect the device to already be provisioned and on the network. I'm guessing this isn't working with https://github.com/codetheweb/tuyapi/ either?
from python-tuya.
So are you saying that I should run it through the setup.md example you gave again? @clach04
from python-tuya.
I also haven't tried to use the other tuya api as I don't have a compiler for that language to my knowledge.
from python-tuya.
@Minichota you mean "Key extraction", yes. You'll need to provision on your network and extract the key (using your preferred method). Unfortunately it looks like the guide I linked to was updated 6 days ago to do provisioning with the CLI tool so you either need to install Node to follow the current guide or read the older guide https://github.com/codetheweb/tuyapi/blob/9c835da1139a3436f43b359b86abeb3529ae90a1/docs/SETUP.md
from python-tuya.
@clach04 Do you mean to do this if I wasn't able to extract the information?
from python-tuya.
@Minichota I don't understand the question. If the light is blinking that means its not connected to the network and its entered provisioning mode. I've updated https://github.com/clach04/python-tuya/wiki and copied the old readme.
From your description it sounds like you need to provision the device. This will change any key(s) you may have already extracted.
from python-tuya.
@clach04 I have connected to it using the 'old' method you posted and I have fixed the blinking light issue and its simply when I run the example you provide in the README I get a socket.timeout error as I pasted above. I have access to the all the data from the key extraction and it should technically be connected so I'm not sure.
from python-tuya.
@clach04 If I up the connection timeout to 50 seconds, I get this error: TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
from python-tuya.
@Minichota assuming the sample was updated with:
- IP address
- device id
- secret key
then this suggests the machine you are running the python script is not on the same network as the wifi device. Can you ping the device?
EDIT or the phone app still has a connection open in the background.
from python-tuya.
Pinging 68.47.15.118 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 68.47.15.118:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
from python-tuya.
@Minichota so definitely a network problem. I'll close this down. If its any consolation I had a similar problem once. I was super tired 😴 and my laptop connected to an open WiFi network and I couldn't work out why I couldn't access any devices on my LAN!
from python-tuya.
@clach04 by the way, the old setup instructions can be found here.
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
- d.status timeout with a just bought device HOT 8
- 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.