Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WizLightTimeOutError #89

Closed
stodgysam opened this issue Oct 12, 2021 · 7 comments
Closed

WizLightTimeOutError #89

stodgysam opened this issue Oct 12, 2021 · 7 comments
Assignees
Labels

Comments

@stodgysam
Copy link

Hello, I have been using this library to control my light. I tried to use it today and I am getting a time out error. Here is the full text: raise WizLightTimeOutError("The request to the bulb timed out")
pywizlight.exceptions.WizLightTimeOutError: The request to the bulb timed out

I updated the package and checked that I could still discover the light. I can still see it in my network, but I cannot control it.

@mozilla2012
Copy link

mozilla2012 commented Oct 19, 2021

This is affecting me too. I'm wondering if the bulbs updated and they broke it. I'm on firmware 1.24.0, and this started for me just a day or two ago; not a full 7 days ago.

Edit: Apparently 1.24.0 is new as of roughly the day this post was created.
Definitely seems suspect. https://m.apkpure.com/wiz/com.tao.wiz/versions

I'm not sure if we can roll back to the previous firmware or not.

@sbidy
Copy link
Owner

sbidy commented Oct 19, 2021

A rollback of the FW is not possible. But I saw one of my bulbs have a 1.25.1 FW.
I'll check if any function was changed while this update.

Can you provide the failed function call (stack trace) or is no connection at all possible?

@sbidy sbidy self-assigned this Oct 19, 2021
@sbidy sbidy added the Bug ??? label Oct 19, 2021
@mozilla2012
Copy link

Here's the error I see:

Oct 19 20:57:07 : Task exception was never retrieved
Oct 19 20:57:07 : future: <Task finished name='Task-71' coro=<DatagramClient.send() done, defined at /usr/local/lib/python3.8/dist-packages/asyncio_dgram/aio.py:128> exception=ConnectionRefusedError(111, 'Connection refused')>
Oct 19 20:57:07 : Traceback (most recent call last):
Oct 19 20:57:07 :   File "/usr/local/lib/python3.8/dist-packages/asyncio_dgram/aio.py", line 132, in send
Oct 19 20:57:07 :     await super().send(data)
Oct 19 20:57:07 :   File "/usr/local/lib/python3.8/dist-packages/asyncio_dgram/aio.py", line 94, in send
Oct 19 20:57:07 :     _ = self.exception
Oct 19 20:57:07 :   File "/usr/local/lib/python3.8/dist-packages/asyncio_dgram/aio.py", line 52, in exception
Oct 19 20:57:07 :     raise exc
Oct 19 20:57:07 :   File "/usr/lib/python3.8/asyncio/selector_events.py", line 1011, in _read_ready
Oct 19 20:57:07 :     data, addr = self._sock.recvfrom(self.max_size)
Oct 19 20:57:07 : ConnectionRefusedError: [Errno 111] Connection refused
Oct 19 20:57:08 : Task exception was never retrieved
Oct 19 20:57:08 : future: <Task finished name='Task-73' coro=<DatagramClient.send() done, defined at /usr/local/lib/python3.8/dist-packages/asyncio_dgram/aio.py:128> exception=ConnectionRefusedError(111, 'Connection refused')>
Oct 19 20:57:08 : Traceback (most recent call last):
Oct 19 20:57:08 :   File "/usr/local/lib/python3.8/dist-packages/asyncio_dgram/aio.py", line 132, in send
Oct 19 20:57:08 :     await super().send(data)
Oct 19 20:57:08 :   File "/usr/local/lib/python3.8/dist-packages/asyncio_dgram/aio.py", line 94, in send
Oct 19 20:57:08 :     _ = self.exception
Oct 19 20:57:08 :   File "/usr/local/lib/python3.8/dist-packages/asyncio_dgram/aio.py", line 52, in exception
Oct 19 20:57:08 :     raise exc
Oct 19 20:57:08 :   File "/usr/lib/python3.8/asyncio/selector_events.py", line 1011, in _read_ready
Oct 19 20:57:08 :     data, addr = self._sock.recvfrom(self.max_size)
Oct 19 20:57:08 : ConnectionRefusedError: [Errno 111] Connection refused

Thanks for hopping on this so fast!

@sbidy
Copy link
Owner

sbidy commented Oct 20, 2021

Mh, it seems to be a connection error on the network stack and not on the UDP-Interface of the bulb.
To decouple these, please try to send a "nc" (raw network - nc is a tool for Linux/Mac) command to the bulb:
echo '{"method":"getSystemConfig","env":"dev","params":{}}' | nc -u -w 1 <theIPofYourBulb> 38899

This should return something like this:

{
    "method": "getSystemConfig",
    "env": "pro",
    "result": {
        "mac": "a8bb50xxxxx",
        "homeId": 4228671,
        "roomId": 6402395,
        "rgn": "eu",
        "moduleName": "ESP01_SHRGB_03",
        "fwVersion": "1.24.0",
        "groupId": 0,
        "drvConf": [
            20,
            2
        ],
        "ping": 0
    }
}

If you get a connection error, the bulb is not reliably connected to the Wi-Fi.
Maybe you can move the bulb closer to an access point.

@mozilla2012
Copy link

mozilla2012 commented Oct 21, 2021

That works:

{
  "method": "getSystemConfig",
  "env": "pro",
  "result": {
    "mac": "a8bb50cxxxxx",
    "homeId": 1913756,
    "roomId": 2859747,
    "rgn": "eu",
    "moduleName": "ESP03_SHRGB1W_01",
    "fwVersion": "1.24.0",
    "groupId": 0,
    "ping": 0
  }
}

Still getting connection errors though 😢

@sbidy
Copy link
Owner

sbidy commented Oct 24, 2021

In my test, I can't reproduce this error. What version of the lib you are using?

@mozilla2012
Copy link

Well I figured it out.

I have three wiz lights. Apparently the IP address of two of them changed.
I just coincidentally ran getSystemConfig on the one that didn't change IP addresses.

I thought I had those set as static.

I apologize for wasting your time and sending you on this wild goose chase! I appreciate your comments; I love this library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants