Giter VIP home page Giter VIP logo

phicomm-aircat-srv's Introduction

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

phicomm-aircat-srv's People

Contributors

corbamico avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.