Skip to content

labgrid/driver/power: Add Tapo(Kasa) smart plug support#1555

Closed
onurcelep wants to merge 1 commit intolabgrid-project:masterfrom
onurcelep:tapo-smart-plug
Closed

labgrid/driver/power: Add Tapo(Kasa) smart plug support#1555
onurcelep wants to merge 1 commit intolabgrid-project:masterfrom
onurcelep:tapo-smart-plug

Conversation

@onurcelep
Copy link
Copy Markdown

Description
Adds power driver integration for Tapo Smart plugs with Klap authentication.
python-kasa requires KASA_USERNAME and KASA_PASSWORD environment variables to be set to handle the authentication.

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

Signed-off-by: Onur Celep <onurcelep@gmail.com>
Copy link
Copy Markdown
Member

@Emantor Emantor left a comment

Choose a reason for hiding this comment

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

The tp-link power driver also uses the kasa plugin, but seems to be much simpler since it employs the SmartStrip abstraction. Is there something similar inside kasa for smart plugs?

@onurcelep
Copy link
Copy Markdown
Author

Apparently available class for Tapo smart plugs is smart.SmartDevice , tried to find similar abstraction as SmartStrip but unfortunately not available 🫤
Introducing KlapTransportV2 auth type of transport particularly brings the complexity here. I just fetched that information from debugging while using python-kasa on my local to power on/off devices

@onurcelep onurcelep closed this Mar 19, 2026
@onurcelep
Copy link
Copy Markdown
Author

Closing in favor of #1630 which provides a more complete implementation kasa API version compatibility (< 0.10.0 and >= 0.10.0), power strip support via device.children, proper unit tests, and type annotations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants