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

[meater] Initial contribution #13400

Merged
merged 23 commits into from Oct 16, 2022
Merged

[meater] Initial contribution #13400

merged 23 commits into from Oct 16, 2022

Conversation

jannegpriv
Copy link
Contributor

This is the initial commit for the meater binding.

The binding gives the end user the possibility to monitor Meater probes.
It uses the public Meater REST API

Link to community thread.

Link to published jar-file.

This PR will close #11998.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
@jannegpriv jannegpriv requested a review from a team as a code owner September 17, 2022 10:06
@jannegpriv jannegpriv added the new binding If someone has started to work on a binding. For a new binding PR. label Sep 17, 2022
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

Please adjust your changes in the bom/pom.xml file. You have more changes than expected. You should just add one line for your new binding.
For your information, I recently created a new binding using the skeleton script and I faced the same issue. I will open an issue.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
@jannegpriv
Copy link
Contributor Author

Script to create new binding skeleton: problem with file bundles/pom.xml #13405

I guess you meant the bundle/pom.xml, I've removed a lot of empty lines in it.

@lolodomo
Copy link
Contributor

I guess you meant the bundle/pom.xml, I've removed a lot of empty lines in it.

Please take the file from the main branch and just add one line for your new binding.
Your PR still dies not compile.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
@lolodomo
Copy link
Contributor

Now your PR is compiling and its number of lines has been reduced significantly. The review should be not too difficult.

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

Reivew part 1 of 3

@robnielsen
Copy link
Contributor

I still use text files for my config. Here's what worked for me. It was kinda a pain to get the device ID's and determine what probe it belonged to. In order to get the device ID's I had to add the probes from the mailbox, and copy the device ID from the thing for the probe, then delete the thing. The only way I could determine the device was to configure an item for each probe and then see what value it returned. For example, I set the target cook temp differently for each probe.

.things file:

Bridge meater:meaterapi:block     "Meater Block"   [email="", password=""] {
  meater:meaterprobe:block:probe1 "Meater Probe 1" [deviceId=""]
  meater:meaterprobe:block:probe2 "Meater Probe 2" [deviceId=""]
  meater:meaterprobe:block:probe3 "Meater Probe 3" [deviceId=""]
  meater:meaterprobe:block:probe4 "Meater Probe 4" [deviceId=""]
}

.items file:

Number:Temperature Probe1InternalTemperature   {channel ="meater:meaterprobe:block:probe1:internalTemperature"}
Number:Temperature Probe1AmbientTemperature    {channel ="meater:meaterprobe:block:probe1:ambientTemperature"}
String             Probe1CookId                {channel ="meater:meaterprobe:block:probe1:cookId"}
String             Probe1CookName              {channel ="meater:meaterprobe:block:probe1:cookName"}
String             Probe1CookState             {channel ="meater:meaterprobe:block:probe1:cookState"}
Number:Temperature Probe1CookTargetTemperature {channel ="meater:meaterprobe:block:probe1:cookTargetTemperature"}
Number:Temperature Probe1CookPeakTemperature   {channel ="meater:meaterprobe:block:probe1:cookPeakTemperature"}
Number:Time        Probe1CookElapsedTime       {channel ="meater:meaterprobe:block:probe1:cookElapsedTime"}
Number:Time        Probe1CookRemainingTime     {channel ="meater:meaterprobe:block:probe1:cookRemainingTime"}
DateTime           Probe1CookEstimatedEndTime  {channel ="meater:meaterprobe:block:probe1:cookEstimatedEndTime"}
String             Probe1Status                {channel ="meater:meaterprobe:block:probe1:status"}
DateTime           Probe1LastConnection        {channel ="meater:meaterprobe:block:probe1:lastConnection"}

Number:Temperature Probe2InternalTemperature   {channel ="meater:meaterprobe:block:probe2:internalTemperature"}
Number:Temperature Probe2AmbientTemperature    {channel ="meater:meaterprobe:block:probe2:ambientTemperature"}
String             Probe2CookId                {channel ="meater:meaterprobe:block:probe2:cookId"}
String             Probe2CookName              {channel ="meater:meaterprobe:block:probe2:cookName"}
String             Probe2CookState             {channel ="meater:meaterprobe:block:probe2:cookState"}
Number:Temperature Probe2CookTargetTemperature {channel ="meater:meaterprobe:block:probe2:cookTargetTemperature"}
Number:Temperature Probe2CookPeakTemperature   {channel ="meater:meaterprobe:block:probe2:cookPeakTemperature"}
Number:Time        Probe2CookElapsedTime       {channel ="meater:meaterprobe:block:probe2:cookElapsedTime"}
Number:Time        Probe2CookRemainingTime     {channel ="meater:meaterprobe:block:probe2:cookRemainingTime"}
DateTime           Probe2CookEstimatedEndTime  {channel ="meater:meaterprobe:block:probe2:cookEstimatedEndTime"}
String             Probe2Status                {channel ="meater:meaterprobe:block:probe2:status"}
DateTime           Probe2LastConnection        {channel ="meater:meaterprobe:block:probe2:lastConnection"}

Number:Temperature Probe3InternalTemperature   {channel ="meater:meaterprobe:block:probe3:internalTemperature"}
Number:Temperature Probe3AmbientTemperature    {channel ="meater:meaterprobe:block:probe3:ambientTemperature"}
String             Probe3CookId                {channel ="meater:meaterprobe:block:probe3:cookId"}
String             Probe3CookName              {channel ="meater:meaterprobe:block:probe3:cookName"}
String             Probe3CookState             {channel ="meater:meaterprobe:block:probe3:cookState"}
Number:Temperature Probe3CookTargetTemperature {channel ="meater:meaterprobe:block:probe3:cookTargetTemperature"}
Number:Temperature Probe3CookPeakTemperature   {channel ="meater:meaterprobe:block:probe3:cookPeakTemperature"}
Number:Time        Probe3CookElapsedTime       {channel ="meater:meaterprobe:block:probe3:cookElapsedTime"}
Number:Time        Probe3CookRemainingTime     {channel ="meater:meaterprobe:block:probe3:cookRemainingTime"}
DateTime           Probe3CookEstimatedEndTime  {channel ="meater:meaterprobe:block:probe3:cookEstimatedEndTime"}
String             Probe3Status                {channel ="meater:meaterprobe:block:probe3:status"}
DateTime           Probe3LastConnection        {channel ="meater:meaterprobe:block:probe3:lastConnection"}

Number:Temperature Probe4InternalTemperature   {channel ="meater:meaterprobe:block:probe4:internalTemperature"}
Number:Temperature Probe4AmbientTemperature    {channel ="meater:meaterprobe:block:probe4:ambientTemperature"}
String             Probe4CookId                {channel ="meater:meaterprobe:block:probe4:cookId"}
String             Probe4CookName              {channel ="meater:meaterprobe:block:probe4:cookName"}
String             Probe4CookState             {channel ="meater:meaterprobe:block:probe4:cookState"}
Number:Temperature Probe4CookTargetTemperature {channel ="meater:meaterprobe:block:probe4:cookTargetTemperature"}
Number:Temperature Probe4CookPeakTemperature   {channel ="meater:meaterprobe:block:probe4:cookPeakTemperature"}
Number:Time        Probe4CookElapsedTime       {channel ="meater:meaterprobe:block:probe4:cookElapsedTime"}
Number:Time        Probe4CookRemainingTime     {channel ="meater:meaterprobe:block:probe4:cookRemainingTime"}
DateTime           Probe4CookEstimatedEndTime  {channel ="meater:meaterprobe:block:probe4:cookEstimatedEndTime"}
String             Probe4Status                {channel ="meater:meaterprobe:block:probe4:status"}
DateTime           Probe4LastConnection        {channel ="meater:meaterprobe:block:probe4:lastConnection"}

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

Review part 2 of 3

@lolodomo
Copy link
Contributor

Note for myself: remains the 2 handlers to review.

Copy link
Contributor

@robnielsen robnielsen left a comment

Choose a reason for hiding this comment

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

I took the descriptions from https://github.com/apption-labs/meater-cloud-public-rest-api. I might have missed some of them.

bundles/org.openhab.binding.meater/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.meater/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.meater/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.meater/README.md Outdated Show resolved Hide resolved
@jannegpriv
Copy link
Contributor Author

Thanks! :-)

I will use this as examples in the README.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
@jannegpriv
Copy link
Contributor Author

Updated after latest review comments, binding jar-file updated on community thread.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

Minor new comments for last commit.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
@jannegpriv
Copy link
Contributor Author

Updated after latest review comments, binding jar-file updated on community thread.

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! @lolodomo - my review part is completed, please feel free to merge when you are done with your part.

@jannegpriv
Copy link
Contributor Author

Thanks for your contribution! @lolodomo - my review part is completed, please feel free to merge when you are done with your part.

Thanks for your review! 👍

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

Here are my very final review comments, minor for most of them.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
@jannegpriv
Copy link
Contributor Author

Updated after latest review comments, binding jar-file updated on community thread.

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

Thank you for your patience and your quickness to answer to all our comments.

A very last one for the road.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

Thank you

@jannegpriv
Copy link
Contributor Author

Thank you for your patience and your quickness to answer to all our comments.

A very last one for the road.

It is me who should thank you guys doing these reviews on your spare time and helping me to learn more about openHAB and Java :-)

@jannegpriv
Copy link
Contributor Author

Updated after latest review comments, binding jar-file updated on community thread.

@lolodomo lolodomo merged commit c75485d into openhab:main Oct 16, 2022
@lolodomo
Copy link
Contributor

Now, you could add your binding's logo to the openHAB website. See https://www.openhab.org/docs/developer/bindings/#add-your-binding-s-logo-to-the-openhab-website

@lolodomo lolodomo added this to the 3.4 milestone Oct 16, 2022
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
* First version.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Nov 12, 2022
* First version.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this pull request Jan 8, 2023
* First version.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
* First version.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
* First version.

Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[meater] New binding for meater probes
4 participants