pexcn / phicomm-aircat-srv

A Server serv at port 9000 for phicomm wukong m1 aircat, after you hijack DNS aircat.phicomm.com for your phicomm m1.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phicomm-aircat-srv

A Server serv at port 9000 for phicomm wukong m1 aircat, after you hijack DNS aircat.phicomm.com for your phicomm m1.

Configuration

{
    "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

Usage

Basic Usage

  • 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}"

Run in docker

cd docker
docker-compose up -d

login in your grafana web at http://localhost:3000 with (admin/admin), enjoy it.

screen

Compile&Run on router

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

Reference

arch

Todo

  • 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

About

A Server serv at port 9000 for phicomm wukong m1 aircat, after you hijack DNS aircat.phicomm.com for your phicomm m1.

License:GNU General Public License v3.0


Languages

Language:Rust 41.5%Language:C# 31.5%Language:Go 23.9%Language:Dockerfile 3.1%