Camera

MudPi supports PiCamera library allowing you to take photos of your plants. Read the camera configuration docs for details on how to start the camera. Make sure you also enabled camera support through raspi-config for your pi if you have not done so.

Camera Captures

The camera will continuously capture a photo at intervals specified 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 the name format mudpi-#####.jpg where the numbers starts at 00001 and increments for each photo.

The camera will save the image at the resolution in the config file or default to 1920x1080. Any camera that can connect to the pi camera slot and supported by PiCamera is also supported by MudPi.

Camera Events

The camera is also powered by a camera worker and will publish an event every time a new photo is captured.

channel: Based on value set for "topic" option in camera configuration

New Image Taken

{
    "event": "StateChanged",
    "data": "/your/full/path/mudpi-00001.jpg"
}

Last Image Taken

In addition to publishing events of new photos taken, MudPi will also save the most recent photos file name into Redis. The file name will be stored under the key last_camera_image. You can read more on stored values in redis under the data storage docs.