Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

HS103 Support #35

Open
PrabhanshuAttri opened this issue Mar 25, 2020 · 4 comments
Open

HS103 Support #35

PrabhanshuAttri opened this issue Mar 25, 2020 · 4 comments

Comments

@PrabhanshuAttri
Copy link

Hi @adumont

First of all, thank you for creating this library. I noticed that it doesn't contain support for HS103. I looked through the code and found a way to do it. HS100 class can be used to toggle the device.

Here is the code for HS103 to toggle the device.

const deviceFound = await tplink.findDevice(deviceName);
const hs103Device = new HS100(tplink, deviceFound);
await hs103Device.toggle();

I think if all devices in tplink.ts are exported (hs100, hs110, hs200, etc), the package can support more devices.

Let me know if you want me to work on this.

@ColinMcNeil
Copy link
Contributor

This repo doesn't get updated all that often

@adumont
Copy link
Owner

adumont commented Mar 25, 2020 via email

@adumont
Copy link
Owner

adumont commented Jun 6, 2020

Hi @PrabhanshuAttri , if the HS100 class works, why do you need a new class?

@PrabhanshuAttri
Copy link
Author

If HS100 is exported then this repository can support more devices. Currently, importing HS100 is kinda ugly and not dev friendly.

const __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};

const hs100 = __importDefault(require('./node_modules/tplink-cloud-api/distribution/hs100.js'));

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

No branches or pull requests

3 participants