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

[miio] Allow for custom refresh commands #8796

Merged
merged 3 commits into from
Oct 21, 2020

Conversation

marcelrv
Copy link
Contributor

  • Allow for custom commands during miio:basic refreshes, needed to
    support refresh for e.g. scicoffeemaker, viomi vacuums etc

  • Improve the unsupported handler to deal with the custom commands as
    well

  • Do not add non-existing channeltypes in basic handler

  • Add the right channeltypes to the jsonDB instead of just defaulting
    them to the channel names.

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com

* Allow for custom commands during miio:basic refreshes, needed to
support refresh for e.g. scicoffeemaker, viomi vacuums etc

* Improve the unsupported handler to deal with the custom commands as
well

* Do not add non-existing channeltypes in basic handler

* Add the right channeltypes to the jsonDB instead of just defaulting
them to the channel names.


Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
@marcelrv marcelrv requested a review from cpmeister October 18, 2020 21:28
@marcelrv marcelrv added the enhancement An enhancement or new feature for an existing add-on label Oct 18, 2020
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@marcelrv marcelrv mentioned this pull request Oct 18, 2020
26 tasks
…ding/miio/internal/handler/MiIoBasicHandler.java

Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
"readmeComment": "If this channel does not respond to on/off replace the model with chuangmi.plug.v3old in the config or upgrade firmware"
},
{
"property": "usb_on",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why did the formatting change for this file? It is not inconsistent with the other files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used that file for my testing, and did some intrim reset to undo my changes for the testing.
seems that that also undone the formatting changes...
Applied the formatter once more.

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpmeister cpmeister merged commit 998d114 into openhab:main Oct 21, 2020
@cpmeister cpmeister added this to the 3.0.0.M2 milestone Oct 21, 2020
@marcelrv marcelrv deleted the miio-CustomRefreshCommand branch October 21, 2020 21:18
marcelrv added a commit to marcelrv/openhab-addons that referenced this pull request Oct 24, 2020
* [miio] Allow for custom refresh commands

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
cpmeister pushed a commit that referenced this pull request Oct 24, 2020
* [miio] delay refresh to avoid devices not ready yet (#8838)

* [miio] delay refresh to avoid devices not ready yet

Delay refresh after command is send as some devices are not ready yet
with the execution and will report wrong status.
This is confusing to the users.

Related forum topic:
https://community.openhab.org/t/xiaomi-mi-air-purifier-xiaomi-mi-io/34840/300

* [miio] remove change from PR
* [miio] Add temperature value to chuangmi.plug.v1 (#8832)

Based on: marcelrv#12

* [miio] add new country server and improve readme (#8816)
* [miio] add new country server and improve readme
* [miio] apply spotless
* [miio] Allow for custom refresh commands (#8796)
* [miio] Allow for custom refresh commands

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
boehan pushed a commit to boehan/openhab-addons that referenced this pull request Apr 12, 2021
* [miio] Allow for custom refresh commands

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
* [miio] Allow for custom refresh commands

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants