Cell+wifi sync misses

I have a cell+wifi notecard that is set to periodic sync with a new note every 60 minutes with sync:True when I add the note. I’ve notice that sometimes the notecard does not send the notes every hour and instead 2 notes will get sent at the same time when the next 60 minute window occurs. Is this expected? Service is 2 bars

Hi @bkauf,

If you’re using ”sync”:true in your note.add request, Notecard should immediately sync that data, regardless of the outbound cadence you set up. Now, if there are any connectivity issues whatsoever during that sync, it will keep the Note stored locally and then sync it up on the next scheduled periodic sync. I’m guessing that’s what happened here.

Rob

Thanks @RobLauer ! Is there an easy way to check if there are any pending notes and retry them? Or a retry timer I can set on the notecard for any queued notes ?

Hi @bkauf,

Yes, you can use the note.changes API to check for any Notefiles that are still pending syncing. For example, the first request below shows a Notefile that is pending, the second shows a request where there is nothing pending.

(However, this is effectively the point of the periodic syncing, that you don’t need to explicitly retry in code. Just let Notecard do the work for you!)

> {"req":"note.changes","file":"sat.qo"}
{
 "notes": {
  "VY4213": {
   "body": {
    "format": 3,
    "port": 14,
    "template_body": "{\"temp\":14.1,\"humidity\":14.1,\"pressure\":14.1,\"status\":\"x\"}",
    "storage": "file:data/sat-qo.000"
   },
   "payload": "c25hcHB5JGdYAGcAzcxEQWZmNkLNzJ1CV2xhanNkZmsJBwhsa2EBDhUHRGphc2RsamZza2xhZGpmYWxrcwEHEGtsc2pkLiUABGRzCTIobGtmamFzZGxramY="
  }
 }
}


> {"req":"note.changes","file":"sat2.qo"}
{}

Thanks Rob, I’m a bit confused as to the point of the wifi/cell card if this is the default behavior. If wifi failed for instance shouldn’t the note be retried automatically over cellular?

Hi @bkauf,

Yes that is how it should work. However, there can certainly be a delay if the Notecard cannot access its known Wi-Fi AP and then has to switch over to cellular (it’s not instantaneous). It would be helpful to see a trace log of the behavior you’re seeing so we can properly diagnose the issue though.

Rob

Is there any way to get this trace remotely? The Notecard in question is already deployed to a remote location. It seems there is a pattern for signaling misses in notehub, would be great to have more debug info for wifi there as I’m a bit blind other than seeing the wifi network show up as one of many in the wifiAccessPoints object

“channel”: 1, “macAddress”: “xxxx”, “signalStrength”: -76, “ssid”: “xxxx”, “time”: