ThingSpeak Integration: not all fields are being updated

You would still have the same order in which the data comes in from the sensor, so when handling step == 6 you’ve already sent 5 readings to ThingSpeak in just 24 seconds, and the reading for step == 6 is the 6th value in 30 seconds.

Does ThingSpeak document anything on rate-limiting?

If there’s a limit, then I’d assume that even the “empty” fields like for step == 2 and so on, might count against such rate limit. Maybe using return null rather than returning an empty object will make those empty items not being forwarded to ThingSpeak, but I really don’t know. That would then read something like:

  if (step == 2) {
    return null;
  }

You might also be able to shield the device or disable the gateway(s) for the first readings (like shield it for 15 seconds after you see the data for step == 1 coming in, to make a few transmissions not being received).

Also, increasing the SF might make the device use a longer interval between each step. But that’s for testing only; you should not use a high SF if not needed (and you should never use a fixed value of SF11 or SF12); see Fair Use Policy explained.