kushagharahi / homebridge-dahua-alerts

Routes motion alerts for Dahua and Lorex camera streams to homebridge-camera-ffmpeg
27 stars 13 forks source link

Alerts issue with posting motion - Error when posting reset video motion to homebridge-camera-ffmpeg - didn't get a response from homebridge-camera-ffmpeg - connect ECONNREFUSED 127.0.0.1:8080 #37

Closed scaryfast8750 closed 2 years ago

scaryfast8750 commented 2 years ago

struggling to get this configured.

CameraFFMpeg Config - works awesome in HomeKit and has for a long time.

"name": "Camera FFmpeg", "localhttp": false, "cameras": [ { "name": "***", "manufacturer": "Lorex", "model": "LNB81111", "motion": true, "motionTimeout": 0, "unbridge": true, "videoConfig": { "source": "-i rtsp://username:pass@hostname.local:554/cam/realmonitor?channel=1&subtype=1"

DahuaAlerts config

"homebridgeCameraFfmpegHttpPort": 8080, "useHttp": true, "cameras": [ { "index": 0, "cameraName": "**", "cameraCredentials": { "host": "hostname.local", "user": "username", "pass": "pass", "useHttp": true

Note these values are the same across both configs for the camera -username -pass -hostname

I am getting the following error when I walk in front of the camera.

[homebridge-dahua-alerts] Error when posting reset video motion to homebridge-camera-ffmpeg - didn't get a response from homebridge-camera-ffmpeg - connect ECONNREFUSED 127.0.0.1:8080

I tried to search for others having this issue but didnt see anything exact.

Help please.

kushagharahi commented 2 years ago

localHttp must be true, not false in the ffmpeg config.

scaryfast8750 commented 2 years ago

CameraFFMpeg Config - UPDATED

"name": "Camera FFmpeg", "porthttp": 8088, "localhttp": true, "cameras": [ { "name": "Garage", "manufacturer": "Lorex", "model": "LNB8111", "motion": true, "motionTimeout": 0, "unbridge": true, "videoConfig": { "source": "-i rtsp://admin:pass@hostname.local:554/cam/realmonitor?channel=1&subtype=1"

DahuaAlerts config - Updates

"homebridgeCameraFfmpegHttpPort": 8088, "cameras": [ { "index": 5, "cameraName": "Garage", "cameraCredentials": { "host": "hostname.local", "user": "admin", "pass": "pass", "useHttp": true

I no longer see errors in the logs on startup!!!!! I see the following:

[homebridge-dahua-alerts] Response recieved on host: hostnmae.local: --myboundary Content-Type: text/plain Content-Length:79

Code=VideoMotion;action=Start;index=0;data={ "RegionName" : [ "Region1" ]

But I still dont see any motion on the motion sensor in HomeKit. I also selected the default option to turn on the lights in the same room as this motion sensor but they dont turn on.

Thoughts?

kushagharahi commented 2 years ago

Make sure you turn on activity notifications on the camera in the Home app to see motion alerts.

Otherwise I'm not sure, as long as the logs show that motion alerts are being detected by the plugin and sent to ffmpeg (e.g, Motion for ${cameraName} posted to homebridge-camera-ffmpeg, received), the plugin is working

scaryfast8750 commented 2 years ago

Does MQTT have to be enabled under my CameraFFMPEG settings?

kushagharahi commented 2 years ago

No. Are you not seeing the following log? Motion for ${cameraName} posted to homebridge-camera-ffmpeg, received

scaryfast8750 commented 2 years ago

This appears to be the only thing I see when I walk in front of the camera.

[7/13/2022, 5:48:30 PM] [homebridge-dahua-alerts] Response recieved on host: hostname.local: --myboundary Content-Type: text/plain Content-Length:79

Code=VideoMotion;action=Start;index=0;data={ "RegionName" : [ "Region1" ] }

kushagharahi commented 2 years ago

Can you turn on debug logs and send those please?

scaryfast8750 commented 2 years ago

ok...I went back though my config again and in my testing I had changed the camera index. when I set it correctly it worked perfect...MY APOLOGIES FOR WASTING YOUR TIME!

kushagharahi commented 2 years ago

Awesome, glad to hear it :)