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

[Tapocontrol] Binding to control Tapo (by TP-Link) Devices #11111

Merged
merged 13 commits into from
Nov 28, 2021
Merged

[Tapocontrol] Binding to control Tapo (by TP-Link) Devices #11111

merged 13 commits into from
Nov 28, 2021

Conversation

wildcs
Copy link
Contributor

@wildcs wildcs commented Aug 15, 2021

TapoControl

this is the initial contribution of a new binding to control "Tapo SmartDevices"

Control Tapo (TP-Link) P100 WiFi-Sockets, L510 and 530 SmartBulbs with openhab

It's possible to switch the devices On/Off, change colors and brighness (if supported) and gather some informations from the devices.
The connection will be established between openhab and the device directly by ip-adresses but credentials for Tapo-cloud are required because the communication is encrypted with them.

compiled with maven and testet with the vs-code-developer-ide and one openhabian device

link to the source
link to the .jar

@wildcs wildcs requested a review from a team as a code owner August 15, 2021 10:32
@wildcs wildcs changed the title Tapocontrol [Tapocontrol] Binding to control Tapo (by TP-Link) Devices Aug 15, 2021
@fwolter fwolter added the new binding If someone has started to work on a binding. For a new binding PR. label Aug 15, 2021
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/tapocontrol-new-binding-for-tapo-smart-wifi-device/118389/1

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 the readme, so far.

bundles/org.openhab.binding.tapocontrol/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.tapocontrol/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.tapocontrol/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.tapocontrol/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.tapocontrol/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.tapocontrol/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.tapocontrol/README.md Outdated Show resolved Hide resolved
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.

The credential configuration looks good!

There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html after building it with mvn clean install.

There are some compiler warnings about null access left. You could take a look at mvn clean install. To fix these, you need to store the field to a local variable and do the null check on that.

The sign off message needs to be your full name and have a valid email address. You can post the complete line in the comments, I will adopt it during merging, then.

.gitignore Outdated Show resolved Hide resolved
@wildcs
Copy link
Contributor Author

wildcs commented Nov 8, 2021

Thanks very very much to @daMihe to help me fixing my github history.
Hope i learned enough to keep it clean now.

Signed-off-by: Christian Wild <christian@wild-bw.de>
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.

Great that you two figured it out! Looking forward seeing the fixing tutorial!

Is this ready for review again? I only reviewed the discovery for now.

@wildcs
Copy link
Contributor Author

wildcs commented Nov 9, 2021

Is this ready for review again? I only reviewed the discovery for now.

Would be great if you can review it all. So i can fix all review remarks next week. Binding looks to work good in that version so no bigger changes should be necessary at the moment.

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.

There are some compiler warnings about null access left. You could take a look at mvn clean install. To fix these, you need to store the field to a local variable and do the null check on that.

There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html after building it with mvn clean install.

@wildcs
Copy link
Contributor Author

wildcs commented Nov 19, 2021

So guys. I think i resolved all review-requests.
Hope code is clean now.
No entrys in analysis-report, test things were "outsourced" into \src\test, testers seems to be satisfied :P
Let me know if there are still problems.

Anyway big THX to all reviewers (of any plugin etc.) for the time you spent into this and help others to get better 👍 👍

@wildcs wildcs requested a review from fwolter November 19, 2021 23:30
Signed-off-by: Christian Wild <christian@wild-bw.de>
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.

There are some compiler warnings about null access left. You could take a look at mvn clean install. To fix these, you need to store the field to a local variable and do the null check on that.

I re-reviewed the readme for now.

bundles/org.openhab.binding.tapocontrol/README.md Outdated Show resolved Hide resolved
Signed-off-by: Christian Wild <christian@wild-bw.de>
@wildcs wildcs requested a review from fwolter November 25, 2021 20:30
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

@fwolter fwolter merged commit 612afd2 into openhab:main Nov 28, 2021
@fwolter fwolter added this to the 3.2 milestone Nov 28, 2021
@fwolter
Copy link
Member

fwolter commented Nov 29, 2021

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

wildcs added a commit to wildcs/openhab-docs that referenced this pull request Dec 2, 2021
added logo for tapocontrol-binding wich is merged with pull-request openhab/openhab-addons#11111
wildcs added a commit to wildcs/openhab-docs that referenced this pull request Dec 2, 2021
added logo for tapocontrol-binding wich is merged with pull-request openhab/openhab-addons#11111

Signed-off-by: Christian Wild <christianwild-bw.de>
Confectrician pushed a commit to openhab/openhab-docs that referenced this pull request Dec 2, 2021
added logo for tapocontrol-binding wich is merged with pull-request openhab/openhab-addons#11111

Signed-off-by: Christian Wild <christianwild-bw.de>
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
…1111)

* [tapocontrol] New Source Upload

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Delete bundles/org.openhab.binding.tapocontrol directory

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Snapshot 3.2

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update CODEOWNERS

Fixed bindingname

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update README.md

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] new "Bridge-Version"

Credentials (TapoCloud) where now set in a bridge device.
Things now had to be attached to a bridge.

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed device discovery bug

fixed device discovery bug
added bridge to thing-types.xml

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update bundles/org.openhab.binding.tapocontrol/README.md

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] code cleanup and optimization

- general code cleanup and optimization
- limited max connections and queued requests to 10 per destination
- device error handling revised
- review remarks of pull request processed

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] solved review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] LightStrip L900 basicly supported

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed compiler warnings

Signed-off-by: Christian Wild <christian@wild-bw.de>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
mischmidt83 pushed a commit to mischmidt83/openhab-addons that referenced this pull request Jan 9, 2022
…1111)

* [tapocontrol] New Source Upload

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Delete bundles/org.openhab.binding.tapocontrol directory

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Snapshot 3.2

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update CODEOWNERS

Fixed bindingname

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update README.md

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] new "Bridge-Version"

Credentials (TapoCloud) where now set in a bridge device.
Things now had to be attached to a bridge.

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed device discovery bug

fixed device discovery bug
added bridge to thing-types.xml

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update bundles/org.openhab.binding.tapocontrol/README.md

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] code cleanup and optimization

- general code cleanup and optimization
- limited max connections and queued requests to 10 per destination
- device error handling revised
- review remarks of pull request processed

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] solved review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] LightStrip L900 basicly supported

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed compiler warnings

Signed-off-by: Christian Wild <christian@wild-bw.de>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
…1111)

* [tapocontrol] New Source Upload

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Delete bundles/org.openhab.binding.tapocontrol directory

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Snapshot 3.2

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update CODEOWNERS

Fixed bindingname

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update README.md

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] new "Bridge-Version"

Credentials (TapoCloud) where now set in a bridge device.
Things now had to be attached to a bridge.

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed device discovery bug

fixed device discovery bug
added bridge to thing-types.xml

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update bundles/org.openhab.binding.tapocontrol/README.md

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] code cleanup and optimization

- general code cleanup and optimization
- limited max connections and queued requests to 10 per destination
- device error handling revised
- review remarks of pull request processed

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] solved review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] LightStrip L900 basicly supported

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed compiler warnings

Signed-off-by: Christian Wild <christian@wild-bw.de>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
volkmarnissen pushed a commit to volkmarnissen/openhab-addons that referenced this pull request Mar 3, 2022
…1111)

* [tapocontrol] New Source Upload

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Delete bundles/org.openhab.binding.tapocontrol directory

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Snapshot 3.2

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update CODEOWNERS

Fixed bindingname

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update README.md

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] new "Bridge-Version"

Credentials (TapoCloud) where now set in a bridge device.
Things now had to be attached to a bridge.

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed device discovery bug

fixed device discovery bug
added bridge to thing-types.xml

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update bundles/org.openhab.binding.tapocontrol/README.md

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] code cleanup and optimization

- general code cleanup and optimization
- limited max connections and queued requests to 10 per destination
- device error handling revised
- review remarks of pull request processed

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] solved review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] LightStrip L900 basicly supported

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed compiler warnings

Signed-off-by: Christian Wild <christian@wild-bw.de>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
…1111)

* [tapocontrol] New Source Upload

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Delete bundles/org.openhab.binding.tapocontrol directory

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Snapshot 3.2

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update CODEOWNERS

Fixed bindingname

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update README.md

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] new "Bridge-Version"

Credentials (TapoCloud) where now set in a bridge device.
Things now had to be attached to a bridge.

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed device discovery bug

fixed device discovery bug
added bridge to thing-types.xml

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update bundles/org.openhab.binding.tapocontrol/README.md

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] code cleanup and optimization

- general code cleanup and optimization
- limited max connections and queued requests to 10 per destination
- device error handling revised
- review remarks of pull request processed

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] solved review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] LightStrip L900 basicly supported

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed compiler warnings

Signed-off-by: Christian Wild <christian@wild-bw.de>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
…1111)

* [tapocontrol] New Source Upload

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Delete bundles/org.openhab.binding.tapocontrol directory

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Snapshot 3.2

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update CODEOWNERS

Fixed bindingname

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update README.md

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] new "Bridge-Version"

Credentials (TapoCloud) where now set in a bridge device.
Things now had to be attached to a bridge.

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed device discovery bug

fixed device discovery bug
added bridge to thing-types.xml

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] Update bundles/org.openhab.binding.tapocontrol/README.md

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] code cleanup and optimization

- general code cleanup and optimization
- limited max connections and queued requests to 10 per destination
- device error handling revised
- review remarks of pull request processed

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] solved review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] LightStrip L900 basicly supported

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed review requests

Signed-off-by: Christian Wild <christian@wild-bw.de>

* [tapocontrol] fixed compiler warnings

Signed-off-by: Christian Wild <christian@wild-bw.de>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
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

5 participants