Xiaomi Mi IO Binding - Error logging on to Xiaomi cloud

Hi, I use a Xiaomi vacuum with the MI IO Binding. After the restart of OH the MAP won’t work anymore. The Bindin is configured like in the OH example. I can see the MAP with the Xiami Home App and also with the Flolevac App. At the moment I use the direct mode in the thing, so I can control the vacuum, but I can’t see the map in openhab. Every 10 minutes I get this failure in the log:

2021-11-06 16:06:21.893 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 0
2021-11-06 16:07:31.974 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 0
2021-11-06 16:08:41.944 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 0

I also installed the old version of the Home App on the phone, to get the token. The Token is the same, that Openhab found at first.

I also testet the log with the debug mode:

2021-11-06 22:28:46.714 [DEBUG] [miio.internal.cloud.MiCloudConnector] - Xiaomi cloud login with userid xxxxxxyyyyyy@gmx.net
2021-11-06 22:28:46.896 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 0
2021-11-06 22:28:46.899 [DEBUG] [o.internal.handler.MiIoVacuumHandler] - Not connected to Xiaomi cloud. Cannot retreive new map: roboroommap%2F391767715%2F2

Why can’t openhab login?

you need to configure the binding with your cloud details.
Did you do that.
The map is not coming directly from the vacuum, but instead it is coming from the cloud, hence your Xiaomi logon details are needed.

Hi, it’s working again, without changing anything.

Thanks and Bye

After changing my Router (Fritzbox), I have the problem again. email and passworf for login is okay, otherwise the returncode is:70016.

The thing is online for about 4 mins. I this time it is possible to communicate with the vaccuum. But then it goes to “error:config”

This are the logs:

2022-07-18 06:17:33.347 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 0
2022-07-18 06:15:23.565 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler MiIoVacuumHandler tried updating the thing status although the handler was already disposed.
2022-07-18 06:18:29.261 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler MiIoVacuumHandler of thing miio:generic:1759E6A3 tried checking if channel cleaning#map is linked although the handler was already disposed.
2022-07-18 06:43:50.104 [ERROR] [st.core.internal.thing.ThingResource] - Exception during HTTP PUT request for update config at 'things/miio:generic:1759E6A3/config'
java.lang.IllegalStateException: Thing with UID miio:generic:1759E6A3 has no handler attached.

Any Idea

I would restart openhab. Make sure you have only one version of the binding.
Check if there is not possibly a double entry for your vacuum e.g. a manual entry and a text based entry or something

Hi, I had a look in the folder userdata-conf, and saw, there are 4 files. How much is normal?
Bild_2022-07-20_160728731

Should I delete some?

I’m experiencing trouble after switching to a new WIFI, the server login has started to fail so I am unable to obtain new tokens:

2022-07-24 18:44:31.363 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 response = HttpContentResponse[HTTP/1.1 200 OK - 750 bytes]
2022-07-24 18:44:31.364 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 sign = <POSSIBLE_SENSITIVE_DATA_REMOVED>=
2022-07-24 18:44:31.364 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 2
2022-07-24 18:44:31.445 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi login step 2 response = HttpContentResponse[HTTP/1.1 200 OK - 1004 bytes]
2022-07-24 18:44:31.445 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi login step 2 content = &&&START&&&{"notificationUrl":"https://account.xiaomi.com/identity/authStart?sid=passport&context=7c-iGH-<POSSIBLE_SENSITIVE_DATA_REMOVED>&_locale=nb_NO","result":"ok","code":0,"captchaUrl":null,"description":"成功","location":"","securityStatus":16,"pwd":0,"desc":"成功"}
2022-07-24 18:44:31.446 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi login ssecurity =
2022-07-24 18:44:31.446 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi login userId =
2022-07-24 18:44:31.447 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi login cUserId =
2022-07-24 18:44:31.447 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi login passToken =
2022-07-24 18:44:31.448 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi login location =
2022-07-24 18:44:31.448 [TRACE] [miio.internal.cloud.MiCloudConnector] - Xiaomi login code = 0
2022-07-24 18:44:31.448 [TRACE] [miio.internal.cloud.MiCloudConnector] - Cookie dump for https://account.xiaomi.com/pass/serviceLoginAuth2
2022-07-24 18:44:31.449 [TRACE] [miio.internal.cloud.MiCloudConnector] - Cookie (.xiaomi.com) : sdkVersion --> accountsdk-18.8.15     (path: /. Removed: false)
2022-07-24 18:44:31.450 [TRACE] [miio.internal.cloud.MiCloudConnector] - Cookie (.xiaomi.com) : deviceId --> lhjiyl     (path: /. Removed: false)
2022-07-24 18:44:31.450 [TRACE] [miio.internal.cloud.MiCloudConnector] - Cookie (.xiaomi.com) : uLocale --> nb_NO     (path: /. Removed: false)
2022-07-24 18:44:31.450 [TRACE] [miio.internal.cloud.MiCloudConnector] - Cookie (account.xiaomi.com) : pass_ua --> web     (path: /. Removed: false)
2022-07-24 18:44:31.451 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 0

Binding settings:
CleanShot 2022-07-24 at 18.53.45

I can login to the Xiaomi Home Android app with the same credentials.

Any idea what might be wrong?

Thanks in advance!

Regards,
Arne

1 Like

Hi,
I’m getting the same error after openhab restart. Should I restart miio binding?

The question I have is:
Will my devices continue working? All devices are configured to local discovery only, also the binding itself is configured to local discovery only.

Everything works. Can I just ignore this error, or after a while some tokens will expire and openhab will lose control of the devices?

found a solution on github of the binding - here goes if someone will have the same issue:
“trust” was lost between your IP and xiaomi cloud
just login to https://account.xiaomi.com/ with same user and pass that are defined in the binding, probably it will send you the verification OTP on your email because you havent signed in for a while.
Make sure you use a PC that is on the same network as openhab machine (meaning, uses the same public IP to go out)
after that, warning in log should stop.

3 Likes

I have the same issue.

  • I copied the user name and password from the openHAB binding and used them to login to the xiaomi cloud and it worked fine.
  • I made sure the locale in the cloud is the same like the one I defined in the config (de)
  • I then resaved the configured to tell he binding to retry.

Unfortunately, I get the error message. Here a the debug logs.

2025-07-05 13:17:27.381 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : ConfigurableComponentHolder configuration updated for pid binding.miio with change count 5
2025-07-05 13:17:27.382 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state active
2025-07-05 13:17:27.383 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state active
2025-07-05 13:17:27.384 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No modified method, cannot update dynamically
2025-07-05 13:17:27.384 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Deactivating and Activating to reconfigure class="afterFrom marked"> from configuration
2025-07-05 13:17:27.385 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state active
2025-07-05 13:17:27.385 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Deactivating component
2025-07-05 13:17:27.386 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : registration change queue [unregistered]
2025-07-05 13:17:27.394 [DEBUG] [internal.handler.MiIoAbstractHandler] - Disposing Xiaomi Mi IO handler 'miio:generic:1E76056F'
2025-07-05 13:17:27.395 [DEBUG] [internal.handler.MiIoAbstractHandler] - Last Id saved for miio:generic:1E76056F: 0 -> {"lastId":0,"deviceId":"1E76056F"} 
2025-07-05 13:17:27.396 [DEBUG] [internal.handler.MiIoAbstractHandler] - Saved to /var/lib/openhab/miio/info_1E76056F.json
2025-07-05 13:17:27.401 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state active
2025-07-05 13:17:27.402 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : invoking deactivate: dispose: parameters []
2025-07-05 13:17:27.403 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : invoked deactivate: dispose
2025-07-05 13:17:27.404 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : DependencyManager: osgi.ds.satisfying.condition close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@4b002505 at tracking count 5 refpairs: [[RefPair: ref: [{org.osgi.service.condition.Condition}={service.id=6, service.bundleid=0, service.scope=singleton, service.pid=0.org.osgi.service.condition.ConditionImpl, osgi.condition.id=true}] service: [null]]]
2025-07-05 13:17:27.405 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : DependencyManager: $006 close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@4b002505 at tracking count 4 refpairs: [[RefPair: ref: [{org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=50.1021864320423,8.403853867202997, service.id=174, service.bundleid=156, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=SI, component.id=15, timezone=Europe/Berlin, service.config.category=system, region=DE, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]}] service: [org.openhab.core.internal.i18n.I18nProviderImpl@214f2d2e]]]
2025-07-05 13:17:27.406 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : DependencyManager: $005 close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@4b002505 at tracking count 3 refpairs: [[RefPair: ref: [{org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=50.1021864320423,8.403853867202997, service.id=174, service.bundleid=156, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=SI, component.id=15, timezone=Europe/Berlin, service.config.category=system, region=DE, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]}] service: [org.openhab.core.internal.i18n.I18nProviderImpl@214f2d2e]]]
2025-07-05 13:17:27.407 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : DependencyManager: $004 close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@4b002505 at tracking count 6 refpairs: [[RefPair: ref: [{org.openhab.core.thing.type.ChannelTypeProvider, org.openhab.binding.miio.internal.basic.BasicChannelTypeProvider}={service.id=1075, service.bundleid=382, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.binding.miio.internal.basic.BasicChannelTypeProvider, component.id=537}] service: [org.openhab.binding.miio.internal.basic.BasicChannelTypeProvider@229cabe0]]]
2025-07-05 13:17:27.408 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : DependencyManager: $003 close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@4b002505 at tracking count 8 refpairs: [[RefPair: ref: [{org.openhab.binding.miio.internal.cloud.CloudConnector}={service.id=1077, service.bundleid=382, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.binding.miio.internal.cloud.CloudConnector, component.id=539}] service: [org.openhab.binding.miio.internal.cloud.CloudConnector@2826f2c]]]
2025-07-05 13:17:27.409 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : DependencyManager: $002 close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@4b002505 at tracking count 7 refpairs: [[RefPair: ref: [{org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService}={service.id=1076, service.bundleid=382, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), $000.target=(watchservice.name=configWatcher), component.name=org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService, component.id=538}] service: [org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService@61c4a5b]]]
2025-07-05 13:17:27.409 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : DependencyManager: $001 close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@4b002505 at tracking count 2 refpairs: [[RefPair: ref: [{org.openhab.core.thing.type.ChannelTypeRegistry}={service.id=431, service.bundleid=221, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.core.thing.type.ChannelTypeRegistry, component.id=290}] service: [org.openhab.core.thing.type.ChannelTypeRegistry@46764c3d]]]
2025-07-05 13:17:27.410 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : DependencyManager: $000 close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@4b002505 at tracking count 1 refpairs: [[RefPair: ref: [{org.openhab.core.io.net.http.HttpClientFactory, org.openhab.core.io.net.http.WebSocketFactory}={service.id=293, maxThreadsShared=40, service.bundleid=182, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.core.io.net.http.internal.WebClientFactoryImpl, component.id=164, maxThreadsCustom=20, minThreadsCustom=10, minThreadsShared=10, service.pid=org.openhab.webclient}] service: [org.openhab.core.io.net.http.internal.WebClientFactoryImpl@1723cb8]]]
2025-07-05 13:17:27.411 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Unset and deconfigured implementation object for component in deleteComponent for reason Unspecified
2025-07-05 13:17:27.411 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Changed state from active to satisfied
2025-07-05 13:17:27.412 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Deactivating dependency managers
2025-07-05 13:17:27.413 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : Querying state active
2025-07-05 13:17:27.414 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : invoking deactivate: deactivate: parameters []
2025-07-05 13:17:27.415 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : invoked deactivate: deactivate
2025-07-05 13:17:27.415 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : DependencyManager: osgi.ds.satisfying.condition close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@5703c4e3 at tracking count 2 refpairs: [[RefPair: ref: [{org.osgi.service.condition.Condition}={service.id=6, service.bundleid=0, service.scope=singleton, service.pid=0.org.osgi.service.condition.ConditionImpl, osgi.condition.id=true}] service: [null]]]
2025-07-05 13:17:27.416 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : DependencyManager: $000 close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@5703c4e3 at tracking count 1 refpairs: [[RefPair: ref: [{org.openhab.core.service.WatchService}={service.id=410, service.bundleid=156, service.scope=singleton, watchservice.name=configWatcher}] service: [org.openhab.core.internal.service.WatchServiceImpl@4f6bba75]]]
2025-07-05 13:17:27.417 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : Unset and deconfigured implementation object for component in deleteComponent for reason Unspecified
2025-07-05 13:17:27.417 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : Changed state from active to satisfied
2025-07-05 13:17:27.418 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state satisfied
2025-07-05 13:17:27.418 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Changed state from satisfied to unsatisfiedReference
2025-07-05 13:17:27.419 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No change in target property for dependency $000: currently registered: true
2025-07-05 13:17:27.420 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No change in target property for dependency $001: currently registered: true
2025-07-05 13:17:27.420 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No change in target property for dependency $002: currently registered: true
2025-07-05 13:17:27.421 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No change in target property for dependency $003: currently registered: true
2025-07-05 13:17:27.421 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No change in target property for dependency $004: currently registered: true
2025-07-05 13:17:27.422 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No change in target property for dependency $005: currently registered: true
2025-07-05 13:17:27.422 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No change in target property for dependency $006: currently registered: true
2025-07-05 13:17:27.423 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : No change in target property for dependency osgi.ds.satisfying.condition: currently registered: true
2025-07-05 13:17:27.423 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : ActivateInternal
2025-07-05 13:17:27.423 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state unsatisfiedReference
2025-07-05 13:17:27.424 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state unsatisfiedReference
2025-07-05 13:17:27.424 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Activating component from state unsatisfiedReference
2025-07-05 13:17:27.425 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state unsatisfiedReference
2025-07-05 13:17:27.425 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state unsatisfiedReference
2025-07-05 13:17:27.426 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Changed state from unsatisfiedReference to satisfied
2025-07-05 13:17:27.426 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : registration change queue [registered]
2025-07-05 13:17:27.429 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : This thread collected dependencies
2025-07-05 13:17:27.430 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : getService (single component manager) dependencies collected.
2025-07-05 13:17:27.431 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state satisfied
2025-07-05 13:17:27.431 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Querying state satisfied
2025-07-05 13:17:27.432 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : For dependency $000, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.io.net.http.HttpClientFactory, org.openhab.core.io.net.http.WebSocketFactory}={service.id=293, maxThreadsShared=40, service.bundleid=182, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.core.io.net.http.internal.WebClientFactoryImpl, component.id=164, maxThreadsCustom=20, minThreadsCustom=10, minThreadsShared=10, service.pid=org.openhab.webclient}] service: [null]]]
2025-07-05 13:17:27.433 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : For dependency $001, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.thing.type.ChannelTypeRegistry}={service.id=431, service.bundleid=221, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.core.thing.type.ChannelTypeRegistry, component.id=290}] service: [null]]]
2025-07-05 13:17:27.434 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : For dependency $002, optional: false; to bind: [[RefPair: ref: [{org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService}={service.id=1076, service.bundleid=382, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), $000.target=(watchservice.name=configWatcher), component.name=org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService, component.id=538}] service: [null]]]
2025-07-05 13:17:27.434 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : For dependency $003, optional: false; to bind: [[RefPair: ref: [{org.openhab.binding.miio.internal.cloud.CloudConnector}={service.id=1077, service.bundleid=382, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.binding.miio.internal.cloud.CloudConnector, component.id=539}] service: [null]]]
2025-07-05 13:17:27.435 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : For dependency $004, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.thing.type.ChannelTypeProvider, org.openhab.binding.miio.internal.basic.BasicChannelTypeProvider}={service.id=1075, service.bundleid=382, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.binding.miio.internal.basic.BasicChannelTypeProvider, component.id=537}] service: [null]]]
2025-07-05 13:17:27.436 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : For dependency $005, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=50.1021864320423,8.403853867202997, service.id=174, service.bundleid=156, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=SI, component.id=15, timezone=Europe/Berlin, service.config.category=system, region=DE, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]}] service: [null]]]
2025-07-05 13:17:27.437 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : For dependency $006, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=50.1021864320423,8.403853867202997, service.id=174, service.bundleid=156, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=SI, component.id=15, timezone=Europe/Berlin, service.config.category=system, region=DE, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]}] service: [null]]]
2025-07-05 13:17:27.437 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : For dependency osgi.ds.satisfying.condition, optional: false; to bind: [[RefPair: ref: [{org.osgi.service.condition.Condition}={service.id=6, service.bundleid=0, service.scope=singleton, service.pid=0.org.osgi.service.condition.ConditionImpl, osgi.condition.id=true}] service: [null]]]
2025-07-05 13:17:27.438 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : This thread collected dependencies
2025-07-05 13:17:27.439 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : getService (single component manager) dependencies collected.
2025-07-05 13:17:27.439 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : Querying state satisfied
2025-07-05 13:17:27.440 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : Querying state satisfied
2025-07-05 13:17:27.440 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : For dependency $000, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.service.WatchService}={service.id=410, service.bundleid=156, service.scope=singleton, watchservice.name=configWatcher}] service: [org.openhab.core.internal.service.WatchServiceImpl@4f6bba75]]]
2025-07-05 13:17:27.441 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : For dependency osgi.ds.satisfying.condition, optional: false; to bind: [[RefPair: ref: [{org.osgi.service.condition.Condition}={service.id=6, service.bundleid=0, service.scope=singleton, service.pid=0.org.osgi.service.condition.ConditionImpl, osgi.condition.id=true}] service: [null]]]
2025-07-05 13:17:27.442 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - Started miio basic devices local databases watch service. Watching for database files at path: /etc/openhab/misc/miio
2025-07-05 13:17:27.514 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : Set implementation object for component
2025-07-05 13:17:27.515 [DEBUG] [ernal.basic.MiIoDatabaseWatchService] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService(538)] : Changed state from satisfied to active
2025-07-05 13:17:27.516 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : invoking activate: activate: parameters [org.apache.felix.scr.impl.manager.ComponentContextImpl]
2025-07-05 13:17:27.516 [DEBUG] [miio.internal.cloud.MiCloudConnector] - Xiaomi cloud login with userid xxxx@xxxx.com (changed for forum publishing)
2025-07-05 13:17:27.518 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : invoked activate: activate
2025-07-05 13:17:27.518 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Set implementation object for component
2025-07-05 13:17:27.519 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : Changed state from satisfied to active
2025-07-05 13:17:27.529 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : ImmediateComponentHolder Finished configuring the dependency managers for component for pid binding.miio 
2025-07-05 13:17:27.530 [DEBUG] [ing.miio.internal.MiIoHandlerFactory] - bundle org.openhab.binding.miio:4.3.0 (382)[org.openhab.binding.miio.internal.MiIoHandlerFactory(536)] : ImmediateComponentHolder Will not enable component for pid binding.miio: holder enabled state: true, metadata enabled: true 
2025-07-05 13:17:27.389 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:generic:1E76056F' changed from UNINITIALIZED (HANDLER_CONFIGURATION_PENDING): {token=The parameter is required.} to UNINITIALIZED
2025-07-05 13:17:27.400 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:generic:1E76056F' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2025-07-05 13:17:27.527 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:generic:1E76056F' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING): {token=The parameter is required.}
2025-07-05 13:17:28.465 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 87001

For me the same :frowning:

Same here…i guess something was chaged in xiaomi api and our binding cannot speak with it anymore

For the time being this is the fix Xiaomi Robot Vacuum Binding - #2231 by stfn82

The challenge is not so much updating the login code (the Piotr code is largely a python copy of the openhab login code) but how to have the interaction in openhab environment how we can show the capcha and return the response in a userfriendly way.

1 Like

Does anyone know what are the implications of never logging in to the xiaomi cloud again? I have filtered out those warnings so they stop flooding openhab.log and everything works for over a month now….I dont care about xiaomi login if my vacuum robot still works fine…

You can’t get the vacuum map.

Oh, ok, I’m not using that. My 2.5PM air quality still sends the data, and xiaomi robot still accepts commands and sends its status, I’m actually happier with local control then constant connection to a dodgy chinese cloud. There should be an option to disable connection attempts to xiaomi.com in the binding for people like me :slight_smile:

If I recall well, leaving your cloud login details empty will ensure no connection to the cloud is made.
The only time you need to logon is when you add a new device or somehow reset your device, as you need the token for your device.

Note: the local connection is encrypted with the token.. So while you don’t need any cloud access for communicating directly with your devices, you do need (once) to get the token.

good tip, removed credentials, thanks

hi,

after I removed those credentials, everything seemingly worked, but then I noticed the status of the mija vacuum does not update anymore, until I disable enable the thing, or restart miio binding.

Not sure why, maybe constant cloud (re)connection (or even just attempts and failures to login) somehow kept the thing “alive”

so, my current state of affairs is that the vacuum receives the command to start/stop, but I cannot see the status (that its currently sweeping) or updated battery level. So it will stay on “charging”,100% battery even though in reality its “sweeping”,33% battery

That is somewhat unexpected. The communication is local, should not be dependent on the cloud.
Maybe send a PM with debug log or make a github issue, than I can look bit more into this issue