Closed raulchen closed 2 years ago
Hey @raulchen,
Could you please collect debug logs? You can do it by running homebridge like this:
DEBUG=miio-api* homebridge -D
@russtone Thanks for your reply. Here are the debug logs of miio-api.
[11/28/2021, 1:59:38 AM] [MiHumidifier] [192.168.2.33] Fail to get device properties. SocketError: Timeout
2021-11-28T07:59:43.148Z miio-api:192.168.2.33:le3lbzou -> { id: 3884562689, method: 'get_prop', params: [ 'OnOff_State' ] }
2021-11-28T07:59:43.149Z miio-api:192.168.2.33:le3lbzou -> Packet {
deviceId: 455782265,
timestamp: 98026,
checksum: <Buffer 44 81 78 93 54 26 f5 a9 bd d9 2b 8b c8 d4 cd 85>,
data: <Buffer 3c 6b bd 06 31 f9 72 31 07 0c ad 1a 9d 56 da 41 28 85 31 08 8a a1 12 1c d6 85 08 fd bf 1e a6 ef 12 52 f3 e5 44 21 56 3b ce c2 1d 4f 26 cf 4e 24 0c 06 ... 14 more bytes>,
unknown: 0
}
2021-11-28T07:59:43.149Z miio-api:192.168.2.33:le3lbzou #1 ->
0000 21 31 00 60 00 00 00 00 1b 2a af 79 00 01 7e ea
0010 44 81 78 93 54 26 f5 a9 bd d9 2b 8b c8 d4 cd 85
0020 3c 6b bd 06 31 f9 72 31 07 0c ad 1a 9d 56 da 41
0030 28 85 31 08 8a a1 12 1c d6 85 08 fd bf 1e a6 ef
0040 12 52 f3 e5 44 21 56 3b ce c2 1d 4f 26 cf 4e 24
0050 0c 06 d3 4e 51 8b 88 ab 5f ba 6f ec e8 0a e7 4e
2021-11-28T07:59:49.152Z miio-api:192.168.2.33:le3lbzou #2 ->
0000 21 31 00 60 00 00 00 00 1b 2a af 79 00 01 7e ea
0010 44 81 78 93 54 26 f5 a9 bd d9 2b 8b c8 d4 cd 85
0020 3c 6b bd 06 31 f9 72 31 07 0c ad 1a 9d 56 da 41
0030 28 85 31 08 8a a1 12 1c d6 85 08 fd bf 1e a6 ef
0040 12 52 f3 e5 44 21 56 3b ce c2 1d 4f 26 cf 4e 24
0050 0c 06 d3 4e 51 8b 88 ab 5f ba 6f ec e8 0a e7 4e
2021-11-28T07:59:55.155Z miio-api:192.168.2.33:le3lbzou #3 ->
0000 21 31 00 60 00 00 00 00 1b 2a af 79 00 01 7e ea
0010 44 81 78 93 54 26 f5 a9 bd d9 2b 8b c8 d4 cd 85
0020 3c 6b bd 06 31 f9 72 31 07 0c ad 1a 9d 56 da 41
0030 28 85 31 08 8a a1 12 1c d6 85 08 fd bf 1e a6 ef
0040 12 52 f3 e5 44 21 56 3b ce c2 1d 4f 26 cf 4e 24
0050 0c 06 d3 4e 51 8b 88 ab 5f ba 6f ec e8 0a e7 4e
The logs shows that device is not responding which usually related to network problems.
Could you check device using miiocli
utility?
pip3 install python-miio
miiocli device --ip <ip> --token <token> info
miiocli looks fine
Model: deerma.humidifier.jsqs
Hardware version: esp8266
Firmware version: 2.1.3
also tried this:
$ miiocli -d airhumidifierjsq --ip 192.168.2.33 --token <token> status
INFO:miio.cli:Debug mode active
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*\xafy\x00\x01\x85\xa2' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('1b2aaf79')
ts = 1970-01-02 03:42:26
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 1b2aaf79 with ts: 1970-01-02 03:42:26, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.2.33:54321 >>: {'id': 1, 'method': 'get_props', 'params': []}
DEBUG:miio.miioprotocol:192.168.2.33:54321 (ts: 1970-01-02 03:42:31, id: 1) << {'id': 1, 'error': {'code': -9999, 'message': 'user ack timeout'}, 'exe_time': 4020}
DEBUG:miio.click_common:Exception: {'code': -9999, 'message': 'user ack timeout'}
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/miio/click_common.py", line 59, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/miio/click_common.py", line 280, in wrap
kwargs["result"] = func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/miio/click_common.py", line 245, in command_callback
return miio_command.call(miio_device, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/miio/click_common.py", line 193, in call
return method(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/miio/airhumidifier_jsq.py", line 166, in status
values = self.send("get_props")
File "/usr/local/lib/python3.6/site-packages/miio/device.py", line 98, in send
command, parameters, retry_count, extra_parameters=extra_parameters
File "/usr/local/lib/python3.6/site-packages/miio/miioprotocol.py", line 214, in send
self._handle_error(payload["error"])
File "/usr/local/lib/python3.6/site-packages/miio/miioprotocol.py", line 274, in _handle_error
raise DeviceError(error)
miio.exceptions.DeviceError: {'code': -9999, 'message': 'user ack timeout'}
Error: {'code': -9999, 'message': 'user ack timeout'}
Could you try to set model to deerma.humidifier.jsq4
instead of deerma.humidifier.mjjsq
?
deerma.humidifier.jsq4
works fine. Thanks!
Your model deerma.humidifier.jsqs is slightly different from deerma.humidifier.jsq4. For the most part everything should work fine, but there is one extra speed level. I've added support for deerma.humidifier.jsqs
in the latest release 2.4.3.
I kept getting the following error when setting up this plugin with my Mijia Smart Sterilization Humidifier S. Although it says SocketError, I can confirm that the IP is reachable with ping. I also tried resetting the token, but no luck.
Here are the debug logs. There are some errors. I’m not sure if they are relative.
This is my config:
Thank you in advance!