Code Monkey home page Code Monkey logo

sdwc's People

Contributors

a-wing avatar brandozhang avatar dependabot[bot] avatar gitgitgogogo avatar jiajiahuang avatar olalalalao avatar outloudvi avatar rocka avatar williamlsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdwc's Issues

before auto_run check status

Check 4 items

The result have into 5 levels

levels 5: success, primary, warning, danger, error
colour: green, blue, orange, red, black

wind_speed: m/s

level success

weather_realtime: wind_speed < 2 && rainfall_count == 0
weather_forecast: wind_speed < 2 && precipitation.local.intensity == 0
&& precipitation.nearest.distance < 5

level primary

weather_realtime: 2 =< wind_speed < 4 && rainfall_count < 5
weather_forecast: 2 =< wind_speed < 4 && precipitation.local.intensity < 0.1
&& precipitation.nearest.distance < 3

level warning

weather_realtime: 4 =< wind_speed < 6 && rainfall_count < 10
weather_forecast: 4 =< wind_speed < 6 && precipitation.local.intensity < 0.3
&& precipitation.nearest.distance < 2

level danger

weather_realtime: 6 =< wind_speed < 10 && rainfall_count < 15
weather_forecast: 6 =< wind_speed < 10 && precipitation.local.intensity < 0.4
&& precipitation.nearest.distance < 1

level error

Disable run

weather_realtime: 10 =< wind_speed && 15 =< rainfall_count
weather_forecast: 10 =< wind_speed && 0.4 =< precipitation.local.intensity
&& precipitation.nearest.distance < 0
status_air && status_depot ERROR

mqtt API Doc

Online Status

Sub: nodes/:id/status

-> 0

status_map = {
online: 0,
offline: 1,
neterror: 2
}

JSON-RPC

https://www.jsonrpc.org/

Send

Pub: nodes/:id/rpc/send

-> {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": "sdwc-1"}

Id must is the Unique id

Id must String

For sdwc:
Id: sdwc-<unique_id>

Recv

Sub: nodes/:id/rpc/recv

-> {"jsonrpc": "2.0", "result": 19, "id": "sdwc-1"}

Or

-> {"jsonrpc": "2.0", "error": {"code": -32601, "message": "Method not found"}, "id": "sdwc-1"}

Message

Sub: nodes/:id/message

-> {"heartbeat": {"battery": {"remain": 99, "voltage": 48280}, "flight": {"status": 3, "speed": 0.08756901323795319, "mode": 0, "time": "111"}, "gps": {"satellites": 4, "lat": 226878281, "height": 2.669999837875366, "type": 3, "lon": 1142245713}}}

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.