Hey Everyone,
Hoping to give back to the community any way I can, so I thought I’d share my solution to triggering automations whenever my Lorex security system detects motion. I suspect this would work with a number of other security systems as well.
Background:
I bought this high quality Lorex system a while ago. Great product, but even with all it’s “smart” motion detection where it’s only supposed to report cars or people, I would still get a lot of false positives. Mostly shadows. Furthermore, their were no webhooks that would allow me to trigger an event on HA to do things like… Turn my porch lights on when some is checking my car door to see if it’s unlocked.
My solution:
Here is the short answer. If this generates any interest, I’m happy to get into greater detail.
One feature Lorex does have is FTP. I started by setting up an FTP server using a Home Assistant Community Add-on “FTP”. I then set up Lorex to send snapshots to the FTP whenever motion was detected.
Once files were getting dropped in the FTP, I set up a Folder Watcher pointing to the local FTP folder. With this in place, I was able to add an event trigger to any automation.
I use this trigger to send notifications to my phone. Using Automation Trigger Variables I have it send the snapshot to my phone along with an option to snooze for 8 hours if I’m getting too many notifications.
Related Features:
- Linked porch camera to a PIR sensor at the front door. I only get notifications when both motion and the PIR are triggered. I get hardly any false positives on this camera.
- Added an option on the notification to save the snapshot to the server. I purge the snapshots every few hours to save space. This allows me to keep anything interesting.
- Turn on outside lights when motion is detected after sunset
Future Related Features:
- Add action to send Snapshot to TV
Models
PVR: N841A8
Cameras: E891AB