merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
364 stars 62 forks source link

Add ijai.vacuum.v3 actions buttons support #517

Closed jivnov closed 10 months ago

jivnov commented 10 months ago

Add ijai.vacuum.v3 actions buttons support (mainly room cleaning). I couldn't find an option to perform this without a micloud connection, so changed "requiresMiCloud" to true. Also, parameters for action requests should not be parsed (actual request to clean the specific room looks like that: {"params":{"aiid":3,"did":"DEVICE_ID","in":["10",0,1],"siid":7}}). Additionally, I've updated the robot cleaner wiki to include an example of configuring action buttons.

merdok commented 10 months ago

Hi, thanks for that! I did not actually like the way of disabling the action param parsing, hence i submitted a quick change to do that. You can now go ahead and per device disabled the param parsing, by adding in the config section of the device:

parseActionParams() {
    return false;
  }

Please update your change, we can merge it afterwards!

jivnov commented 10 months ago

Thank you for your feedback. Your way of parsing is definitely better! I've resolved the conflicts in the pull request, so I hope there won't be any problems with the merge.

merdok commented 10 months ago

Thanks, but i see that your change still includes the other files. I guess only those changes should be included:

robotcleaner.md ijai.vacuum.v3.js

Can you have a look again please?

jivnov commented 10 months ago

Sorry for the oversight. I've revisited the changes and only the necessary files are included now.

merdok commented 10 months ago

Thanks! looks good now!