Initialize project.

Commit
2c3c8f12e45c60fe30589cea11f226d63bf35cb9
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
.gitignore
index 00000000..02dd02f1 000000..100644
@@ -0,0 +1,2 @@
1 Added: # .gitignore for fapg-daq
2 Added: *.bak
README.org
index 00000000..01fb80ac 000000..100644
@@ -0,0 +1,102 @@
1 Added: #+TITLE: FAPG DAQ system
2 Added: #+AUTHOR: Marius PETER
3 Added: #+DATE: <2026-06-27 Sat>
4 Added:
5 Added: * Overview
6 Added:
7 Added: The goal of this project is to deploy a DAQ network at the FAPG.
8 Added: Sensor nodes periodically send readings to a central DAQ hub. An
9 Added: external VPS obtains these readings, and displays them on a web
10 Added: dashboard.
11 Added:
12 Added: * Architecture
13 Added:
14 Added: #+begin_src plantuml :file docs/architecture.png
15 Added: @startuml
16 Added: title FAPG DAQ - from reading to web dashboard
17 Added:
18 Added: actor "Farm user/browser" as Browser
19 Added:
20 Added: participant "EZO probe\npH / EC / DO / Redox" as Probe
21 Added: participant "Pi Zero 2W\nfapg-daq service" as Zero
22 Added: participant "Pi 5\nMosquitto MQTT broker" as Broker
23 Added: participant "VPS\nMQTT subscriber service" as VPSSubscriber
24 Added: database "Readings database\nSQLite / PostgreSQL" as DB
25 Added: participant "VPS\nLive dashboard app" as Dashboard
26 Added:
27 Added: == DAQ acquisition ==
28 Added:
29 Added: Zero -> Probe : Request UART reading
30 Added: Probe --> Zero : Return raw sensor value
31 Added:
32 Added: Zero -> Zero : Normalize reading
33 Added:
34 Added: == MQTT publication ==
35 Added:
36 Added: Zero -> Broker : MQTT PUBLISH\nfapg/daq/<probe>/<node>/reading\nJSON payload
37 Added:
38 Added: note right of Zero
39 Added: Example payload:
40 Added: {
41 Added: "schema": "fapg.daq.reading.v1",
42 Added: "node": "fapg-zero-ph-01",
43 Added: "probe": "ph",
44 Added: "value": 7.12,
45 Added: "unit": "pH",
46 Added: "timestamp": "2026-06-27T13:45:00Z"
47 Added: }
48 Added: end note
49 Added:
50 Added: VPSSubscriber -> Broker : MQTT SUBSCRIBE\nfapg/daq/+/+/reading
51 Added: Broker --> VPSSubscriber : MQTT MESSAGE\nreading topic + JSON payload
52 Added:
53 Added: VPSSubscriber -> VPSSubscriber : Validate topic and payload\nparse probe, node, value, timestamp
54 Added:
55 Added: == Database storage ==
56 Added:
57 Added: VPSSubscriber -> DB : INSERT reading
58 Added: DB --> VPSSubscriber : OK
59 Added:
60 Added: == Live dashboard presentation ==
61 Added:
62 Added: Browser -> Dashboard : Open HTTPS dashboard
63 Added: Dashboard -> DB : SELECT recent readings
64 Added: DB --> Dashboard : Return recent readings
65 Added: Dashboard --> Browser : Initial HTML + Chart.js data
66 Added:
67 Added: loop live updates
68 Added: VPSSubscriber -> Dashboard : Notify new reading\nWebSocket / SSE / app event
69 Added: Dashboard --> Browser : Push new reading\nWebSocket or Server-Sent Events
70 Added: Browser -> Browser : Append point to Chart.js chart
71 Added: end
72 Added:
73 Added: @enduml
74 Added: #+end_src
75 Added:
76 Added: #+RESULTS:
77 Added: [[file:docs/architecture.png]]
78 Added:
79 Added: ** Hosts
80 Added:
81 Added: *** Raspberry Pi Zero 2W
82 Added:
83 Added: These hosts collect DAQ readings, and publish them via MQTT on the
84 Added: LAN.
85 Added:
86 Added: | Pi Zero | Probe |
87 Added: |---------+-------|
88 Added: | 01 | PH |
89 Added: | 02 | EC |
90 Added: | 03 | DO |
91 Added: | 04 | ORP |
92 Added:
93 Added:
94 Added: *** Raspberry Pi 5
95 Added:
96 Added: This host brokers MQTT messages sent on the LAN.
97 Added:
98 Added: *** VPS
99 Added:
100 Added: This host establishes a VPN connection with the Pi 5 host, subscribes
101 Added: to all MQTT topics, saves messages to a database, and exposes a
102 Added: realtime web dashboard available over the internet.