evilmarty / mjpeg-timelapse

Mjpeg Timelapse integration for Home Assistant
MIT License
24 stars 4 forks source link

Overwriting last image saved so timelapse of one frame when pulling images from Agent DVR #24

Open arwiens opened 6 months ago

arwiens commented 6 months ago

I have two entities setup, one pulls images directly from an IP camera and another that pulls images from a camera via "grab.jpg" from Agent DVR. The one that pulls images direct works fine and gives me a 24 hour timelapse but the one pulling from Agent DVR url, it returns an image fine but the new images seem to always overwrite the old ones so when you look in the folder you only see the last image. When you you view the time lapse entity all you see is the last captured image which changes every time it saves a new image.

Below is the config for the two cameras (url's has been replaced for security)

  {
    "entry_id": "447a6b7190944967519c2d75af8c5b2a",
    "version": 1,
    "minor_version": 1,
    "domain": "mjpeg_timelapse",
    "title": "A Timelapse Camera",
    "data": {
      "image_url": "image_url_a",
      "name": "A Timelapse Camera",
      "fetch_interval": 300,
      "framerate": 10,
      "max_frames": 288,
      "quality": 75,
      "loop": true,
      "password": "X123",
      "username": "admin"
    },
    "options": {},
    "pref_disable_new_entities": false,
    "pref_disable_polling": false,
    "source": "user",
    "unique_id": null,
    "disabled_by": null
  },

  {
    "entry_id": "ddabbb2da576bbf33e1458b0db3a59ab",
    "version": 1,
    "minor_version": 1,
    "domain": "mjpeg_timelapse",
    "title": "B Timelapse Camera",
    "data": {
      "image_url": "image_url_agent_dvr_b",
      "name": "B Timelapse Camera",
      "fetch_interval": 300,
      "framerate": 10,
      "max_frames": 288,
      "quality": 75,
      "loop": true
    },
    "options": {},
    "pref_disable_new_entities": false,
    "pref_disable_polling": false,
    "source": "user",
    "unique_id": null,
    "disabled_by": null
  },