Sunoo / homebridge-smtp-motion

Converts SMTP messages into HTTP motion alerts that homebridge-camera-ffmpeg understands
BSD 2-Clause "Simplified" License
9 stars 3 forks source link

Motion sensor not turning on #131

Closed jandreaucodes closed 2 years ago

jandreaucodes commented 2 years ago

I've got homebridge-smtp-motion and homebridge-camera-ffmpeg both running. Here is my config:

{
            "name": "Camera FFmpeg",
            "porthttp": 8080,
            "cameras": [
                {
                    "name": "DrivewayCam",
                    "manufacturer": "xxxx",
                    "model": "xxxx",
                    "motion": true,
                    "doorbell": true,
                    "switches": true,
                    "motionTimeout": 60,
                    "motionDoorbell": true,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-i rtsp://XXX@192.168.4.86:88:554/videoMain",
                        "maxWidth": 0,
                        "maxHeight": 0,
                        "maxFPS": 0,
                        "vcodec": "copy"
                    }
                },
                {
                    "name": "Door Test",
                    "manufacturer": "xxxx",
                    "model": "xxxx",
                    "motion": true,
                    "doorbell": true,
                    "switches": true,
                    "motionDoorbell": true,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-i rtsp://XXX@192.168.5.10:88:554/videoMain",
                        "maxWidth": 0,
                        "maxHeight": 0,
                        "maxFPS": 0,
                        "vcodec": "copy"
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
        },
        {
            "name": "SMTP Motion",
            "log_emails": true,
            "platform": "smtpMotion"
        }

When the cameras detect motion, they send the email (homebridge shows the email received).

I set up the automation in Home to trigger motion (and also tried doorbell) if the motion sensor is toggled on. But the motion sensor never toggles on.

Am I missing a step somewhere?

Sunoo commented 2 years ago

What email address are you sending your alert messages to?

jandreaucodes commented 2 years ago

DrivewayCam@example.com. Just testing with that one before rolling out to the other camera (and then adding more cameras to the mix).

Sunoo commented 2 years ago

Hmm… that should be tripping it… What if you turn on logging for Camera FFmpeg? You should see messages about turning motion sensors on and off then…

Also, is this Homebridge or HOOBS?

jandreaucodes commented 2 years ago

I'm in homebridge. Here's the debug from the camera after enabling logging.

[12/2/2021, 11:57:49 AM] [SMTP Motion] [mike] Email received.

Doesn't seem to actually log anything.

Here's an update config, to make sure I turned on debug correctly.

     {
            "name": "Camera FFmpeg",
            "porthttp": 8080,
            "cameras": [
                {
                    "name": "DrivewayCam",
                    "manufacturer": "xxxx",
                    "model": "xxxx",
                    "motion": true,
                    "doorbell": true,
                    "switches": true,
                    "motionTimeout": 60,
                    "motionDoorbell": true,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-i rtsp://xx:xxx@192.168.4.86:88:554/videoMain",
                        "maxWidth": 0,
                        "maxHeight": 0,
                        "maxFPS": 0,
                        "vcodec": "copy",
                        "debug": true
                    }
                }
Sunoo commented 2 years ago

Okay, I’ll have to take a look into the code and see if I can spot the issue then. From what I can see, you should be working but the message is getting lost between the two plugins somehow.

jandreaucodes commented 2 years ago

Appreciate it, thanks.

Happy to try anything or give you access to poke around in my homebridge setup.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.