How to unset an argument of a Card Request

Solved: It turns out that setting these integers described below to -1 in fact “unsets” them.

However, unsetting card.location.track hours: -1 it does not honor card.location.mode seconds, but instead writes and sync continously. The question remains: Can one send gps data every at < 1hr intervals, when no motion is detected?

How do you unset the “hours” argument in “card.location.track”?
I would like data file written at the same interval as the “card.location.mode” argument “seconds”.

I am using {"req": "card.location.track", "start": true, "heartbeat": true, "sync": true} and because I’ve previously used {"req": "card.location.track", "start": true, "heartbeat": true, "sync": true, "hours": 1} I can not unset “hours”. In the example below, I’d like the output from card.location.track to be 10 min.


> {"req": "card.location.mode", "mode": "periodic", "seconds": 600}
 "seconds": 600,
 "mode": "periodic"
> {"req": "card.location.track", "start": true, "heartbeat": true, "sync": true}
 "start": true,
 "minutes": 60,
 "heartbeat": true,
 "sync": true

Let me add here that, as an example, I would like to send latitude and longitude every 10 min, whether or not there is motion detected.

There is a general question here: How to unset any argument? For instance, how would one unset inbound and outbound in the following output?

> {"req": "hub.get"}
 "mode": "periodic",
 "host": "",
 "product": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 "device": "dev:xxxxxxxxxx69623",
 "inbound": 7,
 "outbound": 12
1 Like

Hi @johnedstone,

You’re correct that resetting a numeric argument requires a -1 (likewise resetting a string-based argument requires "-".

I don’t believe it’s possible to set the heartbeat to anything less than 1 hour. I can talk to our firmware team and submit a feature request though!


Thanks for getting back to me.
Actually we don’t need to submit a “feature request”.
I was just trying to understand the documentation.

I think that it should be documented that when heartbeat is set, then one must set hours and not leave it unset. And, I think that it should be noted that the heartbeat timing does not fallback to the card.location.mode seconds argument. Does this make sense?

1 Like

Note: some of my configuration notes for this type of scenario can be found at this github link.

That makes perfect sense, thanks for following up. We will get the docs updated this week.


1 Like