Amcrest EMail Sensor

I’ve been having too much fun with Home Assistant and decided I want to make use of the alarms on my new Amcrest cameras (Motion, Tamper, etc). I built a little SMTP server using Twisted (which is already installed as a dependency for something else). Unfortunately, the Mail components of Twisted aren’t python3 ready yet so I had to do some manual work there. I have my cameras configured to send email alerts to my HA server on port 2525. The Twisted protocol will receive the email, decode it and then pass it on to an HA sensor.

As per usual, everything is at: https://github.com/drytoastman/haconfig

The files are:

custom_components/amcrestsmtpreactory.py - the Twisted SMTP server
custom_components/amcrestalert.py - the new platform
custom_components/sensor/amcrestalert.py - the new sensor

Example config (duplicates the camera info, haven’t figure out a way to share that yet):

sensor:
    - platform: amcrestalert
      cameras:
          - host: 192.168.2.3
            name: Driveway
          - host: 192.168.2.4
            name: FrontDoor

what model cameras are you using? i am looking at getting a couple but there are so many different ones out there. amcrest alone has like 50 models it seems.

Amcrest IPM-723W. Decent price on Amazon, not too expensive, outdoor, wireless seems to work well enough for me. I think it might be a slightly older model as the newer ones have better resolution but 1280 x 960 is fine for my use.