A Server serv at port 9000 for phicomm wukong m1 aircat, after you hijack DNS aircat.phicomm.com for your phicomm m1.
{
"ServerAddr": ":9000",
"RESTServerAddr": "localhost:8080",
"InfluxdbServer": "localhost:8086"
}
- RESTServerAddr serv at this address for changing brightness
- InfluxdbServer write data into influxdb(db=aircat),
phicomm-aircat-srv write data in console ,as if deleting this line if you dont use influxdb
- Change brightness
you can change brightness for (0,25,50,100)
curl -XPUT http://localhost:8080/v1/aircat --data "{\"brightness\":\"100\",\"type\":2}"
- Query latest air measurement
curl http://localhost:8080/v1/aircat
- Control device to report current air measurement
curl -XPUT http://localhost:8080/v1/aircat --data "{\"type\":5,\"status\":1}"
cd docker
docker-compose up -d
login in your grafana web at http://localhost:3000 with (admin/admin), enjoy it.
You can run phicomm-aircat-srv in router(ex. Phicomm k2p),too.
GOOS=linux GOARCH=mipsle go build github.com/corbamico/phicomm-aircat-srv/aircat-srv
- Serv at 9000
- REST Serv for changing brightness
- Output to influxDB
- docker-compose.yaml for influxDB/grafana
- default dashboard for grafana docker
- support more than one device
- version aircat-srv-rs: rust-lang version
- version aircat-srv-cs: dotnet core 3.1 version
- version aircat-srv-client: simulate aircat device, sending packet