Hi,
I've got a camera (Vistacam) wich I'm unable to add to domoticz. However, I'm OK with showing fotos from it. But it puts images in a folder and all image files gets different names. Is there a simple way to show the newest image file from a folder? I'd like to add that code to my frontpage.html.
/Johan
Show latest image from folder
Moderator: leecollings
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Show latest image from folder
What is the filename structure?
You're ok with php?
You're ok with php?
Re: Show latest image from folder
The camera stores jpg-files in a folder:
c:\Domoticz\www\cams\chicken
on a windows server.
the files are named similar to this: VSTA016411UKFLZ_0_20161226085543_5.jpg
I'm new to PHP but it could be a good reason to start learning
c:\Domoticz\www\cams\chicken
on a windows server.
the files are named similar to this: VSTA016411UKFLZ_0_20161226085543_5.jpg
I'm new to PHP but it could be a good reason to start learning

- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Show latest image from folder
The first part is always the same? Then a date/time stamp with a sequential number at the end?
How often do they update?
Maybe I'll write something tomorrow with the php glob function. Can't be to difficult with such names.
How often do they update?
Maybe I'll write something tomorrow with the php glob function. Can't be to difficult with such names.
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: RE: Re: Show latest image from folder
Why not schedule (previously know as AT) a batchfile (or 2) to copy the latest into say c:\domoticz\www\vesta_image.jpg.johan99 wrote:The camera stores jpg-files in a folder:
c:\Domoticz\www\cams\chicken
on a windows server.
the files are named similar to this: VSTA016411UKFLZ_0_20161226085543_5.jpg
I'm new to PHP but it could be a good reason to start learning
Windows standard is to write date/timestamp with LastModified so u can use that for your Latest Image.
After that you can setup a 'static' camera within Domoticz with the url http://domo-ip:domo-port/vesta_image.jpg
And to clean up say daily another to copy/move the last whole day to c:\image_bak\year\month\day
Basic commands are available for these methods in windows. Or learn PowerShell which you give fine grained control over date/time etc.
Who is online
Users browsing this forum: No registered users and 1 guest