Camera

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.

Camera Files

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.

Available Interfaces

Below is a list of currently supported interfaces for cameras.

InterfaceDescription
picameraConnects to a raspberry pi cameraLearn More
rtspCapture images and videos over rtsp streamLearn More

If you would like at add support for another camera interface read the developer docs and submit a PR!

Available Actions

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
captureCaptures an image
recordTakes a video recording of x seconds. Default: 5 seconds

Camera Events

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",
}

Last Capture Taken

In addition to publishing events of new photos taken, the camera state will always be the last capture taken.