rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
383 stars 74 forks source link

none of the sensors from NVR DHI-NVR5216-16P-I work #255

Open chali272 opened 1 year ago

chali272 commented 1 year ago

Non of my sensors work from my NVR Device Model | DHI-NVR5216-16P-I it doesn't matter what camera im using (have many modells) the funny thing is that the switches work for exempel turning on motion detection and so on. and video work, im getting 3 streams from all dahua and imou cameras and 2 from hike cameras.

buzzzzer commented 1 year ago

DHI-NVR5216-4KS2 the same issue. binary_sensor.*_motion_alarm does not work 3 streams and all motion-enable switches works ddms alarm work too

chali272 commented 1 year ago

DHI-NVR5216-4KS2 the same issue. binary_sensor.*_motion_alarm does not work 3 streams and all motion-enable switches works ddms alarm work too

you only need to modify init file in ha, Ha thinks the nvr is a doorbell. go to file editor-/config/custom_components/dahua and open init.py. modify nr: 522-526 to look like this:

def is_doorbell(self) -> bool:
    """ Returns true if this is a doorbell (VTO) """
    m = self.model.upper()
    """return m.startswith("VTO") or self.is_amcrest_doorbell()"""
    return m.startswith("VTO") or self.is_amcrest_doorbell()