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

Autelis Pool Control for OpenHAB2 #168

Merged
merged 1 commit into from
Apr 22, 2015
Merged

Conversation

digitaldan
Copy link
Contributor

I thought I would start with porting a relatively easy binding to get familiar with how OH2 works.

@kaikreuzer
Copy link
Member

A thing with 50 channels is an easy one to start with...? Well, if you say so ;-)
Will try to provide feedback soon.

@kaikreuzer kaikreuzer added the new binding If someone has started to work on a binding. For a new binding PR. label Mar 21, 2015
@kaikreuzer kaikreuzer self-assigned this Mar 21, 2015
@kaikreuzer kaikreuzer modified the milestone: 2.0.0 alpha2 Apr 4, 2015
@@ -0,0 +1,11 @@
# binding
Copy link
Member

Choose a reason for hiding this comment

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

You should remove this file - it is meant as an example on how to provide localized texts in other languages.

@kaikreuzer
Copy link
Member

Thanks @digitaldan, I am done with my first review - waiting for your updates!

@kaikreuzer
Copy link
Member

Just a last question: Does this controller provide any means of discovery, e.g. through UPnP or mDNS/Bonjour?

@digitaldan
Copy link
Contributor Author

@kaikreuzer thanks for the review! It does not support a traditional discovery, but by default it sets its dns name (though dhcp) to "poolcontrol" which is how they recommend finding it on your network. I was actually planning doing this now that I understand how autodiscovery works ( having implemented it for the squeezebox addon). Also, what is the policy on squashing commits? I know that the growing commit history on OH has been an issue.

@kaikreuzer
Copy link
Member

Ok, so discovery could be an additional PR then, if it works through the hostname. Maybe this could somehow be combined with the network binding, which scans the network for all IP devices?

Also, what is the policy on squashing commits?

See https://github.com/openhab/openhab2/blob/master/CONTRIBUTING.md#conventions:
Before the pull request is merged, make sure that you squash your commits into logical units of work using git rebase -i and git push -f.
But please now first wait until I have reviewed the caching part. Thanks!


@Override
protected void startBackgroundDiscovery() {
new Thread(new Runnable() {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of creating a new thread, could you please use the available scheduler field from AbstractDiscoveryService?

@kaikreuzer
Copy link
Member

Looks good, thanks. Besides the small review comments, may I ask you to

  • apply the code formatter (you tend to not put spaces in ){)
  • update the license headers (run mvn license:format)
  • squash your commits into a single one

@digitaldan
Copy link
Contributor Author

No problem, I will make those changes shortly.

@digitaldan
Copy link
Contributor Author

@kaikreuzer if I run mvn license:format on just my binding it fails, complaining it can't find "src/etc/header.txt" , If i run it against the root of the project it works, but modifies just about everything. Is there any easy fix or should I just manually update the headers?

@buildhive
Copy link

openhab » openhab2 #16 FAILURE
Looks like there's a problem with this pull request
(what's this?)

@buildhive
Copy link

openhab » openhab2 #17 FAILURE
Looks like there's a problem with this pull request
(what's this?)

@buildhive
Copy link

openhab » openhab2 #18 FAILURE
Looks like there's a problem with this pull request
(what's this?)

Signed-off-by: Dan Cunningham <dan@digitaldan.com> (github: @digitaldan)
@buildhive
Copy link

openhab » openhab2 #19 FAILURE
Looks like there's a problem with this pull request
(what's this?)

@digitaldan
Copy link
Contributor Author

Sorry about the cloudbees noise, my rebase did not go as smooth as usual. Its failing now on the Astro binding due to the thing status refactoring. I'm not sure how my commit would cause this, but it looks like an easy enough fix, let me know what you want to do.

@kaikreuzer
Copy link
Member

Yeah, my mistake, the new status handling broke the API, which I did not notice before :-(
Will do an update this morning to get things compiling again!

@kaikreuzer
Copy link
Member

@kaikreuzer
Copy link
Member

if I run mvn license:format on just my binding it fails

Yes, this is right, it only works from the root.
You could simply revert all changes that are not within your binding. But never mind: I will merge it and fix the headers myself.

@kaikreuzer kaikreuzer merged commit c1ef6c8 into openhab:master Apr 22, 2015
@digitaldan
Copy link
Contributor Author

Thanks Kai! Btw, when i ran maven it put "2014-2014" in the header message, I see in the header.txt file its "2014-${year}" so I'm not sure what was pulling 2014 vs 2015 for the year variable.

@kaikreuzer
Copy link
Member

The year is set in here: https://github.com/openhab/openhab2/blob/master/pom.xml#L158
Probably, you still had an older version of this pom.

@kaikreuzer
Copy link
Member

@digitaldan: May I ask you to create a short documentation for this binding until Sunday (May 24th)?
I have created a short guide on how to do it: https://github.com/eclipse/smarthome/blob/master/docs/sources/development/extensions/bindings/docs.md
As an example how the result could look like, please see https://github.com/eclipse/smarthome/blob/master/addons/binding/org.eclipse.smarthome.binding.hue/README.md.
Thanks!

@kaikreuzer
Copy link
Member

@digitaldan: Just noticed that the README.md is still missing - would you manage to add a very short one asap? Would be good to have at least something; everything is better than a 404 link ;-)

@digitaldan
Copy link
Contributor Author

Agreed! See my latest PR, is contains a basic README (I'll revise it over the next few weeks) and a small thing xml fix.

@digitaldan digitaldan deleted the autelis branch October 25, 2021 03:56
Flole998 pushed a commit to Flole998/openhab-addons that referenced this pull request Dec 30, 2021
Signed-off-by: Kai Kreuzer <kai@openhab.org>
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.

4 participants