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

Move the miio library to a folder in this repo #196

Closed
afharo opened this issue May 18, 2020 · 8 comments
Closed

Move the miio library to a folder in this repo #196

afharo opened this issue May 18, 2020 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@afharo
Copy link
Member

afharo commented May 18, 2020

We are maintaining our own version of the miio library because the original dev stopped accepting PRs.

Maybe it makes sense to copy the library (the version in https://github.com/homebridge-xiaomi-roborock-vacuum/miio) to this repo so it's easier to maintain :)

@afharo afharo added enhancement New feature or request good first issue Good for newcomers labels May 18, 2020
@bedrin
Copy link
Collaborator

bedrin commented May 19, 2020

Probably worth copying https://github.com/tinkerhub/abstract-things as well

@bedrin
Copy link
Collaborator

bedrin commented May 19, 2020

And removing everything unrealted to non vacuum cleaners in this case

@afharo
Copy link
Member Author

afharo commented May 20, 2020

Do you think we need to go that low? Personally, I never found myself needing to change anything in that library (so far).

+1 on removing anything unrelated to vacuum cleaners during the migration process.

I think I have some time this Friday to do so :)

@bedrin
Copy link
Collaborator

bedrin commented May 20, 2020

@afharo
Copy link
Member Author

afharo commented May 20, 2020

Personally, I don't think that's a change that requires moving the library. If you want to ensure the library debug logs the Things library logs, you can simply set the environment variable DEBUG=thing:*. More documentation about the debug library: https://www.npmjs.com/package/debug

@afharo
Copy link
Member Author

afharo commented May 20, 2020

And we can still publish a fork of it if really needed.

The reason for moving miio though, is because we are constantly modifying that library. The development of this plugin is tightly bound to that library and, on many occasions, it means changing both libraries.

We usually work around changing the miio library by calling this.device.call('method') in this module, which makes it hard to scale (and makes the index.js file to grow way over its means...

Ideally, miio should take care of talking to the robot (no matter what type of robot it is), and index.js should only take care of exposing those generalised standard methods to homebridge.

I'll try to work on that approach on Friday :)

@afharo afharo self-assigned this May 20, 2020
@bedrin
Copy link
Collaborator

bedrin commented May 20, 2020

Looks like you’ll have a busy Friday )

@afharo
Copy link
Member Author

afharo commented May 22, 2020

Hahaha! I had a day off today, but my girlfriend is working so... having fun here :D

@afharo afharo closed this as completed May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants