Odianosen25 / Monitor-App

Appdaemon App for Andrew's Monitor Presence Detection System
74 stars 9 forks source link

Control triggered scans #70

Closed pittbull closed 3 years ago

pittbull commented 3 years ago

Hi, and thank you for your efforts in creating this app. I really love it, and since I've already used the monitor app for quite some time, your app was a great addition.

I do have a question I hope you can help me with, but first my setup:

I have set up two gateways to trigger scans: One is a camera at my front door, and the second is a motion detector at my garage.

This works most of the time: People coming and going triggering both arrival and departure scans. The one problem I'm having is that when leaving the house I some time end up in front of the garage in the middle of an ongoing scan and I have to manually open the garage door. (yeah, I know right - "manually"!)

My question is this: Is it possible to run scans selectively on any given node? I would prefer if the front door camera only triggered scans on the primary node, and the motion detector at my garage triggered scans only on the secondary node.

Do you think this is doable, or is there a simpler solution to what I'm trying to achieve?

//Thomas

Odianosen25 commented 3 years ago

Hello @pittbull,

Lols you sure read my mind on the manual garage stuffs, and for some reasons cracked me up so much your comment did. Anyway unfortunately the feature you asking for was something I was really intrested in for a long time, but there is no way I cam implement selective scanning of location due to how Andrew built the monitor script itself.

So based on the above, even though its an "easy" fix, I can't do anything about it. Also if you want to experiment and you use AD outside this app, the app has services you can call from other apps as you like. You could try it, but it just wouldn't work as all must be scanned at once.

Regards

pittbull commented 3 years ago

Thank you so much for your quick response. :)

Would it be possible to run the garage scanner stand-alone, on a separate mqtt channel - but use service calls from the app to trigger scans on that node only (via the separate mqtt channel)?

pittbull commented 3 years ago

As I fear that this is not possible I have tried to set the timeouts higher (300 for departure scan and 360 for not_home) as this would mean that I would arrive at the garage before any scans would've happen, and hence the garage would do an arrival scan when motion was detected outside the garage.

Here's hoping this will work. :)

Odianosen25 commented 3 years ago

Yes unfortunately that is the only options you have, in addition to increating the deaprt scan count. I also considered the option of putting the garage on a separate mqtt topic, but thinking it more, might be possible to manage the garage separately.

I have never thought or tried this before, but it will be possible to instanciate another app, which will handle diferent nodes on different topics. More work on your end to setup, but its the flexibility AD gives.

Regards

pittbull commented 3 years ago

Good point on a second instance, but in my mind it's just easier and less complex to just run it outside of AD. (Unless the timeouts will work)

pittbull commented 3 years ago

Interesting observation:

I changed my time out values to:

  depart_check_time: 300
  depart_scans: 1
  minimum_confidence: 90
  not_home_timeout: 360
  system_check: 100
  system_timeout: 120

and now the app is only doing a departure scan after 5 minutes when triggered by gateway. No arrival!

Confused.

Odianosen25 commented 3 years ago

@pittbull it will only do arrival, if there was a device "away".

So regardless of the fact there were devices both away and home, it only did depart?

Regards

pittbull commented 3 years ago

Yeah, I now... And yes - it only did a depart. 🤷‍♂️

For now I have replace my gateways with a dummy switch that never changes, and moved the presence logic into node-red giving me full control over what will execute arrives and departs - and when. :)

Odianosen25 commented 3 years ago

Ok cool. I will look into the potential bug.

Thanks for pointing it out.

Regards

pittbull commented 3 years ago

Great!

Let me know if you need any help troubleshooting.

Odianosen25 commented 3 years ago

Hello @pittbull,

I have just had the time to look into things, and tested your config and can confirm it all works as expected. When next you look at this, can you confirm the state of the everyone_home/not_home sensors please?

I will be closing this for now, but do open it if you have other concerns

Regards