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

Identifying a specific device if multiple devices are in the same wifi #133

Closed
dsc03 opened this issue Oct 17, 2018 · 3 comments
Closed
Labels

Comments

@dsc03
Copy link

dsc03 commented Oct 17, 2018

Hi there,

Appreciate you building this package. I have about 10 devices connected to the same wifi. I have 2 questions about this:

  1. I just tried making the discovery api call, and saw it can return me the number of devices in the wifi, but is there anyway to identify each device individually? Maybe by their MAC number for example?

  2. To make a discovery call, do I need to be on the same wifi as the devices? I'm asking because I was thinking of running this code from a remote server, but obviously the remote server won't be on the same wifi as the devices.

We're actually building a prototype for a hackathon, so if you could get back to us sooner than later that'd be greatly appreciated. Thanks again.

-Daniel

@rytilahti
Copy link
Collaborator

Hi, it is always interesting to hear what for people are using things, so if you want to elaborate later on, that'd be awesome! Answering those questions shortly:

  1. The discovery returns a list of SmartPlug/SmartBulb objects, you can simply request system info from all of them (see SmartDevice.sys_info()) . You will find the the mac addresses in the returned data.

  2. Yes, this library does not use any part of the cloud interface. There are some commands for the interface documented in https://github.com/softScheck/tplink-smartplug/blob/master/tplink-smarthome-commands.txt but none of those are implemented at the moment.

@dsc03
Copy link
Author

dsc03 commented Oct 17, 2018

Great! Number 1 makes sense and works for me =).

For #2, Is there another library that you're aware of that would allow us to perform the same actions but from different wifis?

@rytilahti
Copy link
Collaborator

Not really, no. Although if the device is exposed over the network, you can simply access it directly via its IP address.

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

No branches or pull requests

2 participants