Skip to content
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

Merged
merged 12 commits into from
Apr 7, 2020

Conversation

marcelrv
Copy link
Contributor

[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]

[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]
@marcelrv marcelrv added the enhancement An enhancement or new feature for an existing add-on label Mar 29, 2020
@marcelrv marcelrv requested a review from cpmeister March 29, 2020 21:46
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Copy link
Contributor

@cpmeister cpmeister left a 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;
Copy link
Contributor

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.

Copy link
Contributor Author

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();
Copy link
Contributor

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.

Copy link
Contributor Author

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;

Copy link
Contributor

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());
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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());
Copy link
Contributor

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;
Copy link
Contributor

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 = "";
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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(",")) {
;
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java?

Copy link
Contributor Author

@marcelrv marcelrv Mar 30, 2020

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave as is then

@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

* feedback improvements
* token obfuscation for log sharing
* basic handler cleanup and improvements

Signed-off-by: Marcel Verpaalen <[email protected]>
@marcelrv marcelrv force-pushed the miio-cloudconnect branch from 8307eb7 to 75bcaf7 Compare April 1, 2020 14:47
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@marcelrv
Copy link
Contributor Author

marcelrv commented Apr 1, 2020

@cpmeister I think I made all the updates you suggested. Would be great if you can take another look.
Except for the one on ... if you think that is a real improvement I can make that update, just didn't see a good case for it.

@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

private static final int STARTING = 0;
private static final int REFRESHING = 1;
private static final int AVAILABLE = 2;
private int deviceListState = STARTING;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
scheduler.schedule(() -> cloudConnector.setCredentials(username, password, country), 0, TimeUnit.SECONDS);
scheduler.submit(() -> cloudConnector.setCredentials(username, password, country));

Copy link
Contributor Author

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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment on lines 448 to 449
scheduler.schedule(() -> updateState(CHANNEL_VACUUM_MAP, getMap(mapresponse)), 0,
TimeUnit.MILLISECONDS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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");
Copy link
Contributor

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 {
Copy link
Contributor

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.

Suggested change
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"));
Copy link
Contributor

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?

Copy link
Contributor Author

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"));
Copy link
Contributor

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?

Comment on lines 220 to 223
for (HttpCookie cookie : request.getCookies()) {
logger.trace("Cookie set for request ({}) : {} --> {} (path: {})", cookie.getDomain(), cookie.getName(),
cookie.getValue(), cookie.getPath());
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minimizing cpu waste.

Suggested change
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());
}
}

} catch (IOException e) {
// no joy
logger.debug("Error loading image ohlogo.png:: {}", e.getMessage());
}
Font font = new Font("TimesRoman", Font.BOLD, 14);
Copy link
Contributor

@cpmeister cpmeister Apr 2, 2020

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.

Copy link
Contributor Author

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

marcelrv added 3 commits April 6, 2020 00:03
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
@TravisBuddy
Copy link

Travis tests have failed

Hey @marcelrv,
please read the following log in order to understand the failure reason. There might also be some helpful tips along the way.
It will be awesome if you fix what is wrong and commit the changes.

Signed-off-by: Marcel Verpaalen <[email protected]>
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@marcelrv
Copy link
Contributor Author

marcelrv commented Apr 5, 2020

@cpmeister would be great if you could review the update.
I think i processed majority of your suggestions (all, except for the parser).

public void setCaptchaUrl(Object captchaUrl) {
this.captchaUrl = captchaUrl;
}
}
Copy link
Contributor

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);
Copy link
Contributor

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?

Copy link
Contributor Author

@marcelrv marcelrv Apr 6, 2020

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();
Copy link
Contributor

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?

Copy link
Contributor Author

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";
Copy link
Contributor

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.

Copy link
Contributor Author

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) };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct?

Suggested change
int y3[] = { (int) y, (int) (y - 5 * scale), (int) (y - 5 * scale) };
int y3[] = { (int) y, (int) (y - 5 * scale), (int) (y + 5 * scale) };

Copy link
Contributor Author

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.
Copy link
Contributor

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.

Suggested change
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.

bundles/org.openhab.binding.miio/README.base.md Outdated Show resolved Hide resolved
## 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same changes here

Comment on lines 47 to 51
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;
Copy link
Contributor

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]>
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Signed-off-by: Marcel Verpaalen <[email protected]>
@marcelrv
Copy link
Contributor Author

marcelrv commented Apr 6, 2020

@cpmeister hope we are getting there...
Made the updates, kept the DTO's as is, see for rationale the comment there.

Copy link
Contributor

@cpmeister cpmeister left a 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.

…ding/miio/internal/cloud/CloudUtil.java


Signed-off-by: Marcel Verpaalen <[email protected]>

Co-Authored-By: cpmeister <[email protected]>
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpmeister cpmeister merged commit cc61af2 into openhab:2.5.x Apr 7, 2020
@cpmeister cpmeister added this to the 2.5.4 milestone Apr 7, 2020
@marcelrv
Copy link
Contributor Author

marcelrv commented Apr 7, 2020

@cpmeister thanks for your time and support

@marcelrv marcelrv deleted the miio-cloudconnect branch April 7, 2020 19:20
Hans-Reiner pushed a commit to Hans-Reiner/openhab2-addons that referenced this pull request Apr 11, 2020
…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]>
yfre pushed a commit to yfre/openhab-addons that referenced this pull request Apr 27, 2020
…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]>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request May 29, 2020
…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]>
LoungeFlyZ pushed a commit to LoungeFlyZ/openhab2-addons that referenced this pull request Jun 8, 2020
…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]>
J-N-K pushed a commit to J-N-K/openhab-addons that referenced this pull request Jul 14, 2020
…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]>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
…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]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…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]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…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]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…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]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…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]>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
…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]>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants