Skip to content

Having 2 different URLLIB cameras setup causes stills to be cross-saved in each-other's Stills directories. #1507

@LucidEye

Description

@LucidEye

Describe the problem/bug

I have 2 separate IP cameras setup on my network.
They each have unique IP addresses and unique host names as they should.
I am accessing those cameras in Mycodo using the urllib camera option.
In the urllib camera settings I have separate Stills directories setup for each camera.
I am using 2 separate Trigger: Daily Time Span Functions to grab stills from each camera at 10 second intervals to later compile into time-lapse videos.
Somehow, if both Daily Time Span Functions are active at the same time, stills captured from camera B are being saved in the Stills directory for camera A ?!?!?
Obviously this completely ruins the image sequence for any time-lapse compilation.
I don't even understand how this is possible given that there are different directories setup for each camera and the images are coming in from different IP addresses... but somehow it's happening, and I don't even know where to begin to troubleshoot this.

There are many repeating errors in the logs saying that images could not be acquired, but both cameras are functioning fine, both have at least 90% WiFI signal strength, I can access both camera's web interfaces, live-streams, and still streams with no problems directly from a web browser.
This is what the error blocks all look like, one for each camera and it's respective time span function...

FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/Mycodo/cameras/TasmotaCam/stills/Still-2-TasmotaCam-2026-01-07_08-52-01.jpg'
2026-01-07 08:52:01,546 - ERROR - mycodo.devices.camera - No image was created. Check your settings and hardware for any issues.
2026-01-07 08:52:01,546 - ERROR - mycodo.action.camera_capture_photo_595fca5d -  Could not acquire image.
2026-01-07 09:22:51,448 - ERROR - mycodo.devices.camera - Could not convert, rotate, or invert image: [Errno 2] No such file or directory: '/tmp/wc.jpg' -> '/home/pi/Mycodo/cameras/TasmotaCam/stills/Still-2-TasmotaCam-2026-01-07_09-22-51.jpg'
2026-01-07 09:22:51,448 - ERROR - mycodo.devices.camera - Camera image not found
2026-01-07 09:22:51,449 - ERROR - mycodo.devices.camera - Exception raised in 'camera_record' when setting user grp: [Errno 2] No such file or directory: '/home/pi/Mycodo/cameras/TasmotaCam/stills/Still-2-TasmotaCam-2026-01-07_09-22-51.jpg'
Traceback (most recent call last):
  File "/opt/Mycodo/mycodo/devices/camera.py", line 497, in camera_record
    set_user_grp(path_file, 'mycodo', 'mycodo')
  File "/opt/Mycodo/mycodo/utils/system_pi.py", line 683, in set_user_grp
    os.chown(filepath, uid, gid)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/Mycodo/cameras/West-3/stills/Still-3-West-3-2026-01-07_10-46-10.jpg'
2026-01-07 10:46:11,750 - ERROR - mycodo.devices.camera - No image was created. Check your settings and hardware for any issues.
2026-01-07 10:46:11,751 - ERROR - mycodo.action.camera_capture_photo_18f8e39d -  Could not acquire image.
2026-01-07 10:55:51,716 - ERROR - mycodo.devices.camera - Could not convert, rotate, or invert image: [Errno 2] No such file or directory: '/tmp/wc.jpg' -> '/home/pi/Mycodo/cameras/West-3/stills/Still-3-West-3-2026-01-07_10-55-50.jpg'
2026-01-07 10:55:51,717 - ERROR - mycodo.devices.camera - Camera image not found
2026-01-07 10:55:51,717 - ERROR - mycodo.devices.camera - Exception raised in 'camera_record' when setting user grp: [Errno 2] No such file or directory: '/home/pi/Mycodo/cameras/West-3/stills/Still-3-West-3-2026-01-07_10-55-50.jpg'
Traceback (most recent call last):
  File "/opt/Mycodo/mycodo/devices/camera.py", line 497, in camera_record
    set_user_grp(path_file, 'mycodo', 'mycodo')
  File "/opt/Mycodo/mycodo/utils/system_pi.py", line 683, in set_user_grp
    os.chown(filepath, uid, gid)

Versions:

  • Mycodo Version: 8.16.2 - latest release version
  • Raspberry Pi Version: Pi 4 - 4GB ram
  • Raspbian OS Version: Debian 12 Bookworm for Raspberry Pi 4 - Running on a USB 3 SSD (NO SD CARD)

Reproducibility

Please list specific setup details that are involved and the steps to reproduce the behavior:

  1. Setup urllib camera A, giving it a unique Stills directory
  2. Setup urllib camera B, giving it a unique Stills directory
  3. Setup Trigger: Daily Time Span Function A to capture still image from camera A every 10 seconds.
  4. Setup Trigger: Daily Time Span Function B to capture still image from camera B every 10 seconds.
  5. Activate Daily Time Span Function A and allow it to run for a few minutes. Observe the images being saved in camera A Stills directory and you will see only images from camera A being saved.
  6. Activate Daily Time Span Function B and allow it to run for a few minutes. Now observe the images being saved in the Stills directory for camera A and you will start seeing occasional and random images from camera B being saved in the wrong directory YET SOMEHOW WITH THE CORRECT NAME AND TIMESTAMP FOR CAMERA A ?!?!?!?
  7. Somehow, the images are being mixed up and I can't understand how this can even happen.
  8. Expected behavior is to have the correct images being saved for each separate camera in their respective separate stills directories without getting mixed up and incorrectly renamed for the wrong camera.

Each camera has it's own unique stills directory as setup in the Camera Page settings...
Image

Camera Page settings, each camera has a unique name, IP address, and stills directory...

"Camera A"
Image

"Camera B"
Image

Daily Span Function for "Camera A"
Image

Daily Time Span Function for "Camera B"
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions