Electron using ridiculous amount of data. Ideas? [SOLVED]

I’m resurrecting a project we were doing in the spring where the Electron got wet and we had to get a new one and fix some hardware. I left the new setup running in the lab for a week to make sure it was stable before deploying, and found it’s using 1 MB of data per day!
It wakes up every ten minutes from deep sleep and publishes 3 numbers… It certainly should not be using this much data.
I can see the data being published it otherwise is working fine.
What could cause this high data usage? Ideas?
Thanks,
-Ken

It's hard to come up with good ideas without seeing your code.

1 Like

@codeandcircuit, to add to @Ric’s comment, every time you put the Electron in deep sleep and it wakes, it will renegotiate the connection with the carrier, taking several KB of data. You should look into other sleep modes that allow you to maintain that connection and eliminating the overhead when waking.

Thanks for the info peekay123. Several kb * every ten minutes would definitely add up to what I’m seeing… but I wonder what has changed since the spring where I did not remember seeing us go over bandwidth.
I think I may have been in some kind of promotional period for the SIM? This seems likely.

When waking every 23 minutes or less you can use

  System.sleep(SLEEP_MODE_DEEP, timeout, SLEEP_NETWORK_STANDBY);

This way you can circumvent the renegotiation on each wake.
Also - if you don’t already do that - pull your three values together into one event and publish only once.

2 Likes

Thank you so much! I looks like I really need to upgrade the firmware too. It's only showing 0.4.8. According to the docs:

Prior to 0.6.0, when the device was reset or woken from deep sleep, the cloud connection would be fully reinitialized, which meant resending the 4400 bytes of data.

I must have upgraded the Electron that went swimming but this one has old firmware.
-Ken

1 Like

@codeandcircuit, note that in the deep sleep mode described by @ScruffR, the modem is kept ON and so the power consumption will be higher than in deep sleep with the modem OFF.

1 Like

SOLVED: Make sure your particle electron is on the latest firmware (or at least > 0.6) before using deep sleep.

Prior to 0.6.0, when the device was reset or woken from deep sleep, the cloud connection would be fully reinitialized, which meant resending the 4400 bytes of data.

1 Like

The latest firmware automated the deep sleep process for shutting down the cellular modem correctly, before that you had to add some to make sure it happened which may have caused your extra data usage.