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

Configure the SSID #65

Open
markorajevic opened this issue Feb 11, 2019 · 6 comments
Open

Configure the SSID #65

markorajevic opened this issue Feb 11, 2019 · 6 comments

Comments

@markorajevic
Copy link

markorajevic commented Feb 11, 2019

Hi,

I wasn't able to find it in the documentation, but is it possible to send SSID & Password to plug somehow? So far I wasn't able to configure it in that way.

Post update:

Possible.
{"netif":{"set_stainfo":{"ssid":"WiFi","password":"secret","key_type":3}}}

@plasticrake
Copy link
Owner

You can send a custom command using send or sendCommand. I did not include a function for this as I didn't see it's use as the device would have to be on the network already to receive the command. How are you using it?

@plasticrake plasticrake self-assigned this Feb 15, 2019
@dustingraves
Copy link

I second this. I would like to be able to provision plugs automatically for a large scale project. After connecting to the local plug wifi, send new wifi config and go from there.

@dustingraves
Copy link

dustingraves commented May 17, 2019

Wifi configuration only seems to be possible when the device is in setup mode.

@markorajevic
Copy link
Author

@dustingraves Actually, I am sending this code manually for configuration:
let data = { "netif": { "set_stainfo": { "ssid": "ssid_name", "password": "password_here", "key_type": 3 } } }

@wcbonner
Copy link

I was really hoping to have this work as I was needing to migrate from one network SSID to another and I didn't want to have to reset the devices and set up my schedules from scratch.

Unfortunately the command seems to work on my HS110 but not the HS105, HS300, or LB110 devices...

pi@WimPi4:~/tplink-smartplug $ tplink-smarthome-api send 192.168.0.40 '{"netif":{"set_stainfo":{"ssid":"WiFi","password":"secret","key_type":3}}}'
Sending to 192.168.0.40: via tcp...
response:
{ netif: { set_stainfo: { mac: 'B0:4E:26:AE:4B:47', err_code: 0 } } }
pi@WimPi4:~/tplink-smartplug $ tplink-smarthome-api send 192.168.0.41 '{"netif":{"set_stainfo":{"ssid":"WiFi","password":"secret","key_type":3}}}'
Sending to 192.168.0.41: via tcp...
response:
{ netif: { set_stainfo: { err_code: 0 } } }

The first device I was trying happened to work and the device reconnected to my new SSID, and the response included the MAC ID. All the other devices responded without the MAC ID and remained on the old SSID.

If you have any other suggestions for me to investigate, I'd love feedback.

@mikejr83
Copy link

This would be helpful. For some reason the Kasa app does not register the HS220 I have correctly. It would be nice to be able to just send the network info from my laptop while connected to the switch's setup WiFi and not have to deal with the app on my phone.

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

No branches or pull requests

5 participants