Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| projekte:clubstatus [2021-11-11 00:52] – cccac-presence skript aktualisiert clonejo | projekte:clubstatus [2025-03-15 15:28] (current) – [Presence] clonejo | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| <WRAP right> | <WRAP right> | ||
| ^ clubstatus | ^ clubstatus | ||
| - | ^ Git | [[https://github.com/clonejo/ | + | ^ Git | [[https://git.aachen.ccc.de/clubstatus/ |
| ^ Host | [[https:// | ^ Host | [[https:// | ||
| ^ Kontakt | [[wiki: | ^ Kontakt | [[wiki: | ||
| - | ^ Status | <fc green> | + | ^ Status | <fc green> |
| </ | </ | ||
| Line 14: | Line 14: | ||
| ===== Presence ===== | ===== Presence ===== | ||
| + | |||
| + | === Die Clubinfrastruktur erkennt deine Hosts und meldet dich als anwesend === | ||
| + | <WRAP right> | ||
| + | {{ : | ||
| + | </ | ||
| + | |||
| + | * Geräte im Club-Netz werden anhand der MAC-Adresse erkannt. | ||
| + | * **Jetzt NEU mit Selfservice™!** Navigiere mit dem zu erkennenden Gerät zu [[http:// | ||
| + | * Der Code für dieses Feature liegt separat im Gitlab: https:// | ||
| + | * Die MAC-Adressen deiner Endgeräte werden ausschließlich gehasht abgelegt. | ||
| + | |||
| === vom eigenen Rechner === | === vom eigenen Rechner === | ||
| * Die Präsenzliste wird nicht sofort aktualisiert. Solange der Server bei einem Presence-Request mit 200 antwortet, hat es geklappt :) | * Die Präsenzliste wird nicht sofort aktualisiert. Solange der Server bei einem Presence-Request mit 200 antwortet, hat es geklappt :) | ||
| + | * Nach 10+n Minuten gibt es einen Timeout, und der Benutzername wird wieder aus der Präsenzliste entfernt. Daher muss alle 10min ein neuer Request gesendet werden. | ||
| <code python> | <code python> | ||
| # | # | ||
| Line 23: | Line 35: | ||
| import subprocess | import subprocess | ||
| import sys | import sys | ||
| + | import time | ||
| Line 41: | Line 54: | ||
| - | if in_cccac_wlan(): | + | while True: |
| - | print(f" | + | |
| - | session = requests.Session() | + | print(f" |
| - | session.auth = ("", | + | session = requests.Session() |
| - | j = {" | + | session.auth = ("", |
| - | r = session.put(" | + | j = {" |
| - | r.raise_for_status() | + | r = session.put(" |
| + | r.raise_for_status() | ||
| + | time.sleep(600) | ||
| </ | </ | ||
| Line 61: | Line 77: | ||
| - | === Die Clubinfrastruktur erkennt deine Hosts und meldet dich als anwesend | + | ===== SpaceAPI ===== |
| - | **Stand 2021-11-11: Diese Funktion geht im Moment nicht, maccollect wurde noch nicht wieder aufgesetzt. ** | + | Der clubstatusd implementiert auch https://spaceapi.io/, unter https://status.aachen.ccc.de/ |
| - | + | ||
| - | * auf Stellarator läuft in der maccollect-VM das Programm maccollect ([[https://git.aachen.ccc.de/~luks/ | + | |
| - | * Mac-Adressen der eigenen Geräte eintragen; dafür einen [[admins@aachen.ccc.de? | + | |
| - | * in Ansible in der Datei [[https://gitlab.aachen.ccc.de/ | + | |
| - | * site.yml für maccollect.doel.aachen.ccc.de ausführen | + | |
| + | Die statischen Werte werden im Config-File vom clubstatusd eingestellt, | ||