-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[miio] Add Xiaomi cloud logon (token download) and map download #7255
Conversation
[miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [mio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme Signed-off-by: Marcel Verpaalen [email protected]
Travis tests were successfulHey @marcelrv, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to take a second look later, but this is what I found from my first pass.
@@ -41,10 +46,27 @@ | |||
public class MiIoHandlerFactory extends BaseThingHandlerFactory { | |||
|
|||
private MiIoDatabaseWatchService miIoDatabaseWatchService; | |||
private @NonNullByDefault({}) HttpClient httpClient; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need the NonNullByDefault annotation? It is already non-null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I think it is remaining from the time the class was not yet NonNullByDefault..
I'll remove it
private @Nullable HttpClient httpClient; | ||
|
||
private @Nullable MiCloudConnector cloudConnector; | ||
public static final CloudConnector CC_INSTANCE = new CloudConnector(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a singleton instance I would prefer you make this an OSGI component instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gave that a shot.. seems indeed to work. Not sure if I understand if I need to make it a service or not. For now it appears to work as just a component
public List<JsonObject> getDevicesList() { | ||
refreshDeviceList.getValue(); | ||
return deviceList; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this blank line.
sha256Hmac.init(secretKey); | ||
return Base64.getEncoder().encodeToString(sha256Hmac.doFinal(cipherText)); | ||
} catch (NoSuchAlgorithmException | InvalidKeyException e) { | ||
throw new MiIoCryptoException(e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to include the cause exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I understand what you mean with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean I should make add a
public MiCloudException(String arg0, Exception e) {
super(arg0, e);
}
and pass the exception as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that is exactly what I mean. I guess I should have been clearer though
MessageDigest md = MessageDigest.getInstance("SHA-256"); | ||
return Base64.getEncoder().encodeToString(md.digest(inBytes)); | ||
} catch (NoSuchAlgorithmException e) { | ||
throw new MiIoCryptoException(e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to include the cause exception
/** | ||
* required variable to avoid IncorrectMultilineIndexException warning | ||
*/ | ||
private static final long serialVersionUID = -1280858607995252321L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put static variables above the constructors
|
||
private final String clientId; | ||
private String userId = ""; | ||
private String serviceToken = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use Optional<String>
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know about this Optional way, is indeed useful.
Though in this particular case I'm not clear what it will bring additionally as a empty string as servicetoken won't be helping me to logon. It would add test for isPresent() on top of the existing isempty ones
throw new MiCloudException("Cannot execute request. Cloudservice not available"); | ||
} | ||
if (country.isEmpty()) { | ||
// TODO: pick the right server in a more intelligent way |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do the todo?
// TODO: pick the right server in a more intelligent way | ||
logger.debug("Server not defined in thing. Trying servers: {}", this.country); | ||
for (String mapCountryServer : this.country.split(",")) { | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orphan semicolon
@@ -1501,9 +1528,9 @@ Switch childlock "Child Lock" (G_humidifier) {channel="miio:basic:humidifier:chi | |||
note: Autogenerated example. Replace the id (humidifier) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. | |||
|
|||
```java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
java?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was requested in a PR review some age ago. Guess it helps the formatter.
#4780 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave as is then
Signed-off-by: Marcel Verpaalen <[email protected]>
Travis tests were successfulHey @marcelrv, |
* feedback improvements * token obfuscation for log sharing * basic handler cleanup and improvements Signed-off-by: Marcel Verpaalen <[email protected]>
8307eb7
to
75bcaf7
Compare
Travis tests were successfulHey @marcelrv, |
@cpmeister I think I made all the updates you suggested. Would be great if you can take another look. |
Signed-off-by: Marcel Verpaalen <[email protected]>
Travis tests were successfulHey @marcelrv, |
private static final int STARTING = 0; | ||
private static final int REFRESHING = 1; | ||
private static final int AVAILABLE = 2; | ||
private int deviceListState = STARTING; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private int deviceListState = STARTING; | |
private volatile int deviceListState = STARTING; |
String password = (String) properties.get("password"); | ||
@Nullable | ||
String country = (String) properties.get("country"); | ||
scheduler.schedule(() -> cloudConnector.setCredentials(username, password, country), 0, TimeUnit.SECONDS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scheduler.schedule(() -> cloudConnector.setCredentials(username, password, country), 0, TimeUnit.SECONDS); | |
scheduler.submit(() -> cloudConnector.setCredentials(username, password, country)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know this one yet. Thx!
|
||
Fields fields = new Fields(); | ||
fields.put("sid", "xiaomiio"); | ||
// fields.put("hash", encodePassword(password)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
scheduler.schedule(() -> updateState(CHANNEL_VACUUM_MAP, getMap(mapresponse)), 0, | ||
TimeUnit.MILLISECONDS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scheduler.schedule(() -> updateState(CHANNEL_VACUUM_MAP, getMap(mapresponse)), 0, | |
TimeUnit.MILLISECONDS); | |
scheduler.submit(() -> updateState(CHANNEL_VACUUM_MAP, getMap(mapresponse))); |
String fn = ConfigConstants.getUserDataFolder() + File.separator + BINDING_ID + File.separator | ||
+ map; | ||
CloudUtil.writeBytesToFileNio(mapData, | ||
fn + (new SimpleDateFormat("yyyyMMdd-HHss")).format(new Date()) + ".rrmap"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SimpleDateFormat instance should be static to allow for reuse.
} | ||
|
||
public static void printDevices(String response, String country, Logger logger) { | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this method is only for logging purposes, there is no point in running it if nothing would get logged anyway.
try { | |
if(!logger.isDebugEnabled()){ | |
return; | |
} | |
try { |
request.cookie(new HttpCookie("yetAnotherServiceToken", this.serviceToken)); | ||
request.cookie(new HttpCookie("serviceToken", this.serviceToken)); | ||
request.cookie(new HttpCookie("locale", locale.toString())); | ||
request.cookie(new HttpCookie("timezone", "GMT%2B01%3A00")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the timezone be the local timezone, or no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probable indeed... this stuff is mostly from reverse engineering and MITM logging of traffic from phone to the cloud. It is unclear what it actually is doing. I'll make it dynamic based on the OS setting
request.cookie(new HttpCookie("serviceToken", this.serviceToken)); | ||
request.cookie(new HttpCookie("locale", locale.toString())); | ||
request.cookie(new HttpCookie("timezone", "GMT%2B01%3A00")); | ||
request.cookie(new HttpCookie("is_daylight", "1")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this change? Why is this constant?
for (HttpCookie cookie : request.getCookies()) { | ||
logger.trace("Cookie set for request ({}) : {} --> {} (path: {})", cookie.getDomain(), cookie.getName(), | ||
cookie.getValue(), cookie.getPath()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minimizing cpu waste.
for (HttpCookie cookie : request.getCookies()) { | |
logger.trace("Cookie set for request ({}) : {} --> {} (path: {})", cookie.getDomain(), cookie.getName(), | |
cookie.getValue(), cookie.getPath()); | |
} | |
if(logger.isTraceEnabled){ | |
for (HttpCookie cookie : request.getCookies()) { | |
logger.trace("Cookie set for request ({}) : {} --> {} (path: {})", cookie.getDomain(), cookie.getName(), | |
cookie.getValue(), cookie.getPath()); | |
} | |
} |
...hab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/MiCloudConnector.java
Show resolved
Hide resolved
} catch (IOException e) { | ||
// no joy | ||
logger.debug("Error loading image ohlogo.png:: {}", e.getMessage()); | ||
} | ||
Font font = new Font("TimesRoman", Font.BOLD, 14); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are still using TimesRoman here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I think something went wrong with the final save. Should be fixed now
Fix for re-logon move to DTO Updates based on review feedback Signed-off-by: Marcel Verpaalen <[email protected]>
Conflicts: bundles/org.openhab.binding.miio/README.md bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java
Signed-off-by: Marcel Verpaalen <[email protected]>
Travis tests have failedHey @marcelrv, |
Signed-off-by: Marcel Verpaalen <[email protected]>
Travis tests were successfulHey @marcelrv, |
@cpmeister would be great if you could review the update. |
...b.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudDeviceListDTO.java
Outdated
Show resolved
Hide resolved
public void setCaptchaUrl(Object captchaUrl) { | ||
this.captchaUrl = captchaUrl; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of our build tools don't like EOF without a newline. So add a newline here.
@@ -310,7 +313,7 @@ private void pingSuccess() { | |||
if (!connected) { | |||
connected = true; | |||
status = ThingStatusDetail.NONE; | |||
updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE); | |||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need two pings to go online?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is one of the most confusing parts of the current binding behavior.
If the user has wrong token, currently the thing becomes online. As it responds to the ping, but does not respond to commands. This confuses everyone. Hence I want to make it more transparent for the users and only make the thing online if it actually responds to a command.
Ping only means that a Xiaomi device is there, but it does not mean online in the sense that it is working.
The annoying part of the devices is they simply don't respond at all if a wrong token is used, so not even a 'wrong token' sort of response.
if (username != null && password != null) { | ||
this.username = username; | ||
this.password = password; | ||
logon(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to logon here? Can it be done lazily?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, can. removed the logon
@SerializedName("family_id") | ||
@Expose | ||
private Integer familyId; | ||
private @NonNull String server = "undefined"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be cleaner if you made all these fields public, you could get rid of all the bloat of your getter methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually did that first. But for the fields that I actually use I wanted to avoid null checks everywhere in the code, so I added those in the getters (only to the current relevant fields).
It did not seem very clean to have half of the fields in with public and the remaining with getters in private or have a public one that also has a getter
g2d.setStroke(new BasicStroke()); | ||
g2d.setColor(Color.YELLOW); | ||
int x3[] = { (int) x, (int) (x - 2 * scale), (int) (x + 2 * scale) }; | ||
int y3[] = { (int) y, (int) (y - 5 * scale), (int) (y - 5 * scale) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this correct?
int y3[] = { (int) y, (int) (y - 5 * scale), (int) (y - 5 * scale) }; | |
int y3[] = { (int) y, (int) (y - 5 * scale), (int) (y + 5 * scale) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is suppose to draw a triangle. Bottom of the triangle at the xy
@@ -49,6 +27,10 @@ Accept only one of the 2 discovery results, the alternate one can further be ign | |||
## Tokens | |||
|
|||
The binding needs a token from the Xiaomi Mi Device in order to be able to control it. | |||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put each sentence on a separate line. It makes it easier see changes.
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. | |
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 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. |
## Tokens | ||
|
||
The binding needs a token from the Xiaomi Mi Device in order to be able to control it. | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same changes here
private static final int FAILED = -1; | ||
private static final int STARTING = 0; | ||
private static final int REFRESHING = 1; | ||
private static final int AVAILABLE = 2; | ||
private volatile int deviceListState = STARTING; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this an enum instead?
Signed-off-by: Marcel Verpaalen [email protected] Co-Authored-By: cpmeister <[email protected]>
Travis tests were successfulHey @marcelrv, |
Signed-off-by: Marcel Verpaalen <[email protected]>
@cpmeister hope we are getting there... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the last change.
...rg.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java
Outdated
Show resolved
Hide resolved
…ding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-Authored-By: cpmeister <[email protected]>
Travis tests were successfulHey @marcelrv, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@cpmeister thanks for your time and support |
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]> Signed-off-by: Hans-Reiner Hoffmann <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]> Signed-off-by: Eugen Freiter <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]> Signed-off-by: CSchlipp <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
…hab#7255) * [miio] Squash/rebase Xiaomi cloud logon and map download [miio] WIP cloudlogon to get device tokens and map [miio] save server responses [miio] cloudstuff cleanup [miio] Cloud - more updates map download [miio] WIP get vacuum map from cloud [miio] WIP get tokens from cloud [miio] WIP output vacuum image [miio] first working version with map and tokens from cloud [miio] improvements map downloads [miio] improve map decoding [miio] finalized map drawing logic [miio] 2nd alpha version cloud+map funcionality [miio] fixing spotbugs issues [miio] more spot bug issues resolving [miio] improved map reading [miio] map version 1.1 [miio] cleanup many notnullbydefault issues alpha release3 [miio] cleaning cloudconnector [miio] alpha release 3 [miio] cached logons [miio] small cleanup [miio] minor fix text drawing [miio] alpha 4 [miio] new models added [miio] Improve path color [miio] generic county request [miio] mapviewer cleanup [miio] log levels adjustment [miio] update readme [miio] fix updating basic devices (openhab#7254) [miio] improvements based on feedback feedback improvements token obfuscation for log sharing basic handler cleanup and improvements [miio] schedule login to avoid activation issues [miio] updates based on feedback Fix for re-logon move to DTO Updates based on review feedback [miio] update readme & small cleanup [miio] small fix Apply suggestions from code review Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudUtil.java Signed-off-by: Marcel Verpaalen <[email protected]> Co-authored-by: cpmeister <[email protected]>
[miio] WIP cloudlogon to get device tokens and map
[miio] save server responses
[miio] cloudstuff cleanup
[miio] Cloud - more updates map download
[miio] WIP get vacuum map from cloud
[miio] WIP get tokens from cloud
[miio] WIP output vacuum image
[miio] first working version with map and tokens from cloud
[miio] improvements map downloads
[miio] improve map decoding
[miio] finalized map drawing logic
[miio] 2nd alpha version cloud+map funcionality
[miio] fixing spotbugs issues
[miio] more spot bug issues resolving
[miio] improved map reading
[miio] map version 1.1
[miio] cleanup many notnullbydefault issues alpha release3
[miio] cleaning cloudconnector
[miio] alpha release 3
[mio] cached logons
[miio] small cleanup
[miio] minor fix text drawing
[miio] alpha 4
[miio] new models added
[miio] Improve path color
[miio] generic county request
[miio] mapviewer cleanup
[miio] log levels adjustment
[miio] update readme
Signed-off-by: Marcel Verpaalen [email protected]