To explain that we might need to know more about your code.
Could you share it?
There are other things that also consume data. So for example does every disconnect/reconnect to the cell towers cost up to 6KB.
Also whether you’re using a Particle or a 3rd party SIM makes a difference.
Server-side webhooks usage is not included in your data consumption. For more information, we have a full explanation of cellular data usage in our documentation, here:
This might be a dangerous one, since this will have each and every event of every device in the Particle world that starts with "D" trigger your handler!
Subscribe sets a prefix filter.
This could well explain your excessive data consumption!
To test this theory, just put a Serial.print() or any other feedback you like into the handler to see how often it gets triggered.
You should at least use
Particle.subscribe("D", myHandler, MY_DEVICES);
And as noted before, your Cellular.off() and System.sleep(SLEEP_MODE_DEEP, 1800) will consume 6K on reconnect.
You should rather keep the radio powered (aka noCellular.off()) and use System.sleep(SLEEP_MODE_DEEP, 1800, SLEEP_NETWORK_STANDBY) (providing you've already upgraded to 0.6.0-rc.2).
And finally - just for completness - your FTP transfer will eat into your data quota too.
BTW, I've not followed the frequency of your EEPROM writes, but keep flash wear in mind when doing lots of write cycles.
Particle.subscribe can will be problem then we have a lot of device, yes. Now we have only one. And there is no another way to see that cloud get our publish as i understand. (from another my topic just reading of feedback from publish func not working)
6K for reconnect is clear
FTP - it is just implemented and not using for now in programm
ther is not so much writings to EEPROM, 2 per hour will be.
But issue still open, where i can see exactly how much traffuc for witch data or handshaking was counting?
(i mean i give from my application to you firmware 512 bytes per 1 hour, you firmware send somthink to you cloud and you counting traffic … need to know for what? thanks for understanding)
And this one System.sleep(SLEEP_MODE_DEEP, 1800, SLEEP_NETWORK_STANDBY working only in 0.6.0-rc.2? And in this case when i wake up (disconnect/reconnect to the cell towers will be 0Kb) because it must not connecting to then network att all. ?
Another question with 0.5.2 (as i use now) i make Cellular.off then going deep sleep then wake up in SEMI_AUTOMATIC and not execute func Cellular.on(), why i spend 6Kb, in SEMI_AUTOMATIC it say that not connected to cloud (without my command) … i miss somethink here? (how can i doing not connected to cell and not spend 6Kb each time on firmware 0.5.2?)
(i wake 48 time in 1 hour - look like spend 300kb for nothink that is look like reason… In one day i will spend 7Mb (without any useful data transmission)
I read through your code but didn't really get into the actual code flow how often and under what circumstances you do perform a cell connect.
But if you really don't connect on wake, you won't see any data usage, but if you would reconnect you'd have to know that before the previous sleep, since once you have disconnected you'll inevitably use 6K on reconnect.
That's up to you to estimate how often you'll actually reconnect and which of the two scenarios will cost least.
No guarantees given. One other thing you need to keep an eye on is the keepAlive time for the connection, which is 23min with Particle SIM. Sleeping longer than that will invalidate the connection and you'll see reconnect costs again.
But there are already several threads duscussing Electron sleep data usage in more detail.
To preserve data you can use this with 0.5.2
System.sleep(WKP, RISING, 900, SLEEP_NETWORK_STANDBY); // wake every 15min for keep alive.
And don't call Cellular.off() or Particle.disconnect().
BTW, how does this work out?
1800sec sleep would be waking twice per hour not 48 times
with this code how much traffic will be for day? 0Kb or not, if not then how much (how much time board will be reconnect to cell mult on 6Kb as i understand(if it will)?
Thanks Moors7… bigest problem look like Data Usage Handshake, In realy not clear if i wake up for second from deep_sleep to mesure 1 analog data and save to EEPROM What for i need connect to Cell… Must be posibility Off Gsm modem at all if it not needed.