added doc
This commit is contained in:
parent
7c67644ccb
commit
80d2e3c1f9
28
README.md
28
README.md
@ -1,14 +1,20 @@
|
||||
# msv-clubhouse-node
|
||||
- Work in progress !
|
||||
- Technical demo
|
||||
|
||||
## Overview
|
||||
|
||||
![architecture diagram](doc/architecture.png)
|
||||
|
||||
## Hardware ##
|
||||
|
||||
[ESP32 LoRa 868MHz OLED DevBoard](https://de.aliexpress.com/item/33018609928.html)
|
||||
- [ESP32 LoRa 868MHz OLED DevBoard](https://de.aliexpress.com/item/33018609928.html)
|
||||
- [Bosch BMP280](https://de.aliexpress.com/item/1005003406725433.html)
|
||||
- [Reed Switch](https://de.aliexpress.com/item/1005004549803034.html)
|
||||
- [Wind speed sensor](https://de.aliexpress.com/item/1005001330214766.html)
|
||||
- [Wind direction sensor](https://de.aliexpress.com/item/4000590284491.html)
|
||||
|
||||
[Wind speed sensor](https://de.aliexpress.com/item/1005001330214766.html)
|
||||
|
||||
[Wind direction sensor](https://de.aliexpress.com/item/4000590284491.html)
|
||||
|
||||
## Build ##
|
||||
## Build Node Firmware
|
||||
|
||||
0. Clone repo
|
||||
1. Init GIT-submodules
|
||||
@ -43,7 +49,7 @@ TTN LoRa frequency / region
|
||||
- `nano /etc/systemd/system/msv-clubhouse-backend.service`
|
||||
- `systemctl daemon-reload && systemctl enable --now msv-clubhouse-backend.service`
|
||||
|
||||
JS Payload Formatter:
|
||||
## JS Payload Formatter
|
||||
|
||||
```
|
||||
function Decoder(bytes, port) {
|
||||
@ -116,4 +122,10 @@ function sflt162f(rawSflt16)
|
||||
|
||||
return f_unscaled;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
## Grafana Dashboard
|
||||
|
||||
see `frontend/`
|
||||
|
||||
![screenshot of grafana-dashboard](doc/screenshot_dashboard.png)
|
1
doc/architecture.drawio
Normal file
1
doc/architecture.drawio
Normal file
@ -0,0 +1 @@
|
||||
<mxfile host="app.diagrams.net" modified="2023-03-08T19:13:03.452Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" version="16.2.6" etag="yEJ7_XEJp48WvqINRjwf" type="device"><diagram id="C9XAk7C7BT5UWB5t5WFN" name="Page-1">7Vxbc+I6Ev41VJ19gLIs33iEEDJTk8lkktTOzhMlbAHeYyzWFiGcX38kW/JVgJOYy54kNZXYbUmWu1tfX9SaDrxavtxEaLX4TjwcdHTNe+nAUUfXAXBM9odTtinFdJyUMI98TzTKCY/+X1gQNUFd+x6OSw0pIQH1V2WiS8IQu7REQ1FENuVmMxKU37pCc1wjPLooqFN/+R5dpFRHt3P6F+zPF/LNwOqnT5ZINhZfEi+QRzYFErzuwKuIEJpeLV+ucMCZJ/mS9hvveJpNLMIhbdLhp734/XPyzXMnGlrM6O3Wdm67hpjtMwrW4ovFbOlWsiAi69DDfBStA4ebhU/x4wq5/OmGCZ3RFnQZsDvALgM0xcEQuX/Ok25XJCBRMgwcJz+syYyEVAga8C5iBjii+GXnt4GMY0zVMFliGm1ZE9HBkEwWWqZbek+KaJOLDchmi4LILEFDQlPm2eg5M9mF4OcreAvgYd4WOOdFZPWEojmmgtMzPwgK/PNM7HgGo8c0In/iwhNHn0LLaoeTsF/mJDC0Ght1FRvh8fhoHOYjW1wrfrkk3prThv/FlG7linUkIVuqRlNu7ZHsTh6COscUDJO0CAeI+s9lvFExUbzvnvhsctnLulLPhcDs8gBkNouZRlVlkE367WJpIJVXaPfMcbHrqrR76piGqbWj3XYD5bZPqtzmpem28anaXV0hFCtgHzecsos5v/iCA4pd1uj68R7yxrfkAfE+vClacqsYTuNVIoq0K5tJ1nuPjQWHbWxl6WCT6bGmWjpDXdOSJ9zkFhdb8tPOknIqS6qvtryqVWUfa1FZO+UXr1CYCeFK7wyG8Xoab2OKl/x2WJRWqa2Uf1SjSMLdj9F1I1kzXtOyQMuCC0mIK1IWJBT485Ddukw2mNGHXHI+c1YH4sHS97wEIlQaVPbjWhA9sM2y7M06nFoqND2W3O12TdJspqtNkm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aZHyp3pkxahaRT2c+hEQFcqAY6mHtdvUvEs9OnAs/n3qyKshpF82Rea5dURVTVhxR9pxL1DI+cCLeW5YSLThh0x2GKD/m/N9jTXKOZpCGZUK+Gyn4lA94RvOB7Lb/D+5TCvA8v8qFF7/DQ==</diagram></mxfile>
|
BIN
doc/architecture.png
Normal file
BIN
doc/architecture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 KiB |
BIN
doc/screenshot_dashboard.png
Normal file
BIN
doc/screenshot_dashboard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 186 KiB |
@ -36,21 +36,18 @@
|
||||
"description": "Wenn die Türe offen, dann ist wohl jemand am Platz.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"0": {
|
||||
"color": "red",
|
||||
"index": 1,
|
||||
"text": "Türe geschlossen"
|
||||
},
|
||||
"1": {
|
||||
"color": "green",
|
||||
"index": 0,
|
||||
"text": "Türe offen"
|
||||
},
|
||||
"1": {
|
||||
"color": "red",
|
||||
"index": 1,
|
||||
"text": "Türe geschlossen"
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
@ -68,7 +65,8 @@
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@ -80,8 +78,8 @@
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
@ -550,7 +548,7 @@
|
||||
},
|
||||
"editorMode": "builder",
|
||||
"expr": "msv_clubhouse_temperature",
|
||||
"legendFormat": "Luftdruck Außen",
|
||||
"legendFormat": "Temperatur Außen",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@ -558,6 +556,193 @@
|
||||
"title": "Tempertur Außen",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "x08D2Hlnz"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 2,
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "velocityms"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 15
|
||||
},
|
||||
"id": 16,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "x08D2Hlnz"
|
||||
},
|
||||
"editorMode": "builder",
|
||||
"expr": "msv_clubhouse_windspeed",
|
||||
"legendFormat": "Windgeschwindigkeit",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Windgeschwindigkeit ",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 23
|
||||
},
|
||||
"id": 14,
|
||||
"panels": [],
|
||||
"title": "Metadaten des Systems",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "x08D2Hlnz"
|
||||
},
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"0": {
|
||||
"color": "red",
|
||||
"index": 1,
|
||||
"text": "Error"
|
||||
},
|
||||
"1": {
|
||||
"color": "green",
|
||||
"index": 0,
|
||||
"text": "OK"
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 5,
|
||||
"x": 0,
|
||||
"y": 24
|
||||
},
|
||||
"id": 18,
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.3.6",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "x08D2Hlnz"
|
||||
},
|
||||
"editorMode": "builder",
|
||||
"expr": "msv_clubhouse_exporter_scrape_healthy",
|
||||
"legendFormat": "__auto",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Zustand TTN Scrape",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@ -620,8 +805,8 @@
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 15
|
||||
"x": 5,
|
||||
"y": 24
|
||||
},
|
||||
"id": 10,
|
||||
"options": {
|
||||
@ -714,8 +899,8 @@
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 15
|
||||
"x": 5,
|
||||
"y": 33
|
||||
},
|
||||
"id": 12,
|
||||
"options": {
|
||||
@ -761,6 +946,6 @@
|
||||
"timezone": "",
|
||||
"title": "MSV Moos Modellflugplatz",
|
||||
"uid": "nuH5csxVz",
|
||||
"version": 6,
|
||||
"version": 11,
|
||||
"weekStart": ""
|
||||
}
|
Loading…
Reference in New Issue
Block a user