plasticrake / tplink-smarthome-api

TP-Link Smarthome WiFi API
MIT License
1.02k stars 141 forks source link

Adds HS103 to the compatible list #72

Closed TheNotary closed 5 years ago

TheNotary commented 5 years ago

I just validated that the HS103 works via the below command:

tplink-smarthome-api send <HOST>  '{"system":{"set_relay_state":{"state":1}}}'

Note: I joined it to my network via the Kasa app before playing around with automation libraries like this great one.

codecov[bot] commented 5 years ago

Codecov Report

Merging #72 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #72   +/-   ##
=======================================
  Coverage   94.27%   94.27%           
=======================================
  Files          24       24           
  Lines         909      909           
=======================================
  Hits          857      857           
  Misses         52       52

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a2e2598...0dd38fc. Read the comment docs.

plasticrake commented 5 years ago

Thanks! Can you provide the output of get_sysinfo? Please remove any personal information such as location.

TheNotary commented 5 years ago
$ tplink-smarthome-api getSysInfo 192.168.1.2
Sending getSysInfo command to 192.168.1.2:undefined ...
response:
{ sw_ver: '1.0.11 Build 190228 Rel.114520',
  hw_ver: '2.1',
  model: 'HS103(US)',
  deviceId: '8006FC9C97E6A3BE688A1018476E818A1B6AA731',
  oemId: '24B27E003E98D053CF8B51CE8086FDA8',
  hwId: '18967AEED1C89BED1BBC7F62FD06468A',
  rssi: -0,
  longitude_i: -0,
  latitude_i: -0,
  alias: 'plug1',
  mic_type: 'IOT.SMARTPLUGSWITCH',
  feature: 'TIM',
  mac: '68:FF:AMACADDRESS',
  updating: 0,
  led_off: 0,
  relay_state: 1,
  on_time: 48,
  active_mode: 'schedule',
  icon_hash: '',
  dev_name: 'Smart Wi-Fi Plug Lite',
  next_action: 
   { type: 1,
     id: '7CB89BED5F8B1BBC98066DF1CA1A1F39',
     schd_sec: 61200,
     action: 1 },
  err_code: 0 }

Blotted out my mac and RSSI, let me know if you need those, wasn't sure if sharing that is a good practice.

plasticrake commented 5 years ago

Thank you!