Use notehub API to enable/disable notecard motion and geofence (without an MCU)

Hi All,

I would very much like to know how to use the notehub API to enable/disable a single notecard’s motion detection and/or geofence…and do it without an MCU. Just the notehub talking to the notecard. I think this would be very valuable. If this isn’t currently possible…let’s upvote this!

1 Like

Hey @PostThis, thanks for the question! The behavior you described isn’t currently supported, but this is a great feature request and we’ll log it for future consideration. If others would find this useful, chime in here and let us know!

1 Like

Hey guys yes I came on looking for a similar option - it’d be great if it were possible to avoid the extra power draw and cost of an external device for use cases similar to this, e.g.

  • Configure two outbound GPS reporting periods - eg once per hour (either the single latest fix or X latest) when not moving, then once per 10 minutes when movement is detected

As a slightly broader point too (apologies if I’ve missed this somewhere), I was wondering if it were worth making the configuration parser slightly smarter, for example to be able to have simple conditionals - based on board state such as accelerometer movement, or time of day, or battery voltage etc - to allow for auto switching between different configured modes

This would cover the example above if the accelerometer state could be thresholded and used to trigger transition to a different GPS reporting state

I was actually going to ask too (sorry again if this is in the docs - I can’t seem to find it explicitly mentioned anywhere) if we can develop the firmware ourselves - perhaps even if there is just part of the firmware accessible for users, ie excluding sensitive parts like the cellular control/encryption/whatever. I was going to have a crack at the above but can’t find anything on actually developing and compiling ourselves

Thanks and apologies in advance for daisy-chaining all these thoughts :slight_smile:

1 Like

Regarding the above the notecard already has this feature, though not exactly as you describe.
GPS is very power hungry - a single GPS fix consumes the same amount of power as multiple days of standby operation, and ,surprisingly, a GPS fix consumes more power than transmitting that fix to Notehub.

Therefore if there is no motion (as measured by the accelerometer) the Notecard assumes it has remained in place and does not turn on the GPS. Periodic reporting of this type (I’m still here) is referred to as the heartbeat and is enabled using card.location.track:

https://dev.blues.io/reference/notecard-api/card-requests/#card-location-track

The configuration shown below will capture and sync GPS once every 10 minutes when there is motion, and will send a heartbeat once per hour when no motion is detected.

{"req":"card.location.mode","seconds":600,"mode":"periodic"}
{"req":"card.location.track","start":true,"hours":1,"heartbeat":true,"sync":true}

Oh, good one - thanks Sean. Somehow I’d missed the fact that configuration is persistent across restarts. Thanks for the reply, that’s great