The binding can retrieve the needed tokens from the Xiaomi cloud.
Go to the binding config page and enter your cloud username and password.
The server(s) to which your devices are connected need to be entered as well.
-Use the one of the regional servers: ru,us,tw,sg,cn,de. Multiple servers can be separated with comma, or leave blank to test all known servers.
+Use the one of the regional servers: cn,de,i2,tw,ru,sg,us.
+Multiple servers can be separated with comma, or leave blank to test all known servers.
## Tokens without cloud access
## Binding Configuration
No binding configuration is required. However to enable cloud functionality enter your Xiaomi username, password and server(s).
-The list of the known countries and related severs is [here](#Country-Servers)
+The list of the known countries and related severs is [here](#Country-Servers).
+
After successful Xiaomi cloud login, the binding will use the connection to retrieve the required device tokens from the cloud.
For Xiaomi vacuums the map can be visualized in openHAB using the cloud connection.
Normally the modelId is populated with the model of your device, however in this case, use the modelId of a similar device.
Look at the openHAB forum, or the openHAB GitHub repository for the modelId of similar devices.
-## Supported property test
+## Supported property test for unsupported devices
The unsupported device has a test channel with switch. When switching on, all known properties are tested, this may take few minutes.
-A test report will be shown in the log and is saved in the userdata/miio folder.
+A test report will be shown in the log and is saved in the `userdata/miio` folder with a filename `test-[your model]-[timestamp].txt`.
If supported properties are found, an experimental database file is saved to the conf/misc/miio folder (see below chapter).
The thing will go offline and will come back online as basic device, supporting the found channels.
The database file may need to be modified to display the right channel names.
### <a name="Country-Servers">Country Servers</a>
Known country Servers: cn, de, i2, ru, sg, us
+
Mapping of countries in mihome app to server:
| Country | Country Code | Server |
The binding can retrieve the needed tokens from the Xiaomi cloud.
Go to the binding config page and enter your cloud username and password.
The server(s) to which your devices are connected need to be entered as well.
-Use the one of the regional servers: ru,us,tw,sg,cn,de. Multiple servers can be separated with comma, or leave blank to test all known servers.
+Use the one of the regional servers: cn,de,i2,tw,ru,sg,us.
+Multiple servers can be separated with comma, or leave blank to test all known servers.
## Tokens without cloud access
## Binding Configuration
No binding configuration is required. However to enable cloud functionality enter your Xiaomi username, password and server(s).
-The list of the known countries and related severs is [here](#Country-Servers)
+The list of the known countries and related severs is [here](#Country-Servers).
+
After successful Xiaomi cloud login, the binding will use the connection to retrieve the required device tokens from the cloud.
For Xiaomi vacuums the map can be visualized in openHAB using the cloud connection.
# Mi IO Devices
+Currently the miio binding supports more than 200 different models.
+
| Device | ThingType | Device Model | Supported | Remark |
|------------------------------|------------------|------------------------|-----------|------------|
| AUX Air Conditioner | miio:unsupported | aux.aircondition.v1 | No | |
Normally the modelId is populated with the model of your device, however in this case, use the modelId of a similar device.
Look at the openHAB forum, or the openHAB GitHub repository for the modelId of similar devices.
-## Supported property test
+## Supported property test for unsupported devices
The unsupported device has a test channel with switch. When switching on, all known properties are tested, this may take few minutes.
-A test report will be shown in the log and is saved in the userdata/miio folder.
+A test report will be shown in the log and is saved in the `userdata/miio` folder with a filename `test-[your model]-[timestamp].txt`.
If supported properties are found, an experimental database file is saved to the conf/misc/miio folder (see below chapter).
The thing will go offline and will come back online as basic device, supporting the found channels.
The database file may need to be modified to display the right channel names.
### <a name="Country-Servers">Country Servers</a>
Known country Servers: cn, de, i2, ru, sg, us
+
Mapping of countries in mihome app to server:
| Country | Country Code | Server |
}
private StringWriter deviceList() {
+ long items = Arrays.asList(MiIoDevices.values()).stream()
+ .filter(device -> !device.getThingType().equals(MiIoBindingConstants.THING_TYPE_UNSUPPORTED)).count();
+ String devicesCount = String.format("Currently the miio binding supports more than %d different models.",
+ (items / 10) * 10);
+ LOGGER.info(devicesCount);
StringWriter sw = new StringWriter();
-
+ sw.write(devicesCount);
+ sw.write("\r\n\r\n");
sw.write(
"| Device | ThingType | Device Model | Supported | Remark |\r\n");
sw.write(
for (MiIoBasicDevice entry : findDatabaseEntrys()) {
for (String id : entry.getDevice().getId()) {
if (!MiIoDevices.getType(id).getThingType().equals(MiIoBindingConstants.THING_TYPE_BASIC)) {
- LOGGER.info("id :" + id + " not found");
+ LOGGER.info("id : {} " + id
+ + " not found. Suggested line to add to MiIoDevices.java: {}(\"{}\", \"{}\", THING_TYPE_BASIC),",
+ id, id.toUpperCase().replace(".", "_"), id, id);
}
}
}