General
The Raspberry Pi calls the server directly. The server does not send HTTP requests to the Pi.
Technical
API requests are plain HTTP requests to the Flask server. Location coordinates are generated on the server, so clients only need to send the request itself or an optional device label.
The Pi posts directly to this website, so there is no Pi URL to configure.
Available endpoints
GET /health
GET /ping
GET /keepalive
GET /feed/latest
GET /feed/latest.png
POST /feed/upload
GET /locations
GET /locations/count
POST /locations
POST /test
GET /robot/status
POST /robot/toggle
POST /robot/shutdown
POST /robot/pi/update
GET /robot/pi/commands
POST /robot/pi/ack-shutdown
POST /feed/upload
Content-Type: application/json
{
"image": "data:image/png;base64,..."
}
POST /locations
Content-Type: application/json
{
"device": "pi-1"
}
The server assigns random map coordinates for each location entry.
Pi loop example
1) Poll GET /robot/pi/commands
2) If start=true, start robot work
3) Send POST /robot/pi/update with current state
4) If shutdown=true, stop robot and POST /robot/pi/ack-shutdown
If you are calling from a script, use the Render service URL as the base, for example https://your-service.onrender.com.