Skip to content

evuraan/kakaPika

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kakaPika

Control TP-Link and Wemo "smart" devices.

kakaPika is a stand-alone binary that can control/query these devices.

License

GNU General Public License v3.0

About the name: Cuckoos and Crows

Cuckoos are an interesting species: They are brood parasites.

A number of popular algorithms are named after them:

  • Cuckoo Hashing - where the cuckoo chick pushes the other eggs or young out of the nest when it hatches.
  • Cuckoo Search - if a host bird discovers the eggs are not their own, they will either throw these alien eggs away or simply abandon its nest and build a new nest elsewhere.

Here's a verse in sanskrit, oldest living language on this interesting bird:

काकः कृष्णः पिकः कृष्णः को भेदः पिककाकयोः । 
वसन्तसमये प्राप्ते काकः काकः पिकः पिकः ॥

kākaḥ kṛṣṇaḥ pikaḥ kṛṣṇaḥ ko bhedaḥ pikakākayoḥ |
vasantasamaye prāpte kākaḥ kākaḥ pikaḥ pikaḥ ||

കാകഃ കൃഷ്ണഃ, പികഃ കൃഷ്ണഃ,
കോ ഭേദഃ പികകാകയോഃ?
വസന്തകാലേ സമ്പ്രാപ്തേ
കാകഃ കാകഃ, പികഃ പികഃ! 

In the wild, Cuckoos lay their eggs in Crow's nests. When chicks hatch, they all look and act the same.

How can one tell them a part?

Well, in the Spring, crow begin to caw and the cuckoos of the brood, cuckoo!

Crows, Cuckoos and the "smart" devices I have:

As the market is flooded with types and brands of "smarts," I found myself having to operate TP-Link's Kasa and Belkin's Wemo devices. They both come with their own "SmartPhone" app to control these devices. This was not acceptable and I wanted a single point of control for these devices.

I essentially don't care about their brand. I should be able to control them as I please.

I wrote kakaPika to that effect. I am hoping this would be useful to others who have both these devices.

Installing

From the Releases page, download the pre-built binary, suitable to your operating system, to a folder of your choice.

Compiling

Optionally, if you want to compile your own binary, you would need to install Go Programming Language.

Clone this repository and build as

$ go build 

Usage

How to operate and get status of your device:

help

Use the -h for help:

$ ./kakaPika -h
Usage: 
  -h  --help           print this usage and exit
  -d  --device         smartPlug hostname or address
  -c  --cmd            cmd to run: [on,off,stat]
  -v  --version        print version information and exit

status

Use stat argument to find the current status of your device:

$ ./kakaPika -d wemo_laundry -c stat 
device: wemo_laundry, cmd: stat
stat: off
.. later..
$ ./kakaPika -d wemo_laundry -c stat 
device: wemo_laundry, cmd: stat
stat: on

Control

Use on and off directives to control your device:

$ ./kakaPika -d wemo_laundry -c off
device: wemo_laundry, cmd: off
off: off

and,

$ ./kakaPika -d wemo_laundry -c on
device: wemo_laundry, cmd: on
on: on

Contribution

You are very welcome to contribute. If you have a new feature in mind, open an issue on github describing it.

References

About

Control TP-Link and Wemo "smart" devices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages