rroller / dahua

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

Can someone help to update the docs #318

Open moskovskiy82 opened 9 months ago

moskovskiy82 commented 9 months ago

The docs just give you basic backlight codes like door open and the formatting is hard to get hand on. So here is some investigation tested on VTO22xx

Like in the docs Status 8 generates just the door open event

  - platform: event
    event_type: dahua_event_received
    event_data:
      Code: BackKeyLight
      Data:
        State: 8

But if you want a more granular you can use a different approach

Door open via the exit button

  - platform: event
    event_type: dahua_event_received
    event_data:
      Code: AccessControl
      Data:
        Method: 5
        Name: OpenDoor

Door open via RFID key

  - platform: event
    event_type: dahua_event_received
    event_data:
      Code: AccessControl
      Data:
        CardNo: XXX - This is where you put your key ID like 01X5575F (can be found in Dahua web interface or while listening for events on dahua in HA
        Name: OpenDoor

I am lame on submitting pull requests so if someone can help feel free to use above