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

Mi Air Purifier 3H - unable to connect #836

Closed
Fietspomp86 opened this issue Oct 14, 2020 · 3 comments
Closed

Mi Air Purifier 3H - unable to connect #836

Fietspomp86 opened this issue Oct 14, 2020 · 3 comments
Labels

Comments

@Fietspomp86
Copy link

Describe the bug
Just bought an air purifier, a 3H.
Using the russing Mi Home, managed to set it up and extract the token.
When trying to connect to it, i get the following:

miiocli -d airpurifiermiot --token xxxxxxxxxxxxxxxxxxxxx--ip 192.168.2.xx status
INFO:miio.cli:Debug mode active
DEBUG:miio.miioprotocol:Unable to discover a device at address 192.168.2.xx
DEBUG:miio.click_common:Exception: Unable to discover the device 192.168.2.xx
Traceback (most recent call last):
  File "/home/xxxxx/.local/lib/python3.7/site-packages/miio/click_common.py", line 59, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/xxxxxx/.local/lib/python3.7/site-packages/miio/click_common.py", line 280, in wrap
    kwargs["result"] = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/xxxxx/.local/lib/python3.7/site-packages/miio/click_common.py", line 245, in command_callback
    return miio_command.call(miio_device, *args, **kwargs)
  File "/home/xxxxx/.local/lib/python3.7/site-packages/miio/click_common.py", line 193, in call
    return method(*args, **kwargs)
  File "/home/xxxxx/.local/lib/python3.7/site-packages/miio/airpurifier_miot.py", line 300, in status
    for prop in self.get_properties_for_mapping()
  File "/home/xxxxxx/.local/lib/python3.7/site-packages/miio/miot_device.py", line 30, in get_properties_for_mapping
    properties, property_getter="get_properties", max_properties=15
  File "/home/xxxxxx/.local/lib/python3.7/site-packages/miio/device.py", line 232, in get_properties
    values.extend(self.send(property_getter, _props[:max_properties]))
  File "/home/xxxxxx/.local/lib/python3.7/site-packages/miio/device.py", line 147, in send
    command, parameters, retry_count, extra_parameters=extra_parameters
  File "/home/xxxxxx/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 160, in send
    self.send_handshake()
  File "/home/xxxxxx/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 87, in send_handshake
    raise DeviceException("Unable to discover the device %s" % self.ip)
miio.exceptions.DeviceException: Unable to discover the device 192.168.2.xx
Error: Unable to discover the device 192.168.2.xx

Version information (please complete the following information):

  • OS: Ubuntu 18.04.5 LTS
  • python-miio: miiocli, version 0.5.3

Device information:
If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token>]:

  • Model: Air Purifier 3H, Mi Home shows zhimi.airpurifier.mb3
  • Hardware version: ??
  • Firmware version: 2.0.5.0014

I also have a Xiaomi Vacuum, and this I can see with the miiocli. Could someone point me in the right direction how-to debug/fix this issue?

@rytilahti
Copy link
Owner

Unable to discover means that the device is not responding to the initial handshake, which should be responded by all devices even when you don't know the token.

You could try mirobo discover --handshake 1 to check if the device is responding to the handshake, but if not, there is something wrong in your network connectivity or at device (or that'd be my guess, at least).

@Fietspomp86 Fietspomp86 changed the title Mi Air Purifier 3H - unable to conect Mi Air Purifier 3H - unable to connect Oct 15, 2020
@Fietspomp86
Copy link
Author

Ok, thanks for the reply.
Searched through the troubleshooting guide and found it's because the purifier isn't on the same subnet.
Moved it to the same subnet to test and still didn't work, don't know why though.
So I moved it back to the VLAN and I found a Unifi config which I applied, now it works!

Here's the code for anybody searching:

				"5010": {
					"description": "HASS",
					"destination": {
						"address": "192.168.2.0/24"
					},
					"log": "disable",
					"outbound-interface": "eth1.2",
					"protocol": "all",
					"source": {
						"address": "192.168.1.0/24"
					},
					"type": "masquerade"
				},	

@pfrenssen
Copy link

I was also unable to connect, but my device was on the same subnet. In my case I was able to connect after update the firmware to the latest version 2.0.5.0017 through the Mi Home app.

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