Yes, you need the right token. the configuration error / on-offline is indicating a token error.
but… as you indicated it works when you reboot for few hours… that is really strange (normally it works or it doesnt… not work for few hours). I can think of only 2 reasons that that can happen
you have multiple things for the same device
somehow you get the wrong token once in a while from the cloud… the latter may happen if you have defined your vacuum in the past for multiple countries… when you move to the new country server, the settings / token on the old server remains. It might be that while refreshing it picks up the token from the wrong server. (the binding does educated guess on which server your device is, but depending your settings that may go wrong, esp if the device is offline for few minutes)
But how do I get the right token?
I removed my Thing and readded it, but the token seems to be the same.
So 1. should not apply to my case.
I don’t think that I defined it for multiple countries. Maybe by mistake.
How can I check and fix that?
Hi. I added zhimi.heater.mc2 but I can only switch on/off it. I can’t set target temperature and can’t get environment temperature from heater (but I see it in MiHome app)
Hi Marcel, thank you very much for your tremendous work on the miio binding!
Could you suggest if there were any changes to how “auto-refresh after command” works?
I read your message dated “Aug 15th, 2017”, where you commented on new features:
What is the best way to use Google Home to control the vacuum cleaner?
I have created 4 switches to clean the 4 “rooms” on the ground floor. When adding Google Assistent Metadata to the switch, it’s only working when adding 1 switch.
If I add 2 switches (using vacuum in the metadata) i can see 2 vacuum cleaners inside google home, but cannot control it with voice, it doesn’t know which device to use.
@Mordor if you look at the 3.1.0 latest documentation it has updated screenshots.
You can see how to reach the binding settings (expert mode) in the OH3.x
sorry I´m new for robot.
Could you tell which version of binding I should use for last stable version of OH2.5.12?
Currently I suing the binding from paperui and I have follow message in my log:
2021-06-28 13:31:47.547 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype (pls report to author)
2021-06-28 13:31:47.551 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype (pls report to author)
You are on a pretty old version of the binding. Since than the parsing of the blocks have been improved, hence most likely you won’t have the issue in the current version (e.g. the released OH3.1)
Suggest to ignore the message (you could supress it with set:log warn org.openhab.binding.miio.internal.robot.RRMapFileParser)
The jar files from oh3.0 / 3.1 can’t run in the 2.5 environment, so you either live with it or need to upgrade your Openhab.
Hi! Some time ago, I updated and got the following warning about twice a minute, the last snapshot is the same:
2021-07-22 12:20:41.284 [WARN ] [internal.handler.MiIoAbstractHandler] - As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId. If you continue seeing this message, update deviceId in your thing configuration
2021-07-22 12:20:54.942 [WARN ] [internal.handler.MiIoAbstractHandler] - As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId. If you continue seeing this message, update deviceId in your thing configuration
2021-07-22 12:21:56.323 [WARN ] [internal.handler.MiIoAbstractHandler] - As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId. If you continue seeing this message, update deviceId in your thing configuration
2021-07-22 12:22:09.979 [WARN ] [internal.handler.MiIoAbstractHandler] - As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId. If you continue seeing this message, update deviceId in your thing configuration
2021-07-22 12:22:41.358 [WARN ] [internal.handler.MiIoAbstractHandler] - As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId. If you continue seeing this message, update deviceId in your thing configuration
2021-07-22 12:23:25.023 [WARN ] [internal.handler.MiIoAbstractHandler] - As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId. If you continue seeing this message, update deviceId in your thing configuration
2021-07-22 12:23:56.399 [WARN ] [internal.handler.MiIoAbstractHandler] - As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId. If you continue seeing this message, update deviceId in your thing configuration
I don’t understand what and where do I need to fix?
@Olymp are you using the latest snapshot I expect… with text config for the things, right?
In that case in your thing text config you need to update the deviceId field. In situations without text config I would expect OH to do it by itself. If not, probaly just empty the deviceID field in the thing config will trigger the update as well.
See below screenie: So with the new version you need the 55512645 as deviceId whereas in the old version it would have been the 034F0E45
Thanks for the feedback, appreciate it!
Yes, I am using text configuration, changed the device ID, rebooted the openHAB, the warnings remain.
At the moment, I did it remotely, the robot is not online. Whenever possible, I will plug it into the network and see the result, if this could also be the reason.
@Olymp I made a quick update to improve the message, to help make the change.
Adding to the line: Expected change for thing 'miio:generic:0581B26C': Update current deviceId: '0581B26C' to '92385900'
so it will look like this in the normal situation (when not using text config) :
11:52:31.505 [WARN ] [internal.handler.MiIoAbstractHandler] - As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId.
If you continue seeing this message, update deviceId in your thing configuration.
Expected change for thing 'miio:generic:0581B26C': Update current deviceId: '0581B26C' to '92385900'
11:52:31.505 [DEBUG] [internal.handler.MiIoAbstractHandler] - No deviceId defined. Retrieving Mi deviceId
11:52:31.509 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping to device '' (192.168.3.108)
11:52:31.509 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Starting Mi IO MessageSenderThread
11:52:31.509 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Opening socket on port: 52850
11:52:31.514 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping to device '' (192.168.100.100) success
11:52:31.514 [DEBUG] [internal.handler.MiIoAbstractHandler] - Ping response from deviceId '92385900' at 192.168.100.100. Time stamp: 1970-06-18T22:58:22, OH time 2021-07-22T11:52:31.514094100, delta -1612353249
11:52:31.514 [DEBUG] [internal.handler.MiIoAbstractHandler] - Using retrieved Mi deviceId: 92385900
it is really strange… the message should only appear when 2 conditions are true: 1) lenght of 8, which is true in your case AND 2) it should contain a character a…z or A…Z. the 2nd condition should not be true in your case. Almost seems your change in the text has not been picked up yet…
if (deviceId.length() == 8 && deviceId.matches("^.*[a-zA-Z]+.*$")) {
logger.warn(
"As per openHAB version 3.2 the deviceId is no longer a string with hexadecimals, instead it is a string with the numeric respresentation of the deviceId. If you continue seeing this message, update deviceId in your thing configuration. Expected change for thing '{}': Update current deviceId: '{}' to '{}'",
getThing().getUID(), deviceId, Utils.fromHEX(deviceId));
deviceId = "";
}