Support Home Portal Log in
Open navigation

Door and Gate Movement Detection with the Yabby/Oyster2

One application of interest for battery powered devices are door open/close alerts. To track things like unauthorised access to a room, building or container (perhaps with precious cargo inside). In such applications, where there is no available power source, we require a battery powered device. 

This article covers our options, along with a real-world example of using a Yabby Wi-Fi, and an Oyster2 to track the open/closing of a gate. 

Open/Close Detection Options

Falcon + Reed Switch

While this article mainly covers detecting a door being open and closed via accelerometer activity, this is an imperfect solution (even though it can be made to work very reliably). We should not look past the option of using a reed switch (magnetic switch) connected to one of the digital inputs on a Falcon. This option has the following pros/cons


  1. Open/close detection is very reliable. The contacts must move apart/together (rather than just the door/gate shaking about) to register a change
  2. We can detect multiple open/close events in a short space of time (even multiple per second if we really wanted to!)


  1. Extra components required 
  2. Slightly more complex installation (we also need to attach the reed switch)
  3. Perhaps less simple (we might use the Yabby for 95% of our other applications and just want to keep it consistent)

Accelerometer Activity on the Yabby or Oyster2

Our battery powered devices feature Jostle Mode Tracking - where accelerometer activity is used to detect trips/movement. So when accelerometer activity is detected, a trip is started and we can set the device to upload for an alert. Then once it has sat still for a while (timeout configurable) - the trip will end. 

So for our purposes we are saying a trip start = movement (opening) of the door. This is not 100% foolproof, so there are some considerations. 

  • Install is super simple, see images below
  • We need to be careful with how we choose our accelerometer wakeup parameters (i.e. how much movement causes a trip start) - to avoid missing a door open/close event, or generating false ones
  • The device is only looking at accelerometer activity, so for example if a sea container is loaded onto a truck - it looks the same as door open/closed.
  • We can't distinguish definitively between open/closed - just movement of the door
  • We can't detect multiple events <60s -60 sec is the minimum trip end timeout configurable.

This may sound like instructions to avoid this setup! But it is not the case, just things to be aware of. For example sea containers are an excellent example of a what this would work for. Perhaps they sit in the yard for long periods, and we just need an alert if anyone opens the door. The container would sit very still, so as not to prevent false alerts - and we'd get an alert if there was unauthorised entry, and can action it. We wouldn't be able to say the door was opened and closed exactly 50 times - but perhaps this isn't necessary information. 

Movement Detection and logging after hours access


First we have to look at how to attach the Yabby and the positioning factors that come into play. If you're trying to monitor movement on an interior door that hasn't got a good view of the sky for GPS positioning, you should look at the Yabby WiFi. 

The way the Yabby WiFi detects movement is with the inbuilt 3-axis accelerometer. The configuration of how much movement that is needed to classify movement as 'valid' and start a trip is available in the system parameters in OEM Server. The considerations to look at when configuring the Yabby are:

  1. The sensitivity needed for the Yabby to decide the door has been opened or is being used
  2. If the door is used during the day, do you need different after-hours configuration?
  3. The length of time the door is moving about for when it's opened
  4. Will you need an alert on a sharp sudden movement, or a gradual swing, or even a series of swings?

There are two main levels when using the accelerometer to detect door/gate movement, You can disable the wake filter to make even the slightest bump will wake the device up, or you can configure the wake filter to measure a certain type of movement.

For the first option - for any tiny movement to make the Yabby upload, we want to have upload on movement detection and Disable Wake filter set to Yes. I've disabled logging and uploading during trip off because I'm only interested if the door is moved at all, rather than monitoring usage after the door is opened. You can see in the movement tab as well that the trip is set to end once 60 seconds of no movement has elapsed. If you're installing a device on a doorway that is used for x minutes at a time, you could set the end trip to slightly longer than this to reduce multiple alerts. (Co-incidentally, my Siberian Husky 'Hygge' take around 3 and a half minutes to wander around my backyard at 3am in the morning.)

On the Yabby, you can adjust the accelerometer settings to configure what level or movements will start a trip. The wake-up threshold is the force of the movement and the wake-up count is how long it persists for.

These settings come into play with what your use case is, if you have a gate that gets bumped by the wind on it's latch normally, but you want to know when it's opened you can set the wake-up count to be higher to filter out the short jostles.

By the same token you can set the wake-up threshold higher so you only want to the asset to upload when a strong bump is identified for either a long or short period as determined by the count.

After Hours Settings

If you wanted to have high resolution reporting after hours, you can set up a second set of movement detection parameters which the Yabby will use once it moves into the declared time period. The settings in this tab are the same as the standard movement detection. Adaptions you could make are:

  1. No logging or uploads on movement detection during 9am - 5pm, but uploads on movement detection between 5pm and 9am
  2. Enable wake filter during 9am - 5pm to only detect larger movements and disable to detect slight jostles after hours.

Oyster2 Accelerometer Settings

The Oyster2 has not only the same Accelerometer settings tab as the Yabby where you can adjust the wake-up threshold and count, but also an advanced wake-up filter tab, where you can really dial down the wake filter settings. Think of the wake filter as an initial gateway which qualifies whether a movement is classified as valid or not.


When the accelerometer initially detects movement, it will sample for a set time for further, ongoing movement. by default, 25% of the samples taken over this period have to meet or exceed the Wake-up Threshold force declare in the Accelerometer Settings Tab before the device declares a trip has started.

If a device senses there has been movement that has not met these thresholds it will reduce the activity threshold by one step until it reaches zero, then it will automatically start a trip on the next jostle detected. If the device has not detected movement for the period of time declared in Reset Delay, it will re-increment the Activity Threshold towards the initial value.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.