-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
Add voice pack managemenet capability #725
Conversation
I like that idea. Can we ditch the local voicepack part and just allow the download and install of a remote URL though? So basically just have
|
Viomi doesn't cache either, it simply has 2 voice packs in the ROM. It only optionally downloads one voice pack at a time and it deletes it when you switch to a new one, including the stock ones in ROM. I would not remove it because:
|
20816ad
to
ed57fd0
Compare
Okay, the base capability + router are implemented, I will go ahead and add an implementation for Viomi. Remarks:
The REST API is defined as follows:
I updated the hoppscotch config with these requests. |
If a user wants to revert to stock, he might as well just enable the raw command capability and use that.
No. Under absolutely no circumstance will Valetudo ever talk to the vendor's cloud.
The whole point of capabilities is that they're implemented fully so that the UI/REST Interface can rely on all features being there if the capability is there. Therefore, this doesn't make sense |
Alright. Thinking about it, since no checks are performed against the hash and URL, one could simply provide "local" for both the URL and hash to set a stock voice. I'll remove that part. |
New JS API:
New REST API:
On Viomi one can still send |
e3cf0f1
to
cc48ab3
Compare
cc48ab3
to
fc0487e
Compare
fc0487e
to
c844174
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly bikeshedding at this point 😁
lib/robots/viomi/capabilities/ViomiVoicePackManagementCapability.js
Outdated
Show resolved
Hide resolved
All done :) |
Type of change
Type B:
Description (Type B)
Feature discussion thread: well...
As mentioned in Telegram, I don't think this way of implementing it makes it particularly complex (though slightly less user friendly).
I designed this as a single capability because, at least for the Viomi, separating the "apply local voice pack" and "download new voice pack" functionalities are very similar and creating two capabilities would increase duplication by a lot.
As far as I can tell all vacuums do not accept an upload, but they accept a URL from which they can download the pack. So I exposed it as such, uploading the pack to valetudo and having it serve it back to the vacuum software is quite messy and complex.
Functionality covers:
The reason why I did not split this in two is that on Viomi the process of applying a local or remote voice pack is exactly the same.