Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

Posted (edited)

Hello, 

 

This is one of my first posts on this forum. I’m kinda fresh to Fibaro so appreciate feedback on this work if any.

 

Credits go to @jgab for his FibaroExtra, EventRunner4, TQAE and hjdhjd (

Please login or register to see this link.

) who researched the undocumented and unsupported live update protocol of Unify NVR.

 

What is the use case:

  • Use your Unify Protect Cameras capable of smart motion tracking as ‘smart’ motion sensors.
  • I personally use it for triggering lights outside evening/night when motion is detected.
  • Please note the API/LiveUpdate protocol is officially supported by Unify. 

 

Requirements:

  • Unify Dream Machine Pro (tested on v1.12.33)
  • Unify Protect G4 Cameras (tested on G4 v4.57.35) – probably other capable of smart motion tracking work too, but didn’t test.

 

Capabilities:

  1. The motion sensor implementation is based on com.fibaro.motionSensor.
  2. It is a single device funnelling events from all cameras managed by Unify Protect.
  3. Receive a stream of live updates from Unify NVR WebSocket about events like smart zone detection of person o vehicle or line crossing. 
  4. Apart from setting the value property of the device to true/false when smart motion event occurs, it will emit custom events #nvrCustomMotionEventStart and #nvrCustomMotionEventEnd which contain details about the event (etype, score, objects[person|vechicle]).
  5. The UI is basic, showing 3 recent motion events in a rolling buffer in addition reset button force WebSocket reconnection.
  6. The motion sensor is considered off when all active motion events have ended.
  7. Upon error, the QA will retry the connection to NVR 8 times. Each reconnection attempt is delayed by current error count*10 seconds. If the issue had not been resolved 8 times it will suspend operations, wait for user corrective actions and manual restart.

 

How to install:

  1. Classic, download the file and add a new device from the QA file.
  2. Set the QA variables nvrUsername | nvrPassword | nvrIP – I recommend creating a read-only user on your NVR.

 

How to test if this is working:

  1. Generate some motion that is registered by Unify Protect as a person or vehicle within a smart detection zone or line crossing detection. 
  2. Check the UI for motion history. 
  3. For event geeks subscribe to events #nvrCustomMotionEventStart and #nvrCustomMotionEventEnd containing zone=camera name, score=event score, object type = array [person, vehicle] and etype=’smartDetectZone’ | etype=’smartDetectLine’.

 

Have Fun,

 

MT

Please login or register to see this attachment.

Edited by michalt
spelling
  • Like 3
Posted

This has my attention! I tested a Homessistant integration last week, with almost the same functionality.

 

But ofcourse i would like to use it on my HC3.

 

Aint got much time the coming days, but i will install - test, and report back.

 

Thanks! 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...