Raspberry Pi Camera
Live camera feeds from Raspberry Pi Camera Module 3 in the Krill app
Raspberry Pi Camera: Live Monitoring
The Krill Platform supports live camera feeds from the Raspberry Pi Camera Module 3, viewable on all platforms (iOS, Android, Desktop, and browser). Camera nodes sit under Projects alongside Data Points, Graphs, and Diagrams — making it easy to build visual monitoring dashboards for aquariums, grow rooms, labs, or any IoT setup.
Supported Hardware
| Camera | Status |
|---|---|
| Raspberry Pi Camera Module 3 (IMX708) | Supported |
| Raspberry Pi Camera Module 3 Wide | Supported |
| Raspberry Pi Camera Module 3 NoIR | Supported |
| Other libcamera-compatible cameras | May work (untested) |
Hardware Setup
What You Need
- Raspberry Pi 5 (or Pi 4) running Krill Server
- Raspberry Pi Camera Module 3
- CSI ribbon cable (included with camera)
Connecting the Camera
- Power off the Raspberry Pi
- Locate the CSI camera port (between the Ethernet port and HDMI ports on Pi 5)
- Lift the plastic clip on the CSI connector
- Insert the ribbon cable with the blue side facing the Ethernet port
- Press the clip down firmly to secure the cable
- Power on the Pi
The ribbon cable is fragile. Avoid bending it sharply or pulling on it.
Software Setup
Quick Setup
Run the camera setup script on your Krill server:
1
sudo krill-camera-setup
This script:
- Installs
rpicam-apps(the official Raspberry Pi camera tools) - Adds the
krilluser to thevideogroup for camera access - Enables
camera_auto_detect=1in the boot configuration - Tests that the camera is detected
Manual Setup
If you prefer to set up manually:
1
2
3
4
5
6
7
8
# Install camera tools
sudo apt install rpicam-apps-core
# Add krill user to video group
sudo usermod -aG video krill
# Verify camera is detected
rpicam-still --list-cameras
Expected output for Camera Module 3:
1
2
3
4
5
6
Available cameras
-----------------
0 : imx708 [4608x2592 10-bit RGGB] (/base/axi/pcie@1000120000/rp1/i2c@80000/imx708@1a)
Modes: 'SRGGB10_CSI2P' : 1536x864 [120.13 fps - (768, 432)/3072x1728 crop]
2304x1296 [56.03 fps - (0, 0)/4608x2592 crop]
4608x2592 [14.35 fps - (0, 0)/4608x2592 crop]
After Setup
Restart the Krill server to detect the camera:
1
sudo systemctl restart krill
The server will automatically detect the camera on startup. The Krill app will show a “Camera” option when adding nodes to a Project.
Using Camera Nodes
Creating a Camera Node
- Open the Krill app on any platform
- Navigate to a Project on your Pi server
- Open the Project menu and select Camera
- The camera node appears with a live feed thumbnail
Viewing the Live Feed
Click the camera node to see the full live feed. The feed updates at approximately 2 frames per second using JPEG snapshots from the camera.
Camera Settings
In edit mode, you can configure:
| Setting | Default | Description |
|---|---|---|
| Resolution | 1280x720 | Output resolution (720p, 1080p, or full 4608x2592) |
| Framerate | 15 | Frames per second |
| Rotation | 0 | Image rotation (0, 90, 180, 270 degrees) |
| Stream Port | 8443 | Port for the MJPEG stream |
| Enabled | true | Enable/disable the camera |
Architecture
graph TD
A[Pi Camera Module 3] -->|CSI ribbon| B[Raspberry Pi]
B -->|rpicam-still| C[Krill Server]
C -->|HTTPS + Bearer auth| D[GET /camera/id/snapshot]
D -->|JPEG frame| E[Krill App]
E --> F[iOS]
E --> G[Android]
E --> H[Desktop]
E --> I[Browser/WASM]
The camera feed is served through the existing Krill HTTPS connection with PIN-based authentication — no additional ports or firewall rules needed.
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| “No cameras available” | Camera not detected | Check ribbon cable, run sudo krill-camera-setup |
| Camera not in menu | Server hasn’t detected camera | Restart server: sudo systemctl restart krill |
| Black/blank feed | Camera enabled but no image | Check rpicam-still -o test.jpg from terminal |
| Feed not updating | Network or auth issue | Check server logs at /var/log/krill/krill.log |
Integration with Diagrams
The CameraRow composable can be embedded in Process Control Diagrams alongside SVG overlays. This enables building visual dashboards with live camera feeds integrated into facility maps or equipment schematics.