homebridge-mi-humidifier icon indicating copy to clipboard operation
homebridge-mi-humidifier copied to clipboard

Fail to get device properties. SocketError: Timeout

Open mirunamd opened this issue 2 years ago • 6 comments

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 avatar Mar 04 '22 17:03 mirunamd

[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

mirunamd avatar Mar 04 '22 21:03 mirunamd

Any solution to this?

sivolagt avatar Mar 26 '22 12:03 sivolagt

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

mirunamd avatar Apr 10 '22 20:04 mirunamd

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.

MoienBowen avatar May 04 '22 15:05 MoienBowen

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 avatar Dec 02 '23 10:12 loktissimo

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.

loktissimo avatar Dec 02 '23 15:12 loktissimo