Skip to content
forked from piki/kasa

Raw TP-Link Kasa command sender/receiver

Notifications You must be signed in to change notification settings

dawm/kasaRAWjson

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Raw TP-Link (Kasa) command sender/receiver

Each invocation sends a single command and receives a single packet in response.

This program is a minimal substitute for the tplink-lightbulb Node package. Because it's C, it's about 40x faster than the Node package. On a Raspberry Pi, that matters.

Building:
make

Usage:
./kasa <ip-address> <json-blob>

There's a good list of JSON blobs to try here:
https://github.com/softScheck/tplink-smartplug/blob/master/tplink-smarthome-commands.txt
Especially:

  • get bulb info: ./kasa <ip> '{"system":{"get_sysinfo":null}}'
  • turn bulb on: ./kasa <ip> '{"system":{"set_relay_state":{"state":1}}}'
  • turn bulb off: ./kasa <ip> '{"system":{"set_relay_state":{"state":0}}}'

Written by Patrick Reynolds [email protected]

Released into the public domain, or Creative Commons CC0, your choice.

About

Raw TP-Link Kasa command sender/receiver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.5%
  • Makefile 2.5%