wrapper API for whywaita's house.
There are configuration(authentication, infrared light) for IRKit in vars
package.
package vars
const (
JsonHomeLight = `{"format":"raw","freq":38,"data":[...]}` # toggle home light signal
JsonAirConOn = `{"format":"raw","freq":38,"data":[...]}` # Power On air‐conditioner
JsonAirConOff = `{"format":"raw","freq":38,"data":[...]}` # Power Off air‐conditioner
)
const (
ClientKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # your irkit client key
DeviceID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # your irkit device id
)
client key and device id for IRKit can get here IRKit Internet HTTP API
.
$ go get -u github.com/golang/dep/cmd/dep
$ dep ensure
$ go build .
yayoi have two mode (server & CLI). default mode is server.
$ ./yayoi -m server
$ ./yayoi # either possible
$ ./yayoi -m cli
if HomeLight down, you can type it.
$ ./yayoi -m cli
>>> irkit light off
HomeLight Off...