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

chore: Add some async improvements #229

Merged
merged 2 commits into from
Oct 28, 2024
Merged

chore: Add some async improvements #229

merged 2 commits into from
Oct 28, 2024

Conversation

Lash-L
Copy link
Collaborator

@Lash-L Lash-L commented Oct 28, 2024

Relates to #228

@humbertogontijo
Copy link
Owner

humbertogontijo commented Oct 28, 2024

I think it would be best to just keep it simple and create a counter to be used as the request_id (self.counter % 32767). What you think?

@Lash-L
Copy link
Collaborator Author

Lash-L commented Oct 28, 2024

Yeah that probably makes sense. I worried about local messages conflicting though if we went in a sequential order, but it probably does make more sense

@humbertogontijo
Copy link
Owner

I don't know if it can conflict between cloud and local. But we can do something like top to bottom on cloud and bottom to top on local

@Lash-L
Copy link
Collaborator Author

Lash-L commented Oct 28, 2024

I don't know if it can conflict between cloud and local. But we can do something like top to bottom on cloud and bottom to top on local

Sorry, I misspoke, I was specifically talking about commands run via the roborock app. i.e. I do something on my phone's app, it happens to be request id 34212 and that happens to be the next sequential id for HA. But it is probably rare enough that that edge case shouldn't even be really considered.

@Lash-L
Copy link
Collaborator Author

Lash-L commented Oct 28, 2024

Okay made the changes, what do you think about that?

@Lash-L Lash-L merged commit e987c17 into main Oct 28, 2024
7 checks passed
@Lash-L Lash-L deleted the async_changes branch October 28, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants