Odianosen25 / Monitor-App

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

MQTT_MESSAGE Fix, Use RSSI scan, Code Cleanup #2

Closed shbatm closed 4 years ago

shbatm commented 5 years ago

Hello! First of all, awesome app, this is exactly what I needed to tie together my Monitor nodes.

I was a little bored (and a lot OCD) and did some code clean-up to make everything a bit more readable for myself so I could eventually expand this to include exterior motion sensors that trigger an Arrive scan after a delay (e.g. when my Hikvision camera detects a line crossing as my car approaches down the driveway).

I just wanted to share in case you were interested in incorporating any of the cleanups and tweaks. If not, no worries and thanks for the head start!

Changes:

Odianosen25 commented 5 years ago

Wow thanks for this @shbatm,

As I am just seeing this, will take a while to process it and get back to you.

I am not a full time programmer, so forgive me if I need some tutorial on what your changes and why.

Regards

Odianosen25 commented 5 years ago

I tried running yours in my environment and got a lot of errors.

Will need to walk thru it later once I got some time at hand.

Regards

shbatm commented 4 years ago

Finally got around to testing this in detail and think I found most of the bugs you saw. I screwed up and marked several callback functions with **kwargs instead of kwargs.

Odianosen25 commented 4 years ago

Hello @shbatm,

Oh thanks for this. Will look into the new changes and get back if I got other questions.

Kind regards

shbatm commented 4 years ago

No problem. I really appreciate all the work you put into putting this together; going through it and putting my OCD to work really just helped me learn how AppDaemon works and interacts with HA. Feel free to use what you want out of my changes or disregard completely, just wanted to share back.

I'll also send a separate PR with a different branch that pushes the RSSI values to the confidence sensors' attributes and determines which device it was closest to.

Odianosen25 commented 4 years ago

This is really good stuff, thanks again and will put some work into testing, hopefully this weekend.

Kind regards