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

[OmniLink] Binding Initial Contribution #8922

Merged
merged 1 commit into from
Jan 19, 2021
Merged

[OmniLink] Binding Initial Contribution #8922

merged 1 commit into from
Jan 19, 2021

Conversation

ecdye
Copy link
Contributor

@ecdye ecdye commented Nov 1, 2020

Initial contribution / migration from OH1 of the OmniLink Binding. Ported with permission from @craigham and @boc-tothefuture who were the primary developers of this code.

This was created to add support to the main OH code-base for the OmniLink protocol to allow for more usage of it's abilities.

Signed-off-by: Ethan Dye [email protected]

@cpmeister cpmeister changed the title [Initial Contribution] OmniLink Binding [OmniLink] Binding Initial Contribution Nov 1, 2020
@cpmeister cpmeister added new binding If someone has started to work on a binding. For a new binding PR. oh1 migration Relates to migrating an openHAB 1 addon to openHAB 2 labels Nov 1, 2020
@digitaldan
Copy link
Contributor

Hi @ecdye to be clear, you are submitting the work that @boc-tothefuture, @craigham, and myself had worked on as part of the OH2/3 port that we never got across the line for review (my guess is there will be a lot of review issues). Are you volunteering to maintain this code going forward and update it as necessary, both when this gets reviewed and after it gets published? Have you contributed any code to this binding yet other than some cosmetic logging changes? If you are planning on maintaining and improving it that would be awesome, but if not i would want our reviewers to know as there is a lot of code to review.

@digitaldan
Copy link
Contributor

I also noticed you forked my jomnilink project , made a small change to use a newer java version, then repointed this binding to your own version instead of submitting a PR on my project? any reason why? Would be nice to update the main one which gets pushed to maven central and used by other people.

@ecdye
Copy link
Contributor Author

ecdye commented Nov 1, 2020

Hi @ecdye to be clear, you are submitting the work that @boc-tothefuture, @craigham, and myself had worked on as part of the OH2/3 port that we never got across the line for review (my guess is there will be a lot of review issues).

Correct.

Are you volunteering to maintain this code going forward and update it as necessary, both when this gets reviewed and after it gets published?

Yes, for the foreseeable future.

Have you contributed any code to this binding yet other than some cosmetic logging changes? If you are planning on maintaining and improving it that would be awesome, but if not i would want our reviewers to know as there is a lot of code to review.

Nothing major, I have rewritten small parts for OH3 and fixed broken support for certain 'Things' like the Console Thing. Additionally, I have rewritten parts of the code as necessary in order to incorporate null annotations. I do not know how many new features I would add but I would certainly like to improve the current ones and make the binding more user friendly overall.

@ecdye
Copy link
Contributor Author

ecdye commented Nov 1, 2020

I also noticed you forked my jomnilink project , made a small change to use a newer java version, then repointed this binding to your own version instead of submitting a PR on my project? any reason why? Would be nice to update the main one which gets pushed to maven central and used by other people.

I was simply testing a change that I intend to submit to your repo but haven't yet. The change was relating to the only outstanding issue in your jomnilink repo. I will make a PR for you to review and incorporate in the next few days.

@boc-tothefuture
Copy link
Contributor

@ecdye I think it is important to note @digitaldan contributions to this binding and the openhab library. It wasn't just @craigham and myself.. I am also willing to support this binding going forward along with you. I just didn't have the time to put into the documentation to get it ready.

@digitaldan
Copy link
Contributor

Yes, for the foreseeable future.

Sounds great, happy to see someone pushing this across the line, although its a pity Leviton discontinued the Omni line of panels. Awesome that @boc-tothefuture volunteered to help, I'm available if you get stuck as well, although I just ordered a konnected.io system and plan to play around with that + noonlight for monitoring in leu of my omni, but thats a little ways off from being proved out, so my omni is still in use for the foreseeable future.

@boc-tothefuture
Copy link
Contributor

I would like to see @craigham sign off on this as well.. As it is his original work we all iterated off of. I would also think that the three of us (@digitaldan, @craigham and myself) would need to officially sign this work since we wrote the majority of it?

@craigham
Copy link
Contributor

craigham commented Nov 2, 2020

I have no problem handing this off to someone that can try and get this accepted. Lately I have become more of a user of openhab rather than helping develop bindings.

I do have 1 question. I have worked on several bindings in the past and it was nice to have each in a different branch within my addons fork. This PR looks to be merging to main. Is this necessary, or could it be done on a more specifically named branch?

What do you think @boc-tothefuture, @digitaldan ?

@boc-tothefuture
Copy link
Contributor

I have no problem handing this off to someone that can try and get this accepted. Lately I have become more of a user of openhab rather than helping develop bindings.

I do have 1 question. I have worked on several bindings in the past and it was nice to have each in a different branch within my addons fork. This PR looks to be merging to main. Is this necessary, or could it be done on a more specifically named branch?

What do you think @boc-tothefuture, @digitaldan ?

I think it goes to main when we PR it for official review.

@ecdye
Copy link
Contributor Author

ecdye commented Nov 2, 2020

@ecdye I think it is important to note @digitaldan contributions to this binding and the openhab library. It wasn't just @craigham and myself.. I am also willing to support this binding going forward along with you. I just didn't have the time to put into the documentation to get it ready.

I agree, it would be important for @digitaldan to sign it off, I am merely the one who is facilitating the review and submission of this.

I do have 1 question. I have worked on several bindings in the past and it was nice to have each in a different branch within my addons fork. This PR looks to be merging to main. Is this necessary, or could it be done on a more specifically named branch?

The main branch is used to facilitate the central deployment and development of bindings, in my branch of the openhab-addons repo, it is being developed on a separate branch.

@craigham
Copy link
Contributor

craigham commented Nov 2, 2020 via email

@ecdye
Copy link
Contributor Author

ecdye commented Nov 3, 2020

I have now linked everyone who helped in the creation of this binding as co-authors in the commit.

@fwolter fwolter self-assigned this Nov 16, 2020
Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

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

I reviewed 17 / 55 files that you get an impression what needs to be done.

Is the library jomnilink used by other projects than OH? How many active maintainers does it have?

@ecdye
Copy link
Contributor Author

ecdye commented Nov 16, 2020

@fwolter Thanks for the suggestions, I have made many uncommitted improvements as well and will add these concerns into my changes. jomnilink is not used by any other OH addons however it is essential to communicating with the OmniPro or Lumina controller, it is maintained by primarily @digitaldan with minor contributions from myself and @boc-tothefuture. I currently have an outstanding PR on the jomnilink repo that will provide the solution for many of the uncomitted changes that I mentioned.

Overall, once completed, with your suggestions, I feel that this PR will be much closer to a finished product.

@swamiller
Copy link

@ecdye I’m starting to dabble with OH3. If you need a tester, I’d be happy to help.

@ecdye
Copy link
Contributor Author

ecdye commented Dec 6, 2020

That would be great, mostly I going by what I know works because I use it. Right now I'm just waiting for @digitaldan to finish getting a PR for jomnilink so I can push a bunch of new changes.

@randye007
Copy link

Thanks so much @ecdye and @digitaldan for reviving the jomnilink binding for OH3. Is there a date you are working towards to getting this released?

Cheers,
Randy

@ecdye
Copy link
Contributor Author

ecdye commented Dec 16, 2020

Not right now, still waiting on @digitaldan but he is busy, I don't see any need to rush.

@ecdye ecdye requested a review from a team as a code owner December 16, 2020 16:43
@ecdye ecdye requested a review from fwolter December 16, 2020 17:18
Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

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

Your code doesn't compile.
OmnilinkHandlerFactory.java:[37,8] The import org.openhab.binding.omnilink.internal.handler.units cannot be resolved among others

@ecdye ecdye requested a review from fwolter December 20, 2020 20:08
Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

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

LGTM

bundles/org.openhab.binding.omnilink/pom.xml Outdated Show resolved Hide resolved
@fwolter fwolter added the cre Coordinated Review Effort label Dec 25, 2020
@ecdye
Copy link
Contributor Author

ecdye commented Jan 4, 2021

@fwolter I'm not sure how to fix it, but since I changed the Discovery Service implementation I can no longer scan to discover new items in the openHAB UI any ideas on how to fix this?

@digitaldan
Copy link
Contributor

@ecdye its hard for others to help if you force push every change as we can not see the change history, so it's not clear what the discovery looked like before and after. I'm guessing you are relying on the bridge handler now being passed in by the framework, have you added logging to make sure this is happening, can you narrow down if anything is being called in that class?

@digitaldan
Copy link
Contributor

Also i noticed this is in the logs when i start the binding:

- Could not register service for class=org.openhab.binding.omnilink.internal.discovery.OmnilinkDiscoveryService
java.lang.NoSuchMethodException: org.openhab.binding.omnilink.internal.discovery.OmnilinkDiscoveryService.<init>()

@ecdye
Copy link
Contributor Author

ecdye commented Jan 4, 2021

I understand this, but what I am referring to is @fwolter directed me to change the Discovery Service implementation to use ThingHandlerService but since I implemented that I can no longer find the automatic discovery option in the openHAB UI.

Before the service was using a componenet annotation and was working properly. I simply can't find any documentation about this issue as the documentation provided by @fwolter does not indicate that anything else needs to be done for this to work.

@digitaldan
Copy link
Contributor

but since I implemented that I can no longer find the automatic discovery option in the openHAB UI.

Did you see the error message i posted above ^^, there is an exception being thrown when it tries to register that class, its telling you
java.lang.NoSuchMethodException: org.openhab.binding.omnilink.internal.discovery.OmnilinkDiscoveryService.<init>() ,
this means the class does not have an empty (no params) constructor, it needs a public OmnilinkDiscoveryService(){...} constructor.

@ecdye
Copy link
Contributor Author

ecdye commented Jan 4, 2021

but since I implemented that I can no longer find the automatic discovery option in the openHAB UI.

Did you see the error message i posted above ^^, there is an exception being thrown when it tries to register that class, its telling you
java.lang.NoSuchMethodException: org.openhab.binding.omnilink.internal.discovery.OmnilinkDiscoveryService.<init>() ,
this means the class does not have an empty (no params) constructor, it needs a public OmnilinkDiscoveryService(){...} constructor.

Apparently I cannot read, testing now.

@randye007
Copy link

@ecdye - Thanks so much for your work on this binding port! I can confirm that I can successfully discover my OMNI items and that so far all functionality is working well. Will let you know if I run into any issues.

@ecdye
Copy link
Contributor Author

ecdye commented Jan 12, 2021

@J-N-K Any chance you could help get this in before the next release?

Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

Thanks. I have left some comments inside. Please make sure to go through all occurences of the points I mentioned (regarding REFRESH handlig, channelLinked handling, logging, datatypes - DecimalType vs. QuantityType).

@ecdye
Copy link
Contributor Author

ecdye commented Jan 15, 2021

@J-N-K I have updated the files to all use REFRESH would you take a look and see what you think?

@ecdye ecdye requested a review from J-N-K January 15, 2021 16:05
@ecdye
Copy link
Contributor Author

ecdye commented Jan 18, 2021

@J-N-K Any chance for a quick finish up of this PR?

Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

Last comment from my side.

@ecdye
Copy link
Contributor Author

ecdye commented Jan 19, 2021

@J-N-K Done. Can you approve and merge?

@ecdye ecdye requested a review from J-N-K January 19, 2021 19:08
J-N-K
J-N-K previously approved these changes Jan 19, 2021
@J-N-K
Copy link
Member

J-N-K commented Jan 19, 2021

Just waiting for Jenkins.

Signed-off-by: Ethan Dye <[email protected]>

Co-authored-by: Dan Cunningham <[email protected]>
Co-authored-by: Craig Hamilton <[email protected]>
Co-authored-by: Brian O'Connell <[email protected]>
@J-N-K
Copy link
Member

J-N-K commented Jan 19, 2021

What changed with your last push? If you force push the changes can‘t be shown.

@J-N-K J-N-K dismissed their stale review January 19, 2021 21:26

PR changed after approval.

@ecdye
Copy link
Contributor Author

ecdye commented Jan 19, 2021

Hmm, nothing changed... I updated for upstream change to allow PR to build correctly as @fwolter described.

Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

Ok

@boc-tothefuture
Copy link
Contributor

As it appears we are close to merging this I want to thank @ecdye for pushing this forward as a PR and @J-N-K for his devotion to ensuring there is a maintainable code base that contains best practices.

👏

@ecdye
Copy link
Contributor Author

ecdye commented Jan 19, 2021

All tests are good. I think we are ready.

@J-N-K J-N-K merged commit 63b8179 into openhab:main Jan 19, 2021
@J-N-K J-N-K added this to the 3.1 milestone Jan 19, 2021
themillhousegroup pushed a commit to themillhousegroup/openhab2-addons that referenced this pull request May 10, 2021
Signed-off-by: Ethan Dye <[email protected]>

Co-authored-by: Dan Cunningham <[email protected]>
Co-authored-by: Craig Hamilton <[email protected]>
Co-authored-by: Brian O'Connell <[email protected]>

Co-authored-by: Dan Cunningham <[email protected]>
Co-authored-by: Craig Hamilton <[email protected]>
Co-authored-by: Brian O'Connell <[email protected]>
Signed-off-by: John Marshall <[email protected]>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
Signed-off-by: Ethan Dye <[email protected]>

Co-authored-by: Dan Cunningham <[email protected]>
Co-authored-by: Craig Hamilton <[email protected]>
Co-authored-by: Brian O'Connell <[email protected]>

Co-authored-by: Dan Cunningham <[email protected]>
Co-authored-by: Craig Hamilton <[email protected]>
Co-authored-by: Brian O'Connell <[email protected]>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
Signed-off-by: Ethan Dye <[email protected]>

Co-authored-by: Dan Cunningham <[email protected]>
Co-authored-by: Craig Hamilton <[email protected]>
Co-authored-by: Brian O'Connell <[email protected]>

Co-authored-by: Dan Cunningham <[email protected]>
Co-authored-by: Craig Hamilton <[email protected]>
Co-authored-by: Brian O'Connell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cre Coordinated Review Effort new binding If someone has started to work on a binding. For a new binding PR. oh1 migration Relates to migrating an openHAB 1 addon to openHAB 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants