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

[hccrubbishcollection] HCC Rubbish Collection Binding - Initial Contribution #9975

Merged
merged 12 commits into from Apr 30, 2021

Conversation

Cossey
Copy link
Contributor

@Cossey Cossey commented Jan 28, 2021

A binding that displays rubbish collection days for Hamilton City Council (New Zealand).

This binding is simple and polls a web API. It uses to the Fight the Landfill website rubbish collection API that I had discovered. This API displays the date when the recycling and the general rubbish will be collected as well as the collection day of week for an address, which gets pulled into channels.

There is also an event that triggers for the day of collection that also supports an offset of up to +- 2 days, in minutes. You can use the event in a rule so that you can do what you need, in my case I send myself a notification reminder to put out the rubbish the night before, using an offset of -300.

@Cossey Cossey added the new binding If someone has started to work on a binding. For a new binding PR. label Jan 28, 2021
@Cossey Cossey requested a review from a team as a code owner January 28, 2021 09:20
@Hilbrand Hilbrand changed the title HCC Rubbish Collection Binding [hccrubbishcollection] HCC Rubbish Collection Binding - Initial Contribution Jan 29, 2021
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.

Thanks for your contribution! I reviewed your code and here is my feedback.

Please add yourself to the CODEOWNERS file and add an entry to bom\openhab-addons\pom.xml.

@Cossey
Copy link
Contributor Author

Cossey commented Apr 21, 2021

Thanks @fwolter for the feedback, I will go ahead and make required corrections.

@Cossey
Copy link
Contributor Author

Cossey commented Apr 21, 2021

@fwolter all done. Thanks for reviewing.

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Add pattern to Collection Date items.
Add Options to Collection day channel.

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Remove incorrect commented tag.
Fix binding naming in XML files.

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Added additional comments into code.
Checks if binding is disposing to make sure already started processes do not execute.

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
@Cossey
Copy link
Contributor Author

Cossey commented Apr 28, 2021

I made a fix with gson and commented the code further.

I made additional improvements based on #10549 since I have designed these bindings in the same way.

@Cossey
Copy link
Contributor Author

Cossey commented Apr 28, 2021

@fwolter Can you review please and approve if it all looks okay? Thanks heaps!

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 as there are some formatting issues. You can fix them with mvn spotless:apply.

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
@Cossey
Copy link
Contributor Author

Cossey commented Apr 30, 2021

Apologies @fwolter, I missed that check after that last set of changes. All fixed now.

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.

@fwolter fwolter merged commit 02b4943 into openhab:main Apr 30, 2021
@fwolter fwolter added this to the 3.1 milestone Apr 30, 2021
@Cossey Cossey deleted the hccrubbishcollection branch May 2, 2021 06:51
themillhousegroup pushed a commit to themillhousegroup/openhab2-addons that referenced this pull request May 10, 2021
…ibution (openhab#9975)

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
computergeek1507 pushed a commit to computergeek1507/openhab-addons that referenced this pull request Jul 13, 2021
…ibution (openhab#9975)

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this pull request Oct 26, 2021
…ibution (openhab#9975)

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
…ibution (openhab#9975)

Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
…ibution (openhab#9975)

Signed-off-by: Stewart Cossey <stewart.cossey@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.

None yet

2 participants