REST API: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
| Line 30: | Line 30: | ||
||/var/local/aquarium-ctrl/atlsscntfc-temp | ||/var/local/aquarium-ctrl/atlsscntfc-temp | ||
|- | |- | ||
|} | ||filtered water temperature | ||
||floating point number | |||
||/var/local/aquarium-ctrl/atlsscntfc-tempfltrd | |||
|- | |||
||pH value | |||
||floating point number | |||
||/var/local/aquarium-ctrl/atlsscntfc-ph | |||
|- | |||
||filtered pH value | |||
||floating point number | |||
||/var/local/aquarium-ctrl/atlsscntfc-phfltrd | |||
|- | |||
||conductivity | |||
||floating point number | |||
||/var/local/aquarium-ctrl/atlsscntfc-conduc | |||
|- | |||
||filtered water temperature | |||
||floating point number | |||
||/var/local/aquarium-ctrl/atlsscntfc-conducfltrd | |||
|- | |||
||tank level switch position | |||
||floating point number | |||
||/var/local/aquarium-ctrl/tnklvlsswtch | |||
|- | |||
||surface ventilation status | |||
||string | |||
||/var/local/aquarium-ctrl/srfcvntltn | |||
|- | |||
||ambient temperature | |||
||floating point number | |||
||/var/local/aquarium-ctrl/ambtemp | |||
|- | |||
||ambient humidity | |||
||floating point number | |||
||/var/local/aquarium-ctrl/ambhum | |||
|- | |||
||heating status | |||
||string | |||
||/var/local/aquarium-ctrl/htng | |||
|- | |||
|} | |||
== Architecture == | == Architecture == | ||
== Testing == | == Testing == | ||
Revision as of 08:13, 20 November 2025
Requirements
General requirements
The API shall communicate with mobile apps and dynamic webpage.
For each request, the API shall validate the credentials (user, password).
The API shall provide the data in JSON format.
Timestamps shall have the format: YYYY-MM-DD hh:mm:ss
Requirements for overview feature
The API shall provide an endpoint for informing the client about the validity of the credentials.
The API shall provide an endpoint communicating a set of floating point data read from a set of files:
| Signal name | Signal format | Signal source |
|---|---|---|
| timestamp | string | /var/local/aquarium-ctrl/aquarium-ctrl-ts |
| water temperature | floating point number | /var/local/aquarium-ctrl/atlsscntfc-temp |
| filtered water temperature | floating point number | /var/local/aquarium-ctrl/atlsscntfc-tempfltrd |
| pH value | floating point number | /var/local/aquarium-ctrl/atlsscntfc-ph |
| filtered pH value | floating point number | /var/local/aquarium-ctrl/atlsscntfc-phfltrd |
| conductivity | floating point number | /var/local/aquarium-ctrl/atlsscntfc-conduc |
| filtered water temperature | floating point number | /var/local/aquarium-ctrl/atlsscntfc-conducfltrd |
| tank level switch position | floating point number | /var/local/aquarium-ctrl/tnklvlsswtch |
| surface ventilation status | string | /var/local/aquarium-ctrl/srfcvntltn |
| ambient temperature | floating point number | /var/local/aquarium-ctrl/ambtemp |
| ambient humidity | floating point number | /var/local/aquarium-ctrl/ambhum |
| heating status | string | /var/local/aquarium-ctrl/htng |