Skip to content

omegahiro/tapo-esp32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tapo-ESP32

Unofficial Tapo API Client for ESP32.

Device support

  • Supports Tapo P-series smart plugs and L-series smart lights.
  • Compatible with the latest Tapo firmware that uses the KLAP algorithm.
  • (Not supports Passthrough algorithm used in the older firmwares.)
  • Simple, lightweight, and easy-to-use API.

Prerequisites

  • Arduino IDE or PlatformIO.

Installation

Copy the following files into your project:

  • tapo_device.h
  • tapo_protocol.h
  • tapo_cipher.h

Example

#include <Arduino.h>
#include <WiFi.h>

#define TAPO_DEBUG_MODE // Comment this line to disable debug messages
#include "tapo_device.h"

TapoDevice tapo;

void setup() {
    Serial.begin(115200);

    // Connect to WiFi
    WiFi.begin("wifi-ssid", "wifi-password");
    while (WiFi.status() != WL_CONNECTED) {
        delay(1000);
        Serial.println("Connecting to WiFi...");
    }

    // Initialize Tapo device
    tapo.begin("device-ip-address", "tapo-username", "tapo-password");
    // Example: tapo.begin("192.168.1.100", "abc@example.com", "abc123");
}

void loop() {
    tapo.on(); // Turn on the device
    delay(5000);
    tapo.off(); // Turn off the device
    delay(5000);
}

Credits

Inspired by mihai-dinculescu/tapo.

About

Unofficial Tapo API Client for ESP32

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages