Display jpg (from network share)... if jpg changes, display new image

I have an app that takes a screenshot of my desktop ever xx seconds; and, saves it on a network shared directory.

How can I setup a Home Assistant card to display the jpg and automatically refresh the image when the image changes? Considering the source is \My-PC\screenshot\image.jpg for example?

May want to check out Folder Watcher

I have not tried it on a network shared directory, so not sure; but you will need to white list it.

Here is the community thread on this topic (ignore the part about custom component):

Maybe you can use this.

Folder watcher cannot monitor network drives

1 Like

What about if you mount the network folder?

Just use the generic camera integration. By default it updates every 20 seconds. Set the view to live and it will update live. Have the generic camera point to your jpg and you’re done.

1 Like

Thanks. Does this solution work for network folders?

Mount the network drive.

1 Like

@nickrout how do I do that on Home Assistant VM? I guess in a worst case I could setup a small web server on my other PC… but, I would prefer to do this natively in Home Assistant if possible.

mkdir /config/www/remotepics
mount -t cifs //server/share /config/www/remotepics

I am assuming the cifs filesystem drivers are present.

1 Like

@nickrout are you sure the mount will stick after a reboot; even if the drivers are present? I wasn’t able to find out any information on this for HASSIO

No you’ll need to do it every time, which you can automate.