[miio] change deviceID to Xiaomi used string (#10951)

* [miio] change deviceID to Xiaomi used string

Change the deviceId from the current hexadecimal to the string used by
Xiaomi.
This is needed as we have some devices that have deviceIds that are
non-numeric, hence breaking the current logic.

Note: separately removing the upnp discovery as this has become
irrelevant with cloud discovery and devices supporting the udp regular
discovery.

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

* Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoAbstractHandler.java

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
This commit is contained in:
Marcel
2021-07-06 19:42:42 +02:00
committed by GitHub
parent 89f2da140c
commit 7d2db98662
8 changed files with 73 additions and 199 deletions

View File

@@ -76,7 +76,7 @@ However, for devices that are unsupported, you may override the value and try to
|-----------------|---------|----------|---------------------------------------------------------------------|
| host | text | true | Device IP address |
| token | text | true | Token for communication (in Hex) |
| deviceId | text | true | Device ID number for communication (in Hex) |
| deviceId | text | true | Device Id (typically a number for normal devices) for communication |
| model | text | false | Device model string, used to determine the subtype |
| refreshInterval | integer | false | Refresh interval for refreshing the data in seconds. (0=disabled) |
| timeout | integer | false | Timeout time in milliseconds |
@@ -86,11 +86,11 @@ Note: Suggest to use the cloud communication only for devices that require it. I
### Example Thing file
`Thing miio:basic:light "My Light" [ host="192.168.x.x", token="put here your token", deviceId="0326xxxx", model="philips.light.bulb", communication="direct" ]`
`Thing miio:basic:light "My Light" [ host="192.168.x.x", token="put here your token", deviceId="326xxxx", model="philips.light.bulb", communication="direct" ]`
or in case of unknown models include the model information of a similar device that is supported:
`Thing miio:vacuum:s50 "vacuum" @ "livingroom" [ host="192.168.15.20", token="xxxxxxx", deviceId=“0470DDAA”, model="roborock.vacuum.s4", communication="cloud"]`
`Thing miio:vacuum:s50 "vacuum" @ "livingroom" [ host="192.168.15.20", token="xxxxxxx", deviceId="326xxxx", model="roborock.vacuum.s4", communication="direct" ]`
# Advanced: Unsupported devices