Commit 79bf7193 authored by Kevin Yung's avatar Kevin Yung
Browse files

compréhension des reports en json et début de test

parent 08accb30
{
"node-red": {
"name": "node-red",
"version": "1.2.7",
"version": "1.2.9",
"local": false,
"nodes": {
"inject": {
......
......@@ -412,26 +412,6 @@
}
}
},
"node-red-contrib-cayenne-mqtt-client": {
"name": "node-red-contrib-cayenne-mqtt-client",
"version": "0.0.2",
"local": false,
"nodes": {
"client": {
"name": "client",
"types": [
"cayenne actuator-feedback",
"cayenne actuator",
"cayenne sensor",
"cayenne-client"
],
"enabled": true,
"local": false,
"module": "node-red-contrib-cayenne-mqtt-client",
"file": "/usr/src/node-red/node_modules/node-red-contrib-cayenne-mqtt-client/10-client.js"
}
}
},
"node-red-contrib-sms-free-mobile": {
"name": "node-red-contrib-sms-free-mobile",
"version": "0.1.0",
......@@ -449,52 +429,5 @@
"file": "/usr/src/node-red/node_modules/node-red-contrib-sms-free-mobile/sms-free-mobile.js"
}
}
},
"node-red-contrib-ttn": {
"name": "node-red-contrib-ttn",
"version": "2.0.5",
"local": false,
"nodes": {
"ttn-app": {
"name": "ttn-app",
"types": [
"ttn app"
],
"enabled": true,
"local": false,
"module": "node-red-contrib-ttn",
"file": "/usr/src/node-red/node_modules/node-red-contrib-ttn/ttn-app/ttn-app.js"
},
"ttn-event": {
"name": "ttn-event",
"types": [
"ttn event"
],
"enabled": true,
"local": false,
"module": "node-red-contrib-ttn",
"file": "/usr/src/node-red/node_modules/node-red-contrib-ttn/ttn-event/ttn-event.js"
},
"ttn-uplink": {
"name": "ttn-uplink",
"types": [
"ttn uplink"
],
"enabled": true,
"local": false,
"module": "node-red-contrib-ttn",
"file": "/usr/src/node-red/node_modules/node-red-contrib-ttn/ttn-uplink/ttn-uplink.js"
},
"ttn-downlink": {
"name": "ttn-downlink",
"types": [
"ttn downlink"
],
"enabled": true,
"local": false,
"module": "node-red-contrib-ttn",
"file": "/usr/src/node-red/node_modules/node-red-contrib-ttn/ttn-downlink/ttn-downlink.js"
}
}
}
}
\ No newline at end of file
......@@ -22,4 +22,4 @@ services:
file: grafana.yml
service: grafana
links:
- influxdb:influxdb
- influxdb:influxdb
\ No newline at end of file
{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjaGlycHN0YWNrLWFwcGxpY2F0aW9uLXNlcnZlciIsImV4cCI6MTYxNDE3NDM0NSwiaXNzIjoiY2hpcnBzdGFjay1hcHBsaWNhdGlvbi1zZXJ2ZXIiLCJuYmYiOjE2MTQwODc5NDUsInN1YiI6InVzZXIiLCJ1c2VybmFtZSI6IkNoaXJwc3RhY2tNb25pdG9yaW5nIn0.ODwUrVuJXCWKd4IWf_AMR_INWvU33bczGN9UvZuHSws"}
\ No newline at end of file
......@@ -7,8 +7,8 @@
# Generate the reports
# ------------------------------------------------
USERNAME=admin
PASSWORD=XXXXXXXXXXXXXXXX
USERNAME=ChirpstackMonitoring
PASSWORD=qX2bK6oN2iC1cQ5c
JWT=$(./get_jwt.sh $USERNAME $PASSWORD)
......
TODAY=$(date +"%Y-%m-%d")
#jq --raw-output -f gateways_to_html.jq .gateways.json | grep $TODAY
json1=$(jq -c ".result | sort_by(.lastSeenAt, .id) | reverse []" test_json1.json)
#json2=$(jq --raw-output ".result | sort_by(.lastSeenAt, .id) | reverse [] | (.id)" test_json2.json)
d1=$(jq --raw-output ".result | sort_by(.lastSeenAt, .id) | reverse [] | (.lastSeenAt)" test_json1.json)
#echo $json1
jq -c ".result | sort_by(.lastSeenAt, .id) | reverse []" test_json1.json | while read i; do
echo $i
echo "---"
#done
#for j1 in $json1
#do
#echo $j1
#echo "---"
#id=
#d1=$(jq --raw-output ".result | sort_by(.lastSeenAt, .id) | reverse [] | (.lastSeenAt)" test_json1.json |)
#echo $d1
done
\ No newline at end of file
{
"totalCount": "22",
"result": [
{
"id": "0000024b0805031a",
"name": "KER_107_POLYTECH",
"description": "LoRaServer Bridge",
"createdAt": "2020-08-12T12:49:20.213116Z",
"updatedAt": "2021-02-23T13:45:35.490898Z",
"firstSeenAt": "2020-11-30T14:33:34.452376Z",
"lastSeenAt": "2021-02-23T13:45:35.488962Z",
"organizationID": "6",
"networkServerID": "1",
"location": {
"latitude": 45.18434,
"longitude": 5.75338,
"altitude": 228,
"source": "UNKNOWN",
"accuracy": 0
}
},
{
"id": "7276ff0039030716",
"name": "KER_FEMTO_030716_P307",
"description": "Kerlink Wirnet iFemtoCell LoRaWAN Academy\nhttps://www.kerlink.fr/produit/wirnet-ifemtocell/\n\neth0 70:76:FF:02:07:7A\nwlan0 98:84:E3:BF:C7:D2\nIP 129.88.104.13\n",
"createdAt": "2020-10-09T10:37:41.392857Z",
"updatedAt": "2021-02-23T13:45:35.122199Z",
"firstSeenAt": "2021-01-30T14:06:43.965996Z",
"lastSeenAt": "2021-02-23T13:45:35.120423Z",
"organizationID": "6",
"networkServerID": "1",
"location": {
"latitude": 45.18439622301354,
"longitude": 5.753231048583985,
"altitude": 220,
"source": "UNKNOWN",
"accuracy": 0
}
},
{
"id": "7276ff0039030724",
"name": "KER_FEMTO_030724_P124",
"description": "Femto Kerlink - Semtech LoRa Academy\neth0 70:76:ff:02:07:88\nwlan0 F0:C7:7F:C9:DB:E7\nIP 129.88.104.12",
"createdAt": "2020-10-09T10:31:29.150691Z",
"updatedAt": "2021-02-23T13:45:35.782503Z",
"firstSeenAt": "2021-01-30T13:42:31.657870Z",
"lastSeenAt": "2021-02-23T13:45:35.780362Z",
"organizationID": "6",
"networkServerID": "1",
"location": {
"latitude": 45.18424498325449,
"longitude": 5.75310230255127,
"altitude": 220,
"source": "UNKNOWN",
"accuracy": 0
}
},
{
"id": "7276ff0039030871",
"name": "KER_FEMTO_030871_NP",
"description": "Kerlink Wirnet iFemtoCell LoRaWAN Academy https://www.kerlink.fr/produit/wirnet-ifemtocell/\n\neth0 70:76:FF:02:08:D4\nwlan0 98:84:E3:48:88:A2",
"createdAt": "2020-10-09T10:38:35.279330Z",
"updatedAt": "2021-02-23T13:45:40.803622Z",
"firstSeenAt": "2020-10-21T09:50:03.963231Z",
"lastSeenAt": "2021-02-23T13:45:40.801297Z",
"organizationID": "6",
"networkServerID": "1",
"location": {
"latitude": 45.19740133918228,
"longitude": 5.833740234375001,
"altitude": 0,
"source": "UNKNOWN",
"accuracy": 0
}
}
]
}
\ No newline at end of file
{
"totalCount": "22",
"result": [
{
"id": "0000024b0805031a",
"name": "KER_107_POLYTECH",
"description": "LoRaServer Bridge",
"createdAt": "2020-08-12T12:49:20.213116Z",
"updatedAt": "2021-02-23T13:45:35.490898Z",
"firstSeenAt": "2020-11-30T14:33:34.452376Z",
"lastSeenAt": "2021-02-23T13:45:35.488962Z",
"organizationID": "6",
"networkServerID": "1",
"location": {
"latitude": 45.18434,
"longitude": 5.75338,
"altitude": 228,
"source": "UNKNOWN",
"accuracy": 0
}
},
{
"id": "7276ff0039030716",
"name": "KER_FEMTO_030716_P307",
"description": "Kerlink Wirnet iFemtoCell LoRaWAN Academy\nhttps://www.kerlink.fr/produit/wirnet-ifemtocell/\n\neth0 70:76:FF:02:07:7A\nwlan0 98:84:E3:BF:C7:D2\nIP 129.88.104.13\n",
"createdAt": "2020-10-09T10:37:41.392857Z",
"updatedAt": "2021-02-23T13:45:35.122199Z",
"firstSeenAt": "2021-01-30T14:06:43.965996Z",
"lastSeenAt": "2021-02-23T13:45:35.120423Z",
"organizationID": "6",
"networkServerID": "1",
"location": {
"latitude": 45.18439622301354,
"longitude": 5.753231048583985,
"altitude": 220,
"source": "UNKNOWN",
"accuracy": 0
}
},
{
"id": "7276ff0039030724",
"name": "KER_FEMTO_030724_P124",
"description": "Femto Kerlink - Semtech LoRa Academy\neth0 70:76:ff:02:07:88\nwlan0 F0:C7:7F:C9:DB:E7\nIP 129.88.104.12",
"createdAt": "2020-10-09T10:31:29.150691Z",
"updatedAt": "2021-02-23T13:45:35.782503Z",
"firstSeenAt": "2021-01-30T13:42:31.657870Z",
"lastSeenAt": "2021-02-23T13:45:35.780362Z",
"organizationID": "6",
"networkServerID": "1",
"location": {
"latitude": 45.18424498325449,
"longitude": 5.75310230255127,
"altitude": 220,
"source": "UNKNOWN",
"accuracy": 0
}
},
{
"id": "7276ff0039030871",
"name": "KER_FEMTO_030871_NP",
"description": "Kerlink Wirnet iFemtoCell LoRaWAN Academy https://www.kerlink.fr/produit/wirnet-ifemtocell/\n\neth0 70:76:FF:02:08:D4\nwlan0 98:84:E3:48:88:A2",
"createdAt": "2020-10-09T10:38:35.279330Z",
"updatedAt": "2021-02-23T13:45:40.803622Z",
"firstSeenAt": "2020-10-21T09:50:03.963231Z",
"lastSeenAt": "2021-02-23T13:45:40.801297Z",
"organizationID": "6",
"networkServerID": "1",
"location": {
"latitude": 45.19740133918228,
"longitude": 5.833740234375001,
"altitude": 0,
"source": "UNKNOWN",
"accuracy": 0
}
}
]
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment