mirror of
https://github.com/jomjol/AI-on-the-edge-device-docs.git
synced 2025-12-07 12:07:01 +03:00
Add Makefile and Markdown linter (#73)
* Add Makefile * Update .gitignore to exclude venv * Add requirements.txt for venv * Add pymarkdown lint Github action * Update .md from lint tool * Update README with make commands * Add linter config
This commit is contained in:
committed by
GitHub
parent
bbe3bd79db
commit
0cd98c67e2
@@ -1,4 +1,5 @@
|
||||
# REST API
|
||||
|
||||
Various information is directly accessible over specific REST calls.
|
||||
|
||||
To use it, just append them to the IP, separated with a `/`, e.g. `http://192.168.1.1/json`
|
||||
@@ -7,7 +8,9 @@ To use it, just append them to the IP, separated with a `/`, e.g. `http://192.16
|
||||
For more detailed information to the REST handler, have a look to the code in the repository: [registered handlers](https://github.com/jomjol/AI-on-the-edge-device/search?q=camuri.uri)
|
||||
|
||||
## Control
|
||||
|
||||
### flow_start
|
||||
|
||||
Trigger the next flow
|
||||
+ Payload:
|
||||
- No payload needed
|
||||
@@ -15,6 +18,7 @@ To use it, just append them to the IP, separated with a `/`, e.g. `http://192.16
|
||||
This will automatically reset the flow interval.
|
||||
|
||||
### setPreValue
|
||||
|
||||
Set the last valid value (previous value) to given value or the actual RAW value.
|
||||
+ Payload:
|
||||
- Set to given value (value >= 0), e.g. `/setPreValue?numbers=main&value=1234.5678`
|
||||
@@ -26,6 +30,7 @@ This will automatically reset the flow interval.
|
||||
* `value=` provide yna negative number
|
||||
|
||||
### GPIO
|
||||
|
||||
- Control a GPIO output
|
||||
- The `GPIO` entrypoint also support parameters:
|
||||
- `/GPIO?GPIO={PinNumber}&Status=high`
|
||||
@@ -38,14 +43,18 @@ This will automatically reset the flow interval.
|
||||
- Example: `/GPIO?GPIO=12`
|
||||
|
||||
### reboot
|
||||
|
||||
Trigger a reboot of the device
|
||||
|
||||
### mqtt_publish_discovery
|
||||
|
||||
Trigger re-sending of the Home Assistant discovery topics.
|
||||
The topics will get send at the end of the next round.
|
||||
|
||||
## Results
|
||||
|
||||
### json
|
||||
|
||||
Show result in JSON syntax
|
||||
- Example:
|
||||
`{
|
||||
@@ -61,6 +70,7 @@ This will automatically reset the flow interval.
|
||||
}`
|
||||
|
||||
### value
|
||||
|
||||
Show single result values
|
||||
- The `value` entrypoint also support parameters:
|
||||
- `http://<IP>/value?all=true&type=value`
|
||||
@@ -69,53 +79,69 @@ This will automatically reset the flow interval.
|
||||
- `http://<IP>/value?all=true&type=prevalue`
|
||||
|
||||
### img_tmp/raw.jpg
|
||||
|
||||
Capture and show a new raw image
|
||||
|
||||
### img_tmp/alg.jpg
|
||||
|
||||
Show last aligned image
|
||||
|
||||
### img_tmp/alg_roi.jpg
|
||||
|
||||
Show last aligned image including ROI overlay
|
||||
|
||||
## Status
|
||||
|
||||
### statusflow
|
||||
|
||||
Show the actual step of the flow incl. timestamp
|
||||
- Example: `Take Image (15:56:34)`
|
||||
|
||||
### rssi
|
||||
|
||||
Show the WIFI signal strength (Unit: dBm)
|
||||
- Example: `-51`
|
||||
|
||||
### cpu_temperature
|
||||
|
||||
Show the CPU temperature (Unit: °C)
|
||||
- Example: `38`
|
||||
|
||||
### sysinfo
|
||||
|
||||
Show system infos in JSON syntax
|
||||
- Example: `[{"firmware": "","buildtime": "2023-01-25 12:41","gitbranch": "HEAD","gittag": "","gitrevision": "af13c68+","html": "Development-Branch: HEAD (Commit: af13c68+)","cputemp": "64","hostname": "WaterMeterTest","IPv4": "192.168.xxx.xxx","freeHeapMem": "2818330"}]`
|
||||
|
||||
### starttime
|
||||
|
||||
Show starttime
|
||||
- Example: `20230113-154634`
|
||||
|
||||
### uptime
|
||||
|
||||
Show uptime
|
||||
- Example: `0d 00h 15m 50s`
|
||||
|
||||
## Camera
|
||||
|
||||
### lighton
|
||||
|
||||
Switch the camera flashlight on
|
||||
|
||||
### lightoff
|
||||
|
||||
Switch the camera flashlight off
|
||||
|
||||
### capture
|
||||
|
||||
Capture a new image (without flashlight)
|
||||
|
||||
### capture_with_flashlight
|
||||
|
||||
Capture a new image with flashlight
|
||||
|
||||
### stream
|
||||
|
||||
Stream a live video of the camera.
|
||||
|
||||
It has a slow refresh rate of only 2 FPS to avoid stressing the system. Flow processing continues to work in the background, albeit possibly a bit slower.
|
||||
@@ -124,30 +150,39 @@ This will automatically reset the flow interval.
|
||||
|
||||
**LIMITATION:** To avoid using extra memory, no additional dedicated stream webserver is implemented for this feature (instead, the web interface server is reused in a kind of "blocking way"). This means that either the web interface is fully functional or the stream is active, but not both at the same time. However, this is sufficient for the intended use case.
|
||||
|
||||
|
||||
### save
|
||||
|
||||
Save a new image to SD card
|
||||
- The `save` entrypoint also support parameters:
|
||||
- `http://<IP>/save?filename=test.jpg&delay=1000`
|
||||
|
||||
## Logs
|
||||
|
||||
### log
|
||||
|
||||
Last part of todays log (last 80 kBytes))
|
||||
|
||||
### logfileact
|
||||
|
||||
Full log of today
|
||||
|
||||
### log.html
|
||||
|
||||
Opens the log html page
|
||||
|
||||
## Diagnostics
|
||||
|
||||
### heap
|
||||
|
||||
print relevant memory (heap) information
|
||||
- Example: `Heap info: Heap Total: 1888926 | SPI Free: 1827431 | SPI Larg Block: 1802240 | SPI Min Free: 758155 | Int Free: 61495 | Int Larg Block: 55296 | Int Min Free: 36427`
|
||||
|
||||
## Prometheus/OpenMetrics
|
||||
|
||||
### metrics
|
||||
|
||||
Provides a set of metrics that can be scraped by prometheus. See [Prometheus/OpenMetrics](prometheus-openmetrics.md) for details.
|
||||
|
||||
## Password Protection
|
||||
|
||||
The Web Interface and the REST API can be protected by a password, see [Password-Protection](https://jomjol.github.io/AI-on-the-edge-device-docs/Password-Protection/).
|
||||
|
||||
Reference in New Issue
Block a user