Coder Social home page Coder Social logo

hanr-event-bus-flow's Introduction

HaNr-event-bus-flow

This flow listens for dahua_event_recived. The funcion node manipulates event data:

  1. Creates payload for snapshot call.
  2. Covers all supported event types. see here
  3. Numbers snapshot (allows multiple snapshots per message type before rewrite).
  4. Stores snapshot in different folders according to trigger type.
  5. Creates payload for text including snapshot file location.
  6. Creates payload for separate tts message.
  7. Bounces duplicate and stop messages.
  8. Rate limit by event and camera number.
  9. Retrieve phone state, bounce tts message if on phone.
  10. Create multiple zone triggers per camera. (See below)
  11. Alternating outputs for faster snapshot storage

Screenshot 2024-02-06 105820

Dahua cameras allow the naming of ivs rules. These names are sent with the event. The Dahua intgration (https://github.com/rroller/dahua) combines all ivs rules from a single camera together.

In the camera/dvr/nvr/xvr channel settings, create rules and name them. You will use theses names to identify triggers.

Screenshot 2024-01-26 133716

If you turn on show ivs rule in Dahua's smart pss app. (https://dahuawiki.com/SmartPSS_Lite) You can see the two ivs zones and their respective names.

Screenshot 2024-01-26 133838

When one of the rules are triggered there is the rule name value in payload.event.data.Name.

Using a conditinal statement (see rule 1 in camerafunc.js) allows us to target specific keywords found in the event data.

Dahua cameras offer other information in the event data. Target location and direction of travel among other things. Multiple sample JSON included in flow file.

hanr-event-bus-flow's People

Contributors

mikefila avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.