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

Fail to get device properties. SocketError: Timeout #111

Open
mirunamd opened this issue Mar 4, 2022 · 6 comments
Open

Fail to get device properties. SocketError: Timeout #111

mirunamd opened this issue Mar 4, 2022 · 6 comments

Comments

@mirunamd
Copy link

mirunamd commented Mar 4, 2022

I'm having an issue with my deerma.humidifier.jsq5. In the home bridge logs I can see lots of Fail to get device properties. SocketError: Timeout.

What I tried:

  1. Ping the IP address, 0% packet loss.
  2. miiocli -d airhumidifierjsq --ip <ip> --token <token> status
INFO:miio.cli:Debug mode active
DEBUG:miio.click_common:Unknown model, trying autodetection. None None
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x1b\x16\xa5\xec\x00\x00,\xc9' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('1b16a5ec')
            ts = 1970-01-01 03:11:05
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 1b16a5ec with ts: 1970-01-01 03:11:05, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.1.25:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 3
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x1b\x16\xa5\xec\x00\x00,\xce' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('1b16a5ec')
            ts = 1970-01-01 03:11:10
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 1b16a5ec with ts: 1970-01-01 03:11:10, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.1.25:54321 >>: {'id': 102, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 2
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x1b\x16\xa5\xec\x00\x00,\xd3' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('1b16a5ec')
            ts = 1970-01-01 03:11:15
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 1b16a5ec with ts: 1970-01-01 03:11:15, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.1.25:54321 >>: {'id': 203, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 1
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x1b\x16\xa5\xec\x00\x00,\xd8' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('1b16a5ec')
            ts = 1970-01-01 03:11:20
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 1b16a5ec with ts: 1970-01-01 03:11:20, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.1.25:54321 >>: {'id': 304, 'method': 'miIO.info', 'params': []}
ERROR:miio.miioprotocol:Got error when receiving: timed out
DEBUG:miio.click_common:Exception: No response from the device
Traceback (most recent call last):
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/miioprotocol.py", line 193, in send
    data, addr = s.recvfrom(4096)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/miioprotocol.py", line 193, in send
    data, addr = s.recvfrom(4096)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/miioprotocol.py", line 193, in send
    data, addr = s.recvfrom(4096)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/miioprotocol.py", line 193, in send
    data, addr = s.recvfrom(4096)
socket.timeout: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/click_common.py", line 51, in __call__
    return self.main(*args, **kwargs)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/click_common.py", line 300, in wrap
    kwargs["result"] = func(*args, **kwargs)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/click_common.py", line 265, in command_callback
    return miio_command.call(miio_device, *args, **kwargs)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/click_common.py", line 212, in call
    return method(*args, **kwargs)
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/click_common.py", line 178, in _wrap
    self._fetch_info()
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/device.py", line 149, in _fetch_info
    devinfo = DeviceInfo(self.send("miIO.info"))
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/device.py", line 103, in send
    return self._protocol.send(
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/miioprotocol.py", line 233, in send
    return self.send(
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/miioprotocol.py", line 233, in send
    return self.send(
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/miioprotocol.py", line 233, in send
    return self.send(
  File "/Users/mirunad/.pyenv/versions/3.8.2/lib/python3.8/site-packages/miio/miioprotocol.py", line 241, in send
    raise DeviceException("No response from the device") from ex
miio.exceptions.DeviceException: No response from the device
Error: No response from the device

Regarding unknown model, mine is a deerma.humidifier.jsq5 as shown by mii discover. Full name: DEERMA-HUMIDIFIER-JSQ5_MIAPCE00.

  1. s/ deerma.humidifier.jsq5 with deerma.humidifier.mjjsq, deerma.humidifier.jsq, deerma.humidifier.jsq[1-4] in the config
@mirunamd mirunamd changed the title miio.exceptions.DeviceException: No response from the device Fail to get device properties. SocketError: Timeout Mar 4, 2022
@mirunamd
Copy link
Author

mirunamd commented Mar 4, 2022

[04/03/2022, 21:36:02] [homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[04/03/2022, 21:36:02] [homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Relative Humidity Humidifier Threshold': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[04/03/2022, 21:36:02] [homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[04/03/2022, 21:36:02] [homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[04/03/2022, 21:36:09] [homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[04/03/2022, 21:36:09] [homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Relative Humidity Humidifier Threshold': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[04/03/2022, 21:36:09] [homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[04/03/2022, 21:36:09] [homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[04/03/2022, 21:36:16] [MiHumidifier] [192.168.1.25] Fail to get device properties. SocketError: Timeout

@sivolagt
Copy link

Any solution to this?

@mirunamd
Copy link
Author

I didn't find any workaround. Waiting on an update from the plugin developers.

@MoienBowen
Copy link

MoienBowen commented May 4, 2022

Same here Fail to get device properties. SocketError: Timeout and This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
zhimi.humidifier.ca4 with new firmware 2.2.4.0017
Even with this error message, I can still turn on/off the humidifier, and the humidity, water level, fan speed are all correct.

@loktissimo
Copy link

Same here:
[homebridge-mi-humidifier] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
[MiHumidifier] [192.168.10.215] Fail to get device properties. SocketError: Timeout

IP, token all correct, ping good.
I have 2 humidifiers:

  1. zhimi.humidifier.ca1 - all working fine
  2. deerma.humidifier.mjjsq - started to show connection timeout

I've tried with no luck - reset humidifier and updated token, updated homebridge and plugin, checked metwork multiple times.

@loktissimo
Copy link

2. deerma.humidifier.mjjsq - started to show connection timeout

Mi problem solved by selecting model deerma.humidifier.jsqs settings for deerma.humidifier.jsqm device !!!
use miiocli for debuging.

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

No branches or pull requests

4 participants