Giter Site home page Giter Site logo

socket timeout error about python-tuya HOT 15 CLOSED

clach04 avatar clach04 commented on June 23, 2024
socket timeout error

from python-tuya.

Comments (15)

clach04 avatar clach04 commented on June 23, 2024

@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.

Minichota avatar Minichota commented on June 23, 2024

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.

Minichota avatar Minichota commented on June 23, 2024

@clach04 I've also unplugged the device and replugged it.

from python-tuya.

clach04 avatar clach04 commented on June 23, 2024

@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.

Minichota avatar Minichota commented on June 23, 2024

So are you saying that I should run it through the setup.md example you gave again? @clach04

from python-tuya.

Minichota avatar Minichota commented on June 23, 2024

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.

clach04 avatar clach04 commented on June 23, 2024

@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.

Minichota avatar Minichota commented on June 23, 2024

@clach04 Do you mean to do this if I wasn't able to extract the information?

from python-tuya.

clach04 avatar clach04 commented on June 23, 2024

@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.

Minichota avatar Minichota commented on June 23, 2024

@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.

Minichota avatar Minichota commented on June 23, 2024

@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.

clach04 avatar clach04 commented on June 23, 2024

@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.

Minichota avatar Minichota commented on June 23, 2024

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.

clach04 avatar clach04 commented on June 23, 2024

@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.

codetheweb avatar codetheweb commented on June 23, 2024

@clach04 by the way, the old setup instructions can be found here.

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.