Skip to content

Can't Control P100 Plug over Cloud API #115

Description

@LastPlayerTR

Description

Tapo devices (P100 plug, L530 bulb) return "Device is offline" (error -20571) even when the devices are online and controllable through the official Tapo app.

Probably root cause: Tapo devices from the Kasa device list are incorrectly treated as Kasa devices — they get cloud_type: "kasa", are POSTed to the Kasa app server (e.g., n-aps1-wap.tplinkcloud.com) instead of the Tapo gateway (n-aps1-wap-gw.tplinkcloud.com), and receive Kasa-format passthrough payloads instead of Tapo-format.

Device info

  • Device model: P100(EU)
  • Device firmware version: 1.4.3 Build 251205
  • Device type: SMART.TAPOPLUG

Environment

  • Python version: 3.13
  • tplink-cloud-api version: latest
  • OS: macOS

Steps to reproduce

  1. Log in with credentials that have Tapo devices on the account.
  2. Call device_manager.get_devices().
  3. Observe that the Tapo P100 plug is assigned cloud_type: "kasa" and class TPLinkDevice (fallback).
  4. Call device.get_sys_info() — it POSTs to the Kasa app server (n-aps1-wap.tplinkcloud.com) with a Kasa-format payload ({"system": {"get_sysinfo": null}}).
  5. The Kasa server returns -20571 "Device is offline" because Tapo devices cannot be reached through the Kasa passthrough endpoint.

What should happen

  1. Devices with deviceType: "SMART.TAPOPLUG" or "SMART.TAPOBULB" should be detected as Tapo regardless of which cloud's device list they appear in.
  2. Passthrough requests should POST to the Tapo gateway URL (n-aps1-wap-gw.tplinkcloud.com) returned by the Tapo login.
  3. requestData should use Tapo-format JSON: {"method": "get_device_info"} instead of {"system": {"get_sysinfo": null}}.
  4. Response parsing should handle Tapo's {"method": "get_device_info", "result": {...}} structure instead of Kasa's {"system": {"get_sysinfo": {...}}}.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions