I have seen this behavior a couple times myself. But only when there have been multiple notifications sent in somewhat rapid succession. It has nothing to do with paths, thatās a different discussion.
We could change the filename for the image to contain a unique identifier (like datetime) but then we would need to clean-up these photoās at some point.
It could also just be a race condition, where the photo is not yet overwritten when the notification is send, because the snapshot service takes long to respond. In this last case this could easily be fixed by adding a wait before sending the notification.
Thanks for the prompt reply, Stan. Honestly Iām pretty perplexed by this. The 2 second delay didnāt seem to help (I changed it to 30 seconds also). I also added a 2 second delay per on when to take the snapshot, just to see if I could trace things.
Steps:
manually execute the automation for testing (9:54:54 PM)
through HA File Editor plugin, navigate to /config/www/tmp/ and check the timestamp on the file created (I manually deleted the prior files before the test). verify it is 2 seconds later due to the optional snapshot delay (9:54:56 PM)
check the trace of the automation and verify the new 30 second blueprint delay (I overwrote your 2 second since that didnāt work the first try) is executed (9:54:56 PM)
check the timestamp on when the notification was sent (9:55:26 PM)
check the actual android notificaiton that came in at 9:54:56 PM and observe that the timestamp overlay is Friday at 2:44pm
I really donāt understand where it is pulling that image from. The image literally doesnāt exist in the directory. There have been probably 50+ snapshots since that time on Friday, where could it possibly still pull this one from? It seems to get āstuckā sometimes on various old snapshots. Itās not always 2:44pm Friday, I did get a few Sundays in there. Could it be cached in the app itself somehow?
I did restart HA after making the above changes and before this test. So if something was somehow in memory, I would assume that would have cleared out any 3+ day old snapshots.
FYI, this appears to be working for me now. So based on Maxedmini, it doesnāt appear to be mobile OS specific. Iām running latest Android OS on a Pixel for my testing. I will continue to test it tomorrow and see how it plays out and figure out the cleanup of the old files later.
The most curious thing is that the āoldā images it shows are kind of all over the place. Most of the are from Friday, but then I had a few Sunday images in there, and then once or twice it was an actual fresh, new images. Thatās the part I donāt quite get is how itās mostly the same few old images, but itās not consistent at all. The only thing I can think of is that Iām running on a VM for years now and I know thatās not the preferred installation approach for HA anymore, I just havenāt bother to migrate to docker.
Iām running a VM with Home Assistant Operating System myself. I think itās the preferred method next to running Home Assistant Operating System on bare metal.
Ya, I could be remembering wrong. I thought I recalled something in recent years about changing the recommended install methods.
Regardless, this does seem to be working well now. For my purposes, I did move the original delay to be ahead of the āconditionā check. I did this so I could set the blocking entity state for the āperson detectedā flag on my reolink camera which is slower to react/update to āonā.
I have two automations now, one triggered by the regular camera motion event, with a 1 second delay, and the condition check to see if a person has been detect. That sends the motion detected notification when there is no person. Then a separate notification triggered by the person detected sensor, with no blocking entity, that can send a different notification for the person.
Hi, the automation used to work perfectly even when I was connected to an external URL. Now it suddenly stopped sending and image when I am not on local URL. Is there a fix? I went through all the replies and I didnt find any fix
If you have the samba addon, you can use explorer to see the name of the file. Itās in the config/www/tmp folder. You can also use SSH to lookup the name of the file.
i tried it and it works i tried it on my phone while on my local wifi, on cellular data, and also on my macbook, in all instances it worked fine via the external web adress for my home assistant