Compare commits
108 Commits
Author | SHA1 | Date | |
---|---|---|---|
361014cb4b | |||
4a2c53cd7b | |||
9bb0d0031a | |||
b1f57abc9e | |||
ab6589017f | |||
be20925d98 | |||
605bd06fc7 | |||
03268cf3a2 | |||
82a409357a | |||
3499522faf | |||
d1969fa48f | |||
8548e9c68e | |||
508e01e142 | |||
1a02a7ca13 | |||
f4bb69ea4e | |||
ff8eebefb9 | |||
5187d45ca9 | |||
e4b3749af7 | |||
73915c9121 | |||
9271f66777 | |||
ebebc9400e | |||
68eb7a44fe | |||
db8523b7ff | |||
e80cbcd019 | |||
4fda08d315 | |||
9725bed346 | |||
ed6118c6a4 | |||
48f8e63336 | |||
acefe93961 | |||
d5581fb8c3 | |||
cb1b8584dd | |||
db960c1049 | |||
dd48e70aa7 | |||
627c9989f8 | |||
ccdc2750b2 | |||
e709474279 | |||
49225234cc | |||
e2c2e48dbe | |||
ef827f6723 | |||
780be939b3 | |||
8c73e5838a | |||
5d97ade2cb | |||
bb38a7ab5c | |||
1c99551355 | |||
c4261ba7b3 | |||
98a4a5eef2 | |||
2430905298 | |||
c056fbd471 | |||
1c99a7bbe5 | |||
028e894611 | |||
26cb87a19f | |||
74588e9613 | |||
4db015184f | |||
59e336f209 | |||
5cd430c882 | |||
b42b581a51 | |||
115e79b691 | |||
8cdf82a085 | |||
38f1a0dbd6 | |||
add8182abe | |||
9724da5f44 | |||
d0d0e98c39 | |||
d64f8dbe81 | |||
bbe351ddb4 | |||
1b47368060 | |||
fa405a9327 | |||
e3ad6376b1 | |||
85ef246891 | |||
0175220f46 | |||
b474a9a626 | |||
2a89737182 | |||
a2f3493fe9 | |||
becd560404 | |||
4d156ba5c7 | |||
83adfda1e1 | |||
277c8e5d2c | |||
c609a48b22 | |||
cf22bc931c | |||
f930168319 | |||
9081338ebb | |||
f2bc08c8b8 | |||
14c56e4a51 | |||
fee26190d8 | |||
5531c8a6ca | |||
d494e08288 | |||
ff61449429 | |||
43b1cbd0ec | |||
7619e178f0 | |||
8f07275b7a | |||
121979bd1a | |||
c04b6a6c8a | |||
23f0649e8d | |||
62f81cd129 | |||
02a0398f30 | |||
b0fb832f63 | |||
dc5a41b1ef | |||
eef1b4b53d | |||
3616f919ae | |||
50b5962b21 | |||
47c3bf666a | |||
52f2a952c6 | |||
7786877080 | |||
5be5ffbbc5 | |||
83dc006840 | |||
c0bcc581ac | |||
91589509e0 | |||
5900f241a1 | |||
460e1ad77f |
17
.drone.yml
17
.drone.yml
@ -1,17 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
name: validate-json
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: validate ucDevices.json
|
|
||||||
image: fftdf/docker-json-validate
|
|
||||||
commands:
|
|
||||||
- jsonlint ucDevices.json
|
|
||||||
when:
|
|
||||||
event: push
|
|
||||||
|
|
||||||
- name: validate Devices.json
|
|
||||||
image: fftdf/docker-json-validate
|
|
||||||
commands:
|
|
||||||
- jsonlint devices.json
|
|
||||||
when:
|
|
||||||
event: push
|
|
30
.woodpecker.yml
Normal file
30
.woodpecker.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
platform: linux/arm64
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
validate_rifu:
|
||||||
|
image: git.freifunk-rhein-sieg.net/freifunk-troisdorf/docker-json-validate
|
||||||
|
commands:
|
||||||
|
- jsonlint rifu_devices.json
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
|
||||||
|
validate_router:
|
||||||
|
image: git.freifunk-rhein-sieg.net/freifunk-troisdorf/docker-json-validate
|
||||||
|
commands:
|
||||||
|
- jsonlint uisp_router.json
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
|
||||||
|
validate_unifi:
|
||||||
|
image: git.freifunk-rhein-sieg.net/freifunk-troisdorf/docker-json-validate
|
||||||
|
commands:
|
||||||
|
- jsonlint unifi_devices.json
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
|
||||||
|
validate_gateways:
|
||||||
|
image: git.freifunk-rhein-sieg.net/freifunk-troisdorf/docker-json-validate
|
||||||
|
commands:
|
||||||
|
- jsonlint gateways.json
|
||||||
|
when:
|
||||||
|
event: push
|
86
README.md
86
README.md
@ -1,5 +1,85 @@
|
|||||||
# ubnt-api-devices
|
## Config
|
||||||
|
|
||||||
Geräte des Unifi Controller und UNMS die auf der Map map.freifunk-troisdorf.de angezeigt werden sollen.
|
### Unifi Access Points (unifi_devices.json)
|
||||||
|
|
||||||
Siehe: https://git.freifunk-rhein-sieg.net/Freifunk-Troisdorf/ubnt-freifunk-map-api
|
In der Datei unifi_devices.json können die Access Points gepflegt werden, die auf der Freifunk Map erscheinen sollen.
|
||||||
|
|
||||||
|
Hierzu muss die Datei im json Format erweitert werden.
|
||||||
|
|
||||||
|
Für jedes Gerät muss dieser Block angelegt werden:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "ROUTERNAME",
|
||||||
|
"mac": "00:00:00:00:00",
|
||||||
|
"gateway_nexthop": "1234567890",
|
||||||
|
"gateway": "1234567890",
|
||||||
|
"linked_to": "18:e8:29:24:17:0a",
|
||||||
|
"domain": "unifi",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.148406208,
|
||||||
|
"latitude":50.817093402
|
||||||
|
},
|
||||||
|
```
|
||||||
|
Erklärung:
|
||||||
|
* name: Dient nur zur Wiedererkennung. Auf der Map erscheint der Name aus dem Unifi Controller
|
||||||
|
* mac: Die MAC Adresse des Access Points. Zu finden im Controller. (Statistik Übersicht in der Geräteansicht)
|
||||||
|
* gateway_nexthop: Die Node ID (MAC ohne :) des Freifunk Routers an den der AP angeschlossen ist.
|
||||||
|
* gateway: Im Normalfall die NodeID des Supernodes (zu finden in der MAP)
|
||||||
|
* linked_to: (Optional) Die MAC Adresse des Routers an dem der AP angeschlossen ist. Normalerweise gateway_nexthop mit Doppelpunkten. Wenn nicht gesetzt wird kein Link auf der Map angezeigt.
|
||||||
|
* domain: Die Domain in der sich der AP befindet. (tdf, inn, flu)
|
||||||
|
|
||||||
|
### UISP Richtfunkstrecken
|
||||||
|
|
||||||
|
In der Datei rifu_devices.json können die Richtfunkstrecken gepflegt werden, die auf der Freifunk Map erscheinen sollen.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "Rathaus2Bahnhof",
|
||||||
|
"mac": "18:E8:29:8E:C6:4D",
|
||||||
|
"gateway_nexthop": "18e8292f7de6",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "rifu",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.148406208,
|
||||||
|
"latitude":50.817093402
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Erklärung:
|
||||||
|
* name: Dient nur zur Wiedererkennung. Auf der Map erscheint der Name aus dem UNMS Controller
|
||||||
|
* mac: Die MAC Adresse des Gerätes. Zu finden im Controller.
|
||||||
|
* gateway_nexthop: Die Node ID (MAC ohne :) des Freifunk Routers an dem das Gerät angeschlossen ist.
|
||||||
|
* gateway: Im Normalfall die NodeID des Supernodes (zu finden in der MAP)
|
||||||
|
* domain: Die Domain in der sich der AP befindet. (tdf, inn, flu)
|
||||||
|
|
||||||
|
### UISP Router
|
||||||
|
|
||||||
|
In dieser datei werden die Router (meist ER-X) gepflegt. Diese Daten werden dann ebenfalls aus der UISP API Importiert.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "Rathaus Uplink",
|
||||||
|
"mac": "18:e8:29:ad:9a:34",
|
||||||
|
"gateway_nexthop": "18e8292f7de6",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "tdf",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.149406208,
|
||||||
|
"latitude":50.817093402
|
||||||
|
}
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
### Gateways.json
|
||||||
|
|
||||||
|
Hier werden Statische Geräte eingetragen die auf dem Proxmox Cluster laufen.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "VPN01",
|
||||||
|
"fqdn": "vpn01.fftdf.de",
|
||||||
|
"mac": "00:00:00:00:00:01",
|
||||||
|
"domain": "VPN1",
|
||||||
|
"adresses": ["5.9.220.114"]
|
||||||
|
},
|
||||||
|
```
|
||||||
|
26
devices.json
26
devices.json
@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"devices":[
|
|
||||||
{
|
|
||||||
"name": "Rathaus2Bahnhof",
|
|
||||||
"mac": "18:E8:29:8E:C6:4D",
|
|
||||||
"gateway_nexthop": "18e8292f7de6",
|
|
||||||
"gateway": "a28cae6ff604",
|
|
||||||
"domain": "rifu",
|
|
||||||
"location": {
|
|
||||||
"longitude":7.148406208,
|
|
||||||
"latitude":50.817093402
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Bahnhof2Rathaus",
|
|
||||||
"mac": "18:e8:29:dc:c3:7e",
|
|
||||||
"gateway_nexthop": "18e8292f7de6",
|
|
||||||
"gateway": "a28cae6ff604",
|
|
||||||
"domain": "rifu",
|
|
||||||
"location": {
|
|
||||||
"longitude":7.150436640,
|
|
||||||
"latitude":50.814456507
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
39
gateways.json
Normal file
39
gateways.json
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"devices":[
|
||||||
|
{
|
||||||
|
"name": "VPN01",
|
||||||
|
"fqdn": "vpn01.fftdf.de",
|
||||||
|
"mac": "00:00:00:00:00:01",
|
||||||
|
"domain": "VPN1",
|
||||||
|
"adresses": ["5.9.220.114"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CORE4",
|
||||||
|
"fqdn": "core4.fftdf.de",
|
||||||
|
"mac": "16:8f:8c:38:74:8b",
|
||||||
|
"domain": "Backbone",
|
||||||
|
"adresses": ["185.66.193.107"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "troidsorf4",
|
||||||
|
"fqdn": "4.fftdf.de",
|
||||||
|
"mac": "a2:8c:ae:6f:f6:04",
|
||||||
|
"domain": "tdf",
|
||||||
|
"adresses": ["185.66.193.104"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "troidsorf5",
|
||||||
|
"fqdn": "5.fftdf.de",
|
||||||
|
"mac": "a2:8c:ae:6f:f6:05",
|
||||||
|
"domain": "inn",
|
||||||
|
"adresses": ["185.66.193.105"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "troidsorf6",
|
||||||
|
"fqdn": "6.fftdf.de",
|
||||||
|
"mac": "a2:8c:ae:6f:f6:06",
|
||||||
|
"domain": "flu",
|
||||||
|
"adresses": ["185.66.193.106"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
70
rifu_devices.json
Normal file
70
rifu_devices.json
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"devices":[
|
||||||
|
{
|
||||||
|
"name": "Rathaus2Bahnhof",
|
||||||
|
"mac": "18:E8:29:8E:C6:4D",
|
||||||
|
"gateway_nexthop": "18e8292f7de6",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "rifu",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.148406208,
|
||||||
|
"latitude":50.817093402
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bahnhof2Rathaus",
|
||||||
|
"mac": "18:e8:29:dc:c3:7e",
|
||||||
|
"gateway_nexthop": "18e8292f7de6",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "rifu",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.150436640,
|
||||||
|
"latitude":50.814456507
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rathaus2Lindenstr",
|
||||||
|
"mac": "68:d7:9a:a8:ce:49",
|
||||||
|
"gateway_nexthop": "a28cae6ff604",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "rifu",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.147861719,
|
||||||
|
"latitude":50.817276420
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Lindenstr2Rathaus",
|
||||||
|
"mac": "68:d7:9a:a8:30:b8",
|
||||||
|
"gateway_nexthop": "a28cae6ff604",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "rifu",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.138409615,
|
||||||
|
"latitude":50.817188300
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Haus7toHaus1",
|
||||||
|
"mac": "24:5a:4c:f0:ac:3f",
|
||||||
|
"gateway_nexthop": "a28cae6ff604",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "rifu",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.138389498,
|
||||||
|
"latitude":50.817188300
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Haus1toHaus7",
|
||||||
|
"mac": "24:5a:4c:f0:ad:36",
|
||||||
|
"gateway_nexthop": "a28cae6ff604",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "rifu",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.140045762,
|
||||||
|
"latitude":50.816302857
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
60
uisp_router.json
Normal file
60
uisp_router.json
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
{
|
||||||
|
"devices":[
|
||||||
|
{
|
||||||
|
"name": "Rathaus Uplink",
|
||||||
|
"mac": "18:e8:29:ad:9a:34",
|
||||||
|
"gateway_nexthop": "18e8292f7de6",
|
||||||
|
"gateway": "a28cae6ff604",
|
||||||
|
"domain": "tdf",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.149406208,
|
||||||
|
"latitude":50.817093402
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "edge2-test",
|
||||||
|
"mac": "d0:21:f9:bb:db:d0",
|
||||||
|
"gateway_nexthop": "000000000001",
|
||||||
|
"gateway": "168f8c38748b",
|
||||||
|
"domain": "VPN1",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.133350968,
|
||||||
|
"latitude":50.802853080
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Aggertal-Hotel",
|
||||||
|
"mac": "d0:21:f9:bb:e7:52",
|
||||||
|
"gateway_nexthop": "000000000001",
|
||||||
|
"gateway": "168f8c38748b",
|
||||||
|
"domain": "VPN1",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.255375,
|
||||||
|
"latitude":50.881177
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Achtermann-edge4",
|
||||||
|
"mac": "d0:21:f9:bb:db:8e",
|
||||||
|
"gateway_nexthop": "000000000001",
|
||||||
|
"gateway": "168f8c38748b",
|
||||||
|
"domain": "VPN1",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.122906,
|
||||||
|
"latitude":50.819198
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Galerie-Troisdorf",
|
||||||
|
"mac": "d0:21:f9:bb:dc:06",
|
||||||
|
"gateway_nexthop": "000000000001",
|
||||||
|
"gateway": "168f8c38748b",
|
||||||
|
"domain": "VPN1",
|
||||||
|
"location": {
|
||||||
|
"longitude":7.155843973,
|
||||||
|
"latitude":50.814017575
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user