Homebridge-xiaomi-roborock-vacuum: Move the miio library to a folder in this repo

Created on 18 May 2020  路  8Comments  路  Source: homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum

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 :)

enhancement good first issue

All 8 comments

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

And removing everything unrealted to non vacuum cleaners in this case

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 :)

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

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 :)

Looks like you鈥檒l have a busy Friday )

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thechris1992 picture thechris1992  路  9Comments

Zer0x00 picture Zer0x00  路  5Comments

normen picture normen  路  14Comments

0Bu picture 0Bu  路  3Comments

koles0ff picture koles0ff  路  4Comments