homedash / kankun-json

A CGI script that provides a simple web interface and RESTful JSON API for the Kankun Small K wifi switch.
http://homedash.org
MIT License
34 stars 25 forks source link

First run at toggle endpoint for the json.cgi API #5

Closed Japh closed 9 years ago

Japh commented 9 years ago

I think this code could possibly be a little simpler. Bash is a bit painful that way. But now there's a toggle endpoint!

Press the button. Light's on? It goes off. Light's off? It goes on.