Deploy MQTT test backend with private viewer and Gitea CI/CD
Test and deploy MQTT backend / test (push) Successful in 2m8s
Test and deploy MQTT backend / deploy (push) Successful in 18s

This commit is contained in:
2026-10-08 14:48:53 +03:30
commit 71ef622b4f
70 changed files with 7123 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# Manually test the broker and browser viewer with Postman
In Postman v12, open the **project root** `/home/ryan/Media/Code/Code/robot-market/test-mqtt-5` using **Files → Open folder**, then select **Local View**. This MQTT collection uses Postman's v3 multi-file format; it is **not a standalone file to choose from Import**. Do not select the `.request.yaml` file or the nested collection directory in the Import dialog. Postman discovers the collection at `postman/collections/MQTT Broker UI Test`. Keep the observer container running and open <http://127.0.0.1:8080> in your browser.
If you still get “We don't recognize this file” after opening the project root via **Files → Open folder**, bypass the saved collection and create the request inside Postman: click **+ → MQTT**, enter `mqtt://109.122.252.129:1884`, set MQTT version to **5.0**, enter the `sim-001` test username/password under the request's connection/auth settings, and click **Connect**. Then follow “Publish a test telemetry message” below. The message's topic and payload are the actual test inputs; the MQTT collection file only pre-fills the broker URL and provides notes.
The older `MQTT Test Viewer.postman_collection.json` file is a Postman v2.1 HTTP collection with two read-only checks for the viewer page and `/api/snapshot`. The MQTT v3 collection below is for broker traffic. To subscribe to telemetry in Postman, use the **test-backend** credentials; device credentials can only subscribe to their commands topic. To publish as ESP32, use the **esp32-lab-001** credentials and its matching topic path. Current Postman supports MQTT requests in its v3 multi-protocol collection format.
## Quick functional test
1. Connect to `mqtt://109.122.252.129:1884` with any existing test account (including `esp32-lab-001`) and its current password. Select MQTT **5.0** and use a unique client ID such as `postman-functional-test-01`.
2. Publish `hello from postman` to `robot-market/test/v1/sim-001/telemetry`, QoS **1**, retain **off**.
3. Open http://127.0.0.1:8080/. It should appear as `message_received` with its raw contents.
The test broker no longer restricts topics by username. Any test account may also subscribe to that topic in Postman to receive its own publication. The browser watches all topics under `robot-market/test/v1/#` and applies no JSON, device-ID or timestamp validation. Your previous JSON payload, including a literal `{{$isoTimestamp}}`, is displayed as supplied.
TLS is also available at `mqtts://109.122.252.129:8884` with the supplied private CA. If a Postman send does not appear, inspect the connection state and publish acknowledgement. The Go simulator is not needed.
## Receive the backend's application ACK
In Topics, subscribe to `robot-market/test/v1/sim-001/acks` **before** publishing to `robot-market/test/v1/sim-001/telemetry`. Every live test payload gets a JSON `receipt_ack` reply with `ok=true`, source topic, observed time, byte count and SHA-256. Optional message_id/request_id are echoed; they are not required. For ESP32's own topic path, subscribe to `robot-market/test/v1/esp32-lab-001/acks`. The UI shows `receipt_ack_sent` and outbound publication events. This is separate from MQTT PUBACK.