nischi / MMM-Face-Reco-DNN

Face recognition with opencv and deep neural network
MIT License
91 stars 46 forks source link

Issue #50 Alert Notification Fix #54

Closed jimbydude closed 4 years ago

jimbydude commented 4 years ago

Hey,

I hope this is ok. I added two things to this PR

  1. Fix to only send/push alert notifications when a new user is seen
  2. New Notification type of 'USERS_LOGOUT_MODULES'

When using this module I realized that the USERS_LOGOUT was more like a 'USERS_LEFT_CAMERA_VIEW' since logout was more akin to re-hiding the modules. By adding this new type a user can take action when the modules are being hidden as well as when leaving camera view.

Cheers

nischi commented 4 years ago

like that, thanks

jimbydude commented 4 years ago

Hi,

Thanks for merging, awesome. I noticed that you omitted the additional notification type, for when we are about to hide modules again. Is that not something you think is needed, or would you prefer a separate PR for that specificially?

My use case is that I show the users face in corner while logged in (and their modules are unhidden), then clear it to a default gif when hidden. The USERS_LOGOUT message is fired when user leaves camera view, which is not what I want here.

Cheers Jim

nischi commented 4 years ago

Hmmm good question. I think two different notifications make kind of sense. Someone want to show a message while the user is leaving like "Good bye John" and somebody as you want to show the Image as long as the modules are shown. So in this case all good, right?

jimbydude commented 4 years ago

Yes, that is correct.

My PR had this code change in but you didn't merge that part in. If you want I can create another PR with just that?

nischi commented 4 years ago

oh sorry, that was a misstake. yes please do another PR