rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
382 stars 73 forks source link

SmartMotionHuman not recognized or seen in dahua_event_received #276

Open Bubbgump209 opened 1 year ago

Bubbgump209 commented 1 year ago

I have Smart Human added to the integration as one of the options. When I connect via curl

curl -g  --digest -u admin:adminpass "http://192.168.50.18/cgi-bin/eventManager.cgi?action=attach&codes=[All]&heartbeat=5"

The events are being sent by the camera (boundary and heartbeat events removed here):

Code=SmartMotionHuman;action=Start;index=0;data={
   "RegionName" : [ "Region1" ],
   "WindowId" : [ 0 ],
   "object" : [
      {
         "HumamID" : 52599,
         "Rect" : [ 2304, 736, 2752, 2944 ]
      }
   ]
}

...

Code=VideoMotionInfo;action=State;index=0

...

Code=TimeChange;action=Pulse;index=0;data={
   "BeforeModifyTime" : "05-09-2023 11:32:22",
   "ModifiedTime" : "05-09-2023 11:32:22"
}

...

Code=VideoMotionInfo;action=State;index=0

...

Code=VideoMotionInfo;action=State;index=0

...

Code=VideoMotionInfo;action=State;index=0

...

Code=SmartMotionHuman;action=Stop;index=0;data={
   "RegionName" : [ "Region1" ],
   "WindowId" : [ 0 ],
   "object" : [
      {
         "HumamID" : 52599,
         "Rect" : [ 2400, 64, 2848, 1792 ]
      }
   ]
}

However, when I run a trace on dahua_event_received in Developer Tools, the events never show up on the HA event bus. I see the generic VideoMotion, but never SmartMotionHuman.

dmaciaszek commented 1 year ago

Same here.

davidbrenner1 commented 1 year ago

I am also having this issue at an AD410.