updated doku

This commit is contained in:
oe6dxd 2026-02-01 13:30:52 +01:00
parent 5cf321c28e
commit a50ee8622f
1 changed files with 64 additions and 5 deletions

View File

@ -33,14 +33,38 @@ We build a robot with raspberry and arduino.
sudo systemctl restart nginx sudo systemctl restart nginx
### Test Face Server ### Test Face Server
In Browser: #### In Browser
http://pi-ip/ http://pi-ip/
From Somewhere: #### From Somewhere
curl -X POST http://pi-ip/api/emotion/happy `Neutral + wander`
curl -X POST http://pi-ip/api/emotion/angry curl -X POST http://<pi>/api/state -H "Content-Type: application/json" \
curl -X POST http://pi-ip/api/emotion/sleepy -d '{"emotion":"neutral","intensity":0.6,"look":null}'
`Angry + starring right`
curl -X POST http://<pi>/api/state -H "Content-Type: application/json" \
-d '{"emotion":"angry","intensity":0.9,"look":{"x":0.9,"y":0.0}}'
`start Talking`
curl -X POST http://<pi>/api/state -H "Content-Type: application/json" \
-d '{"talk":{"enabled":true}}'
`talk faster and stronger`
curl -X POST http://<pi>/api/state -H "Content-Type: application/json" \
-d '{"talk":{"enabled":true,"rate_hz":5.5,"amount":1.0,"jitter":0.35}}'
`stop talking`
curl -X POST http://<pi>/api/state -H "Content-Type: application/json" \
-d '{"talk":{"enabled":false}}'
`emotion + talk`
curl -X POST http://<pi>/api/state -H "Content-Type: application/json" \
-d '{"emotion":"happy","intensity":0.85,"talk":{"enabled":true,"rate_hz":4.2,"amount":0.95}}'
`blink + happy`
curl -X POST http://<pi>/api/state -H "Content-Type: application/json" \
-d '{"emotion":"happy","blink":true,"intensity":0.85}'
### systemd Service ### systemd Service
sudo ln -s /opt/helva-robot/face/etc/systemd/system/face.service /etc/systemd/system/ sudo ln -s /opt/helva-robot/face/etc/systemd/system/face.service /etc/systemd/system/
@ -53,5 +77,40 @@ Start:
sudo systemctl enable --now face.service sudo systemctl enable --now face.service
sudo systemctl status face.service --no-pager sudo systemctl status face.service --no-pager
### Debug Face
#### SSE-Stream going to browser?
curl -N http://127.0.0.1:8001/events | head
#### is nginx delivering /events through
curl -N http://localhost/events | head
#### check Endpoint /api/state
`directly`
curl -s -X POST http://127.0.0.1:8001/api/state \
-H "Content-Type: application/json" \
-d '{"emotion":"happy","intensity":0.9,"blink":true}' | jq
`throught nginx`
curl -s -X POST http://localhost/api/state \
-H "Content-Type: application/json" \
-d '{"emotion":"happy","intensity":0.9,"blink":true}'
#### check python face server
sudo systemctl status face.service --no-pager
sudo journalctl -u face.service -n 50 --no-pager
#### restart/reload face server service
sudo systemctl daemon-reload
sudo systemctl restart face.service
#### check listening Port
sudo ss -ltnp | grep :8001
#### restart/status of face service
sudo systemctl restart face.service
sudo systemctl status face.service --no-pager
## Arduino Motor Steering