Rate-limited device keeps publishing events!

I am working on a project involving TMP102.

In trying to figure out the i2c address, I thought I’d loop through all possible addresses, run a Wire.requestFrom(address) and check if Wire.available came up with anything. Unfortunately, stupid me published the event announcing the address IN the for loop and I got my device rate-limited.

My problem now is that it has been several hours and my photon is still publishing that damn event. Or I should say those events - as I’m well past 60,000 rate-limited publishes.
It is certainly rubbing my stupidity in my face.

I’ve tried searching for a solution online - maybe some way to flush the device of queued events or perform some sort of reset on the photon, but I’ve come up dry. I have unplugged it, flashed other apps, gone into safe mode, etc.

Please help me, if you can. Help this silly girl finish her uni project.
Thank you kindly :slight_smile:

Not quite sure what’s happening. To clarify: you’re still seeing events being published, even though your device is no longer connected?

What’s the current status of your device, and where/how are you checking on the publishes?

I guess I didn’t explain that very well, my apologies. Whenever the device is turned off or in safe mode, the events ceases being published, as one would expect; however, as soon as it is again connected to the network, it resumes publishing the events.

I am looking at the publishes through the online console.

I’m not sure what you mean by ‘status’. the LED cycles between breathing green, then breathing cyan and then fast bursts of cyan roughly the same time an event or a bunch of the events come through.
The diagnostics say the vitals are good other than the rate-limiting.
In an event (spark/device/diagnostics/update) is says status: “ok”.

I would put the device into safe mode, then flash tinker. That will clear your faulty firmware from the device and stop the publishes. After that, you can reflash your firmware after fixing the offending publishes in your loop. If there’s something I’m missing and it’s not that easy, let me know what I’m missing. I re-read your first post and it seems that you tried flashing other firmware… have you tried flashing tinker? Are you sure the other app “took”? You could add a Particle.variable() with a version number so you can be sure that your flash was successful.

1 Like

Safe mode can’t seem to be reached now (and I’m thinking maybe it also didn’t get there earlier - it was a long day). Rather than magenta it flashes green (with a hint of red).

Thanks for suggesting adding a particle - I added some onto a different firmware and it doesn’t seem to show up, suggesting no new firmware is being flashed successfully, tinker included.

Could you take a ~30s video of trying to get into Safe mode, and the various light patterns that follow?

You should always be able to get into Safe Mode, since that’s what it’s for. If there are some networking issues however, safe mode won’t be able to completely connect to the network. A video could help us determine what’s going on.

Alternatively, if you have the CLI installed, you could place the device in DFU mode and try ‘particle flash --usb tinker’.


This is what I was thinking too. DFU mode, flash new firmware, then fix the original and reflash. I don’t use Particle cloud, but it leaves me curious as to why the events keep publishing after a rate limit. What effect does the rate limit have on your firmware?

Thank you so much!! That worked - the events have stopped publishing :smiley: I appreciate your help (and the others’) so very much, thank you.

You’re limited to 1/, with bursts up to 4/s allowed, after that you can’t get more than 1/s.

Glad to hear it’s working again @sarahosse :slight_smile: