Moving Server, Broker, Client, Logger, Node independently ‐ how they find each other - mitra42/frugal-iot GitHub Wiki
Since each component is intended to be run, and developed, independently, they will need configurable ways to find each other.
| Node | Broker | Logger | Server | OTA Server | Client | Notes | |
|---|---|---|---|---|---|---|---|
| Node | xxx | SYSTEM_MQTT_SERVER |
SYSTEM_OTA_SERVERPORTPATH |
n/a | n/a | n/a | platformio.ini (hard coded default) |
| Broker | n/a | xxx | n/a | n/a | n/a | n/a | |
| Logger | config .organizations .<org> ... |
config .server .broker |
xxx | n/a | n/a | n/a | |
| Server | n/a | config .mqtt |
(1) | xxx | ./ota (2) | hard path (3) | |
| Client | discovery messages | config .server .broker |
/data (4) |
/ |
n/a | xxx | |
| Embedded | hard coded | mqtt-client.server | bad (5) | libraries hard coded to ni.org | n/a | n/a | Loaded independently |
Actions.
- 1: the server currently runs the logger code, however it should be possible for a server to run without the logger, and direct clients to an existing logger. This should be in
config.logger. - 2: the server hard-codes the location of the OTA directory, it should be configurable, and possibly even a different server
- 3: The server hard-codes the path the client code, it should be configurable, currently it requires mucking around between dev and production versions.
- 4: Client gets logger files via hard-coded path on server
/datathis should be configurable inconfig.loggerso client can be loaded from one server, but find logged files on a different one. - 5: Make sure embedded pages can find in particular the logger pages.