VorlonCD / bi-aidetection

Alarm system for Blue Iris based on Artificial Intelligence.
https://ipcamtalk.com/threads/tool-tutorial-free-ai-person-detection-for-blue-iris.37330/
GNU General Public License v2.0
203 stars 45 forks source link

telegram notifications skip every 10 minutes feature #320

Open xjustbmw opened 2 years ago

xjustbmw commented 2 years ago

Is it possible to receive only one positive notification every 10 minutes (for all cameras). The rest should be skipped. I have several cameras setup and when Im outside the phone beeps all the time while I move :) Also made a tasker profile to silence the phone , but the battery drains like crazy from these photos coming in:)

Tried playing with cooldown time, but the photos are just delayed in this way.

VorlonCD commented 2 years ago

For any of the recent versions you can simply reply to the telegram message PAUSE 30 to pause all cameras 30 minutes. You may have to ask botfather to disable /setprivacy for this to work though. https://github.com/VorlonCD/bi-aidetection/tree/master/src/UI/Installer

xjustbmw commented 2 years ago

instant reply :) many thanks for your help i was using an old version of aitool indeed :) october 2020 (last release) with latest deepstack im getting error when trying to start, yet the deepstack in debug mode seems to start , but http://127.0.0.1:50000/v1/vision/detection seems to load a 404 page is it a different url now ?

xjustbmw commented 2 years ago

the debug log of deepstack is this: DeepStack: Version 2022.01.01 /v1/vision/detection


v1/backup

v1/restore

xjustbmw commented 2 years ago

all good had to manually kill server.exe

VorlonCD commented 2 years ago

Does that still happen with latest AITOOL version? It supports the latest 'Windows' deepstack release 2022.01.01.

VorlonCD commented 2 years ago

The latest version of deepstack doesnt use SERVER.EXE so you may have an old version in the mix. It does use DEEPSTACK.EXE, and REDIS-SERVER.EXE

xjustbmw commented 2 years ago

i actually just updated deepstack as well. i think server.exe was left behind running :) redis-server / deepstack are running now i will test the PAUSE feature, that sends message back to aitool or is it a telegram feature to stop the bot for x minutes ?

VorlonCD commented 2 years ago

Sends back to AITOOL. When working correctly upon startup AITOOL will send you a list of supported commands such as REBOOT, SHUTDOWN, PAUSE, etc.

xjustbmw commented 2 years ago

just got the message back that all cameras are paused for x minutes :) this is the only way to stop it sending messages ?

VorlonCD commented 2 years ago

No, cooldown should be working of course, not sure why you were having trouble. Try 600 or 1200 seconds. Also, you can simply go to Actions, and uncheck "Send alert images to telegram" if you dont want it to send images at all. And "Dynamic masking" will stop sending alerts if it keeps seeing an object in the same place, like a car in your driveway.

xjustbmw commented 2 years ago

i was getting all the detected images but with delays of the cooldown set time i will try it again in the new version, hopefully they get skipped will report back

xjustbmw commented 2 years ago

I tested again the general cooldown of the settings menu of telegram the pictures are indeed just delayed by the cooldown time, not skipped i receive all of them (lot later than they were taken) with cooldown seconds delay between them can you please check ?

VorlonCD commented 2 years ago

Oh, maybe you want to use the per-camera COOLDOWN setting instead of the telegram specific one? Cameras tab > Action settings > Cooldown Seconds

xjustbmw commented 2 years ago

auch :) I will try that as well. In the last stable version i think it behaved the same.

but, I have about 12 cameras pointing at the same garden :) that will trigger 12 times untill all of them ... cooldown :)

VorlonCD commented 2 years ago

Hmm try turning off the QUEUED checkbox for each camera. That could be related since queued actions behave a little different. If you hover over the checkbox you will see it says "it is possible this will affect how the telegram cooldown feature works"

xjustbmw commented 2 years ago

indeed. queue was on for all cameras you think this also affects the main telegram cooldown setting ?

VorlonCD commented 2 years ago

yes it does affect that. When queued it simply waits the cooldown time but doesnt actually skip it - just like you are seeing. What I really need to set up are camera GROUPS so multiple cameras can have the same cooldown timing.

xjustbmw commented 2 years ago

Yes. that would be amazing. :) Also groups can handle same object detection : example cars in one, persons in others :)

I remember we spoke about 1 year ago about the object minimum size (I had in cats falsely detected as persons by deepstack, and was able to filter them out by their size after you added the feature)

Will test tomorrow the cooldown without queue. quite sure it will work though :)

xjustbmw commented 2 years ago

little updated as promised. all is working perfectly:)