This is the API server for sharing IR data of IRKit.
You can use the following procedure.
- Create IR data file(
irkit.json
) - Upload the IR data somewhere else.
- Deploy API server.
Please use it to deploy to any environment which is running Java such as Heroku. Before deploying, please the IR data file created using the girkit CLI
.
As below:
$ girkit --get tv_on
$ girkit --get tv_off
$ girkit --get airconditioner_on
$ girkit --get airconditioner_off
$ girkit --device:add myroom
$ ls ~/.irkit.json
/Users/yukung/.irkit.json
For IR Data files(irkit.json
) that have it compatible with output from the ruby-irkit
, it does not matter with a ruby-irkit
.
You need to server the public accessible web server irkit.json
. because it contains some private information to irkit.json
, please be placed in hard to guess the location. Such as Private Gist and Dropbox share link would be better.
You can deploy via Heroku deploy button. You need to specify the URL that was arranged irkit.json
the IRKIT_DATA_FILE
in deployment screen of Heroku.
After you deploy, please check the SECRET_TOKEN
of environment variable. Access destination of the URL is confirmed.
You can now in available!! if you send an HTTP request as follows:
$ curl -X POST https://your-app-name.herokuapp.com/SECRET_TOKEN/api/myroom/tv_on
Licensed under the terms of the Apache License, Version 2.0