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

Session Cookie is undefined when using loginDeviceByIp #44

Open
josephdadams opened this issue Mar 15, 2024 · 1 comment
Open

Session Cookie is undefined when using loginDeviceByIp #44

josephdadams opened this issue Mar 15, 2024 · 1 comment

Comments

@josephdadams
Copy link

Hey there, I am getting this error when using loginDeviceByIp.

TypeError: Cannot read properties of undefined (reading '0')
    at /tp-link-tapo-connect/dist/klap-transport.js:82:65
    at step (/tp-link-tapo-connect/dist/klap-transport.js:48:23)
    at Object.next (/tp-link-tapo-connect/dist/klap-transport.js:29:53)
    at fulfilled (/tp-link-tapo-connect/dist/klap-transport.js:20:58)

The response headers look like this and are missing the session-cookie header:

{
  server: 'SHIP 2.0',
  'content-length': '49',
  'content-type': 'text/html'
}

Here is a sample device:

{
    deviceType: 'SMART.TAPOPLUG',
    role: 0,
    fwVer: '1.1.5 Build 230324 Rel.143956',
    appServerUrl: 'https://aps1-wap.tplinkcloud.com',
    deviceRegion: 'ap-southeast-1',
    deviceId: '8022DB4B77982E9653FB72000AF2DBA220AD76B7',
    deviceName: 'P100',
    deviceHwVer: '2.0',
    alias: '5 Aux LX Powerboard',
    deviceMac: '30DE4B81A391',
    oemId: 'E5BB4AABA271989E08B53330464D4144',
    deviceModel: 'P100(AU)',
    hwId: '7B605B6C691A174AEFBB7135F1C22659',
    fwId: '00000000000000000000000000000000',
    isSameRegion: false,
    status: 0
  }

Any thoughts? I will say that this plug is the AU (Australia) version - I am not seeing this error on a US version.

We are using this repository in this downstream project: https://github.com/bitfocus/companion-module-tplink-taposmartplug

@josephdadams
Copy link
Author

@Doogiechap this is the issue we are having with your plug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant