1
Votes

tplink-cloud-api: Error: code=-23003v"App version is too old"

 
1
Votes

tplink-cloud-api: Error: code=-23003v"App version is too old"

tplink-cloud-api: Error: code=-23003v"App version is too old"
tplink-cloud-api: Error: code=-23003v"App version is too old"
a week ago

I am trying to use the Kasa tplink-cloud-api in my Node.js Express application. When I try to authenticate, i.e., const tplink = await login(username, password, terminalUUID), I get the error code noted in my subject line.

I've installed the latest version of tplink-cloud-api (0.8.1). I know that part of it is working because if I intentionally insert the wrong email, I get an error saying the email or password does not match.
 

The code is straightforward:

async function outletInfo() {  
    const username = "XXXX@gmail.com"; 
    const password = "XXXX"; const { v4: uuidv4 } = require('uuid'); 
    const terminalUUID = uuidv4();try {
 try {
    // Log in to the TP-Link Cloud API and get an instance
    const tplink = await login(username, password, terminalUUID);
    console.log("Logged in successfully. Token:", tplink.getToken());

    // Retrieve the device list registered to your account
    const deviceList = await tplink.getDeviceList();
    console.log("Device List:", JSON.stringify(deviceList, null, 2));

    // Assume you have a smart plug with an alias "My Smart Plug"
    const smartPlug = tplink.getHS100("My Smart Plug");

    // Toggle the smart plug (if it's on, this will turn it off; if off, it will turn it on)
    const toggleResponse = await smartPlug.toggle();
    console.log("Toggle Response:", JSON.stringify(toggleResponse, null, 2));

     } catch (error) {
    console.error("Error:", error);
  }
}
#1
Options
1 Reply
Re:tplink-cloud-api: Error: code=-23003v"App version is too old"
Tuesday

  @MattMel 
I have been told that their API is only for approved developers.  The code provided in GitHub (about 4-5 years ago) no longer works.  This makes it useless for me because I need to control them from a Javascript program hosted in the cloud.  I am now looking at Shelly because they have open API.  I woul only recommend Kasa (and, even then, probably not) for people who only want to control it through their app.

#2
Options