Mi Connector and Xiaomi

I have the mi connector setup on a pi but when try to install the app on Hubitat I get the following error message

unable to resolve class physicalgraph.device.HubAction @ line 106, column 23. unable to resolve class physicalgraph.device.HubAction @ line 337, column 23. unable to resolve class physicalgraph.device.HubResponse @ line 344, column 18. unable to resolve class physicalgraph.device.HubAction @ line 366, column 23. unable to resolve class physicalgraph.device.HubResponse @ line 766, column 21.

Is this the right app for Hubitat?
https://raw.githubusercontent.com/fison67/mi_connector/master/smartapps/fison67/mi-connector.src/mi-connector.groovy

No - you have installed the ST version. Look in his github for the link to the hubitat git.

1 Like

Tried but can't find the right one. Do you mind posting the link.

Use the Hubitat-specific link in @Royski's opening post of this thread. Also added it below:

2 Likes

Is it possible to implement this on my RPI without a Xiaomi/Aqara hub? I saw the part in the instructions about not requiring a hub if Zigbee devices were not being added (I only have a Roborock vacuum and a Mi Flora plant sensor).

Possibly if the devices are wifi etc. TBH, I have never added any in that way, so I'm not 100%.

Cheers
Does it only allow one way communication, i.e from Xiaomi gateway to Hubitat or can I control Xiaomi gateway from Hubitat as well?

@Royski is correct. You will need a xiaomi hub if you want connect things like their sensors/switches etc. For other (wifi) devices you can link to them as long as they are in the list of compatible devices on the authors github (your roborock should be fine if it is one of the supported ones) and on the same subnet as your pi. Also note that the docker images seem to be more up to date than the git versions so bear this in mind if things don't work.

I have mine connected no problem to a xiaomi purifier.

1 Like

Does anyone know if someone is maintaining these? I would love to be able to tell my roborock to clean a specific room as defined in their app. I imagine there is a way since we can in the app, but I wouldn't know where to start with updating the drivers myself!

Hi, I am trying to use a xiaomi power plug to measure the power being used so that I know if an appliance is being used or not.
I am using mi connector for sending events to my Hubitat Hub which works fine for the switch being on or off but the power usage property is not changing regularly or at least infrequently.
Has anyone else experienced this? Notice in the image below how the switch is set to 'off' but the power still says 44.88 instead of 0.

thanks

image

Well dang... I went through these steps: installed mi-connector on UNRAID, set up smartthings smartapps (graph.api.smartthings.com), set up mariadb on UNRAID, retrieved my token for my vacuum (https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor) and put it into mi connector docker...

then found out my vacuum isn't on the list of devices (Roborock E4). Honestly I had forgot which vacuum I actually had and went along with this anyways. I assumed I had the S5, which is listed but not tested on the documentation (https://github.com/fison67/mi_connector/tree/hubitat#documentation).

Oh well. I was really looking forward to integrating my vacuum with hubitat. Maybe my next vacuum...

I was a user of MiConnector for Hubitat, mainly for Xioami WiFi devices (my zigbee network is pretty solid and I have around 20 Aqara zigbee devices directly paired with Hubitat), until.... I switched to Home Assistant.

I have now all Xiaomi Wifi devices in Home Assistant, and thanks to the great smart app Home Assistant Device Bridge all Home Assistant devices integrated on my Hubitat Elevation. Home Assistant has a step learning curve, but once you manage the basics, it will become your primary system in concert with HE.

You may also want to try that if you have some spare time!!

I was a user of MiConnector for Hubitat, mainly for Xioami WiFi devices (my zigbee network is pretty solid and I have around 20 Aqara zigbee devices directly paired with Hubitat), until.... I switched to Home Assistant.

I have now all Xiaomi Wifi devices in Home Assistant, and thanks to the great smart app Home Assistant Device Bridge all Home Assistant devices integrated on my Hubitat Elevation. Home Assistant has a step learning curve, but once you manage the basics, it will become your primary system in concert with HE.

You may also want to try that if you have some spare time!!

1 Like

Hi, I am having some trouble getting my Xiaomi Air Purifier 3H paired with HE via Mi-Connector running on QNAP docker. If you don't mind, I have a few questions, to the point:

First of all, I have most of the setup up & running:
So far, I have been only cloud managing the Purifier with my Android Mi-Home app, the account is set to Romania.
I've installed and configured the fison67.latest Mi-Connector (for ST & HE) and MariaDB dockers on the QNAP, from Container Station's list .
Also, I've managed to get its token and manually add the Purifier in Mi Connector's web interface.
On the HE, I have manually added Mi-Connector (fison67) v0.0.3 (github) to the Apps and set its "server address"&port to the Mi-Connector web server, therefore linking the "management" button in HE to the Mi-Connector's web interface, but no devices in "remote device mapping".
That's about all, no changing Android Mi-Home app to Chinese, no Xiaomi Hub in the setup.

  1. I've noticed you mentioning the Xiaomi hub...do I also need one in my setup?
  2. In the Mi-Connector Settings menu, I've noticed the section "Smartthings Settings". Are there other specific HE versions, or is this one adapted to work with HE? If so, what should I define under "app_url", "app_id" and "access_token"?
  3. How should HE behave upon success? Should I be able to see the Xiaomi Air Purfier under "remote device mapping" list in HE Mi-Connector app and then carry on further?

Thanks for your patience and hope to hear from you

Have a good day

Yes. Even though your device is a WiFi device, this particular setup queries the Mijia/Aqara hub for Xiaomi devices to be seen and therefore used within Hubitat. This is truy even for even devices that use the Xiaomi-cloud.

1 Like

For devices supported by mi connector a xiaomi hub isn't needed - I believe the purifier 3 pro is supported (but don't quote me) and the HE device driver will also need to be installed from the github.

This is your HE Maker APi URL/ID/token. You need this to link your purifier to the mi-connector instance running on your QNAP.

1 Like

Sorry but I don't have any experience of those devices :expressionless:

Thanks but can you elaborate a little on the reason? Could my "particularity" be that my Air-Purifier, model 3H, or mb3, is not explicitly supported by fison67's mi-connector?

Further research showed that my air-purifier, exact model mb3 is, in fact, NOT explicitly supported by fison67's Mi-Connector:
supported
If this is the case, are there any workarounds? Or is this the reason I need the Xiaomi hub?
Under this new light, I am now uncertain of the actual status of my air-purifier in the mi-connector instance. Although I am able to see it in the "Xiaomi devices" list and receive its status notifications:


,if I try to Register it from the "Add Device [ST]" menu, I get the following error messages in the mi-connector console:

Is this still the incompatibility issue or is it because I hadn't setup the correct Maker-API details in Mi-Connector instance yet?
On that note, I'm not sure I've configured everything in the HE Maker API either: I've only done so far as choosing the fison67 Purifier from the devices list and getting its full details, alongside the local URL's:
http://192.168.1.191/apps/api/729/devices/[Device ID]?access_token=....
On the Mi-Connector QNAP instance, I've tried to fit in these details and local URL's in the "App_URL", "App_Id" and "token" fields in the Settings/Smartthings section, but all the combinations failed the test.
Could someone advise on how to setup both HE Maker-API and its Mi-Connector details?