Hi,
In the SIM section of a device, is it possible to have a table/history of the bytes used updates?
Much like the session/events… So you can track usage vs time for example.
Thanks,
Neil
Hi,
In the SIM section of a device, is it possible to have a table/history of the bytes used updates?
Much like the session/events… So you can track usage vs time for example.
Thanks,
Neil
Hi @ndavey,
Currently that data is not available in Notehub (however, I’ll add it as a request in our engineering team backlog!). Not sure if this will help you, but the card.usage
APIs can help you to actively monitor/measure data usage (see this doc for more info).
Thanks,
Rob
Hi @RobLauer ,
Thanks, on the Notehub side I thought it might be another handy piece of data along with the bits that are currently there. After posting this I did come across card.usage API, useful on the device side/during development… Using it to push usage back outbound seemed not ideal but usable…
Thanks,
Neil
Which is the more true value? Bytes used in NoteHub or card.usage?
Bytes used in Notehub is greater than card.usage (x2).
Does card.usage not include connection overhead?
Hi @ndavey,
Great question. In short, card.usage
will always be the most accurate, while the values you see in Notehub are more of an approximation.
The reason is because the values from card.usage
are derived from the Notecard “asking” the cellular modem (every time the modem powers down) how many bytes were sent over the cellular network. Notehub, on the other hand, can only approximate this number by looking at the bytes transferred at a higher level (TCP/TLS). The numbers you see in Notehub under Device → SIM is updated nightly via a process that asks the cellular carrier how much data has been used for that particular SIM.
Hope that helps!
Rob
Thank @RobLauer,
Interesting…
I’ll do some better data collection, because my card.usage value is like 1/2 of what the sim usage says.
I had been running this (hub.get) for a couple of days, just idle (no notes activity):
{
“unsecure”: true,
“mode”: “continuous”,
“host”: “a.notefile.net”,
“product”: “######”,
“device”: “####”,
“sync”: true,
“inbound”: 60,
“outbound”: 60
}
Did a card.restart today, and card.usage hadn’t changed much, but SIM usage went up ~95KB from one day to the next.
Tonight I’v just added (hub.set):
“duration”: 1440
And over the next few days I’ll better track and record the data (SIM vs card.usage)…
Neil
Yes, please update with your findings here. As mentioned, card.usage
should be the most accurate, while there can be significant lag in the usage data you see in Notehub (depending on when we’re able to download the latest usage statistics from the cellular provider).
So I’ve been doing some testing over the last month. I’ve recorded sim usage form Notehub, card events from hub and card.usage bytes/notes/session values from the card. I’ve also adjusted some hub.set values over this time (also recorded). The NoteCard has been sitting idle, no active usage. NoteCard is NOTE-NBGL-500 running firmware 3.2.1.13982
Plotted up, this is what it looks like:
{
“unsecure”: true,
“mode”: “continuous”,
“sync”: true,
“inbound”: 60,
“outbound”: 60,
“duration”: 1440
}
Then changing inbound, outbound and duration values, with the last roughly 2 weeks running this:
{
“unsecure”: true,
“mode”: “continuous”,
“sync”: true,
“inbound”: 1440,
“outbound”: 1440,
“duration”: 10080
}
So it seems card.usage is reporting a lower value than SIM usage…
Regards
Neil
Hi @ndavey,
Thanks for following up on this. While we look into any possible issues on our end, can you please clarify how you got the “Hub (kb)” number? Is that from checking “bytes used” in Notehub every day for this particular device?
Thanks,
Rob
Hi @RobLauer,
Yes, Hub (kb) is “bytes used” from the SIM tab for the device.
The data for a day were all recorded within a few minutes of each other (eg refresh hub, do card.usage) I have the excel if useful.
Regards
Neil