# How to use ActivitySensor or Videomotion from IoT Camera (ONVIF Integration) for Eventrecording in the MOBOTIX HUB

**URL:** <https://community.mobotix.com/t/how-to-use-activitysensor-or-videomotion-from-iot-camera-onvif-integration-for-eventrecording-in-the-mobotix-hub/3763>\
**Category:** FAQ\
**Tags:** events, iot, recording, mxhub\
**Created:** [March 12, 2021, 8:50am UTC](https://community.mobotix.com/t/how-to-use-activitysensor-or-videomotion-from-iot-camera-onvif-integration-for-eventrecording-in-the-mobotix-hub/3763 "2021-03-12T08:50:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mx-MaikC](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.mobotix.com/mx-maikc/32/1179_2.png) [@Mx-MaikC](https://community.mobotix.com/u/Mx-MaikC)\
**Post date:** [March 12, 2021, 8:50am UTC](https://community.mobotix.com/t/how-to-use-activitysensor-or-videomotion-from-iot-camera-onvif-integration-for-eventrecording-in-the-mobotix-hub/3763/1 "2021-03-12T08:50:04Z")

</div>

In the MxHub, it is possible to trigger recording by the ActivitySensor or Videomotion detector.

The predefined rule can be used in the MxHub for this purpose.

**=\> Default Record on Motion Rule.**

* * *

You must proceed as follows:

_ **1. Create the desired event in the camera.** _

**Setup Menu: Event Overview**

**Image Analysis Event: Click on Edit**

Add a new profile or edit one of the default profiles.

Draw your detection windows in the live image and insert them.

 ![AS](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/6/658c5c446476493582ba8886596cd69fc53447e3.png)

* * *

_ **2. Check that the camera is armed** _

**Setup Menu: General Event Settings**

**Arming: Enabled**

 ![Arming](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/9/9e56ec95cad2e6d115b990cfe947aa3c72aace29.png)

**!!!These two steps must first be performed in the camera!!!**

* * *

_ **Now you can continue editing the camera in the MxHub.** _

_ **1. Select camera in Management Client** _

**→ Servers**

**→ Recording Servers**

**→ Open the menu of your camera and click on the camera itself.**  
 ![Kamera auswählen](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/4/4f68e4951ba690a38249840b5486402990b05a32.png)

* * *

_ **2. Deactivate the motion detection of the MxHub.** _

→ Click **Motion**

**→ Deactivate motion detection**

 ![Motion Detection deaktivieren](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/7/73de7925d12e40afbe5a560fd61119bba5f35844.png)

* * *

_ **3. Make camera events known to the MxHub.** _  
 → Click on **Events**

 ![Events](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/2/27fd14a441a0262e3bc2cbfef9aa91f26d8b4b56.png)

→ Click on **Add**  
 → First select the event : **Motion started (HW)** and click **OK**

 ![Motion started (HW)](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/1/1e738d2b52ab11b0901c75be9dc93e43b94cc454.png)

→ Click on **Add** again and now select **Motion stopped (HW)** and again click on **OK**

 ![Motion stopped(HW)](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/9/98634ba326d431d6daebc45fa37618db00c643be.png)

Now, the MxHub 2 has been made aware of events from the camera and can now react to these events.

 ![Events angelegt](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/6/6758d9dbd276aa8233a9c6ca01ee97f1875de652.png)

* * *

_ **4. Configure rule for motion recording** _

→ Click **Rules and Events** in the ManagementClient  
 → Click on **Rules**  
 ![Rules and Events](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/f/fdddab3c9a48cdf3985e170ec9912180ea60514e.png)

→ Now select the rule: **"Default Record on Motion Rule"**  
 ![Rule Motion](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/a/a7cc6fa1c2fca949ced3146aafe86365ff486afb.png)

→ Right-click on this event and select: **Edit Rule…**

 ![Rule Motion Edit](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/5/50ad2879338b443637f3859d3365a30318372ce8.png)

_=\> By default, the MxHub records when the software motion detection triggers. To make the MxHub record when the camera detects motion, the rule must be modified as follows._

→ Click on under **“Edit the rule description”: Motion Started**  
 → Expand the menu: **Devices → Configurable Events and select “Motion started (HW)”.**

 ![Motion started rule](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/5/588157157437f7cbb8228986e3ccbc0e0968a563.png)

→ If you click on **“All cameras”** , you can decide if the motion detection of the camera should be related to all cameras or only to specific cameras.  
In this case the S74-VaxALPR should trigger.  
 ![Devices and groups](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/6/67bcd0cc256562ef59672ac413f7740cd0eb3932.png)

→ If you now click on **“the device on which event occured”**. You can decide whether only the camera that triggered the event should record or whether other cameras should record if this camera triggered the event.

 ![Auswahl aufzeichnen](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/8/8fa5e81c0b1cb1f7308dc6ebab87623b584bec6f.png)

→ To stop the recording, a termination event is needed. To do this, click on **“Motion Stopped”.**  
 → Open the menu: **Devices → Configurable Events and select “Motion stopped (HW)”**.

![Motion stopped rule](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/5/5dc5f7b53e0a653b1e802e5fa2df25d168df6575.png)

→ If you now click on **“All cameras”** , you can decide whether the motion stop event of the camera should be related to all cameras or only to specific cameras.  
In this case the S74-VaxALPR should stop recording and not all cameras.

 ![Motin Rec Rule finished](https://canada1.discourse-cdn.com/flex030/uploads/mobotix/original/2X/a/a56d2296d9afeb711b7a31379c801bb21452643e.png)

You can now click on **“Stop recording 3 seconds after”** and put another time in this field.  
So when the **Event Motion Stopped(HW)** is triggered the MxHub records 3 more seconds.

So the recording is now triggered by a Motion event of a IoT camera.
