softScheck / tplink-smartplug

TP-Link WiFi SmartPlug Client and Wireshark Dissector
Apache License 2.0
1.14k stars 295 forks source link

Error asking for argument already specified... #11

Open ChopOMatic opened 7 years ago

ChopOMatic commented 7 years ago

What am I doing wrong here?

tplink-smartplug.py –t 10.0.0.127 –c system

usage: tplink-smartplug.py [-h] -t (-c | -j ) tplink-smartplug.py: error: argument -t/--target is required

cocohub commented 7 years ago

Have you tried: python tplink-smartplug.py –t "10.0.0.127" –c "on"

ChopOMatic commented 7 years ago

I've tried several commands, but not specifically "on." I've tried with and without quotes.

cocohub commented 7 years ago

I'm not quite sure what might be the issue, maybe it could be that your dash looks like "–" while my keyboard's dash looks like "-", so incorrect dash maybe? Try this: python tplink-smartplug.py -t 10.0.0.127 -c on

If that doesn't work, maybe you're target is incorrect? For example my smart plug's ip on the network is 192.168.0.28. You can find it if you connect to your router on 192.168.0.1. Try that and see if it helps.

ChopOMatic commented 7 years ago

Standard hyphen to the right of the "0" key up top, no shift.

I'm positive on the IP address. In fact, I've tried it with two different of these switches, with and without prefacing the command with 'python.' Same error every time.

BTW, Kasa controls them fine. They respond to pings. Even the TP-Link module in Home Assistant controls them without a hitch.

Big thx for responding. I appreciate it.

cocohub commented 7 years ago

Ok. It's cool man!

Have you changed the code or something?

ChopOMatic commented 7 years ago

Nope, using it exactly as downloaded from here. :(

cocohub commented 7 years ago

Which version of python are you using and which OS do you have?

ChopOMatic commented 7 years ago

Win10-64, Python 2.7