https://github.com/ww24/lirc-web-api
lirc client library for web
https://github.com/ww24/lirc-web-api
golang-package lirc
Last synced: over 1 year ago
JSON representation
lirc client library for web
- Host: GitHub
- URL: https://github.com/ww24/lirc-web-api
- Owner: ww24
- License: mit
- Created: 2016-12-18T06:52:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-13T02:21:38.000Z (almost 6 years ago)
- Last Synced: 2025-03-20T08:40:35.384Z (over 1 year ago)
- Topics: golang-package, lirc
- Language: Go
- Homepage:
- Size: 595 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LIRC Web API [](https://godoc.org/github.com/ww24/lirc-web-api) [](https://raw.githubusercontent.com/ww24/lirc-web-api/master/LICENSE)
[](https://app.wercker.com/project/byKey/b9a4cc28becedddbff9ee59b19a54f47)
[LIRC](http://www.lirc.org/) client implemented by golang.
Install
---
```
curl https://raw.githubusercontent.com/ww24/lirc-web-api/master/install.sh | sh
```
Usage
---
### Health check
```
curl http://localhost:3000/status
```
### List
```
curl http://localhost:3000/api/v1/signals
```
```json
{
"status":"ok",
"signals":[
{
"remote":"aircon",
"name":"on"
},
{
"remote":"aircon",
"name":"off"
}
]
}
```
### Send
```
curl -XPOST http://localhost:3000/api/v1/aircon/on
```
```
remote --> aircon
name --> on
```
OR
```
curl -XPOST http://localhost:3000/api/v1 -H"Content-Type:application/json" -d'{
"remote": "lighting",
"name": "up",
"duration": 5000
}'
```
Send a signal for a time if set "duration[ms]".
### Web Frontend
Open `http://localhost:3000/` in Google Chrome or Android Chrome.
Test
---
https://www.wercker.com/wercker-cli
```
wercker build
```