MudPi supports cameras allowing you to take photos and short recordings. The camera is useful for keeping an eye on things while you are away. It can be set into a photo capture or video recording mode based on your needs.
The camera will continuously capture a photo at intervals based on the delay
in the config. Each file is saved to the path
also set in the config. It is important to be sure proper write permissions are set or the camera may not be able to save images. Images are saved with either a sequential or date naming format based on settings.
Below is a list of currently supported interfaces for cameras.
Interface | Description | |
picamera | Connects to a raspberry pi camera | Learn More |
rtsp | Capture images and videos over rtsp stream | Learn More |
If you would like at add support for another camera interface read the developer docs and submit a PR!
In order to manually interact with a camera you need to use the actions it provides (typically on a trigger). You can use the following actions:
Action | |
capture | Captures an image |
record | Takes a video recording of x seconds. Default: 5 seconds |
The camera will publish an event every time a new photo is captured on the camera
topic of the event system.
event: CameraUpdated
{
"event": "CameraUpdated",
"component_id": "example_camera_1",
"name": "Example Camera 1",
"updated_at": "2021-03-14 09:34:33",
"last_image": "/path/to/last/image.jpg",
}
In addition to publishing events of new photos taken, the camera state
will always be the last capture taken.