All examples

Message rate and size limits

Published: Updated:

MakerHex runs on a shared server. If one device's buggy code sent hundreds of messages a second and there were no limits, everyone else's data would be delayed. So the number and size of messages each device can send is limited by your plan. The limits are enforced on the server; changing a setting in the panel does not remove them.

Limits per plan

Plan Messages per device History logging interval
Free 1 every 30 seconds at most 1 every 30 seconds
Trial (first 14 days, Pro) 1 per second at most 1 per second
Maker 1 every 5 seconds at most 1 every 5 seconds
Pro 1 per second at most 1 per second
Ultimate 1 per second at most 1 per second
  • One message = one publish. If you send all readings as one JSON to the .../data topic, temperature, humidity and light together count as one message. If you publish each variable to its own topic, each one is a separate message and you reach the limit much faster.
  • Short bursts are allowed. Each device has an allowance of 5 messages. A few messages in a row when the device reconnects, or when it reports its state after a command, are fine. The average rate should stay within your plan.
  • A message can be at most 4 KB. Larger messages are not processed. If a device sends a packet over 16 KB, the MQTT server drops its connection. A normal reading is 100–300 bytes.
  • History logging: The live value and alarm checks update on every accepted message. History (charts, reports) is written no more often than your plan's interval for each variable.

What happens when a device goes over the limit?

  1. Extra messages are rejected. They are not saved, not shown and do not trigger alarms. The device's other messages keep working as usual.
  2. Warning: If 20 of a device's messages are rejected within 10 minutes, a yellow warning appears in the device list and at the top of the panel. The workspace admin gets an email the first time this happens that day.
  3. MQTT access turned off: A device that gets 3 warnings within an hour has its MQTT permission turned off automatically. It can still connect but cannot send data or receive commands. A red warning appears in the panel and the admin gets an email.
  4. Workspace suspended: If the problem continues in the same workspace, the support team can suspend the account. Device messages of a suspended account are not processed and users cannot sign in. This step is not automatic; the support team decides.

Access was turned off. What should I do?

  1. Fix the device code: match the send interval to your plan, send all readings in one JSON, keep messages small.
  2. Upload the fixed code to the device.
  3. In the panel, open the device from Devices and click Turn access back on. The workspace admin sees this button.
  4. If the device goes over the limit again, it is turned off again. A device turned off 3 times in the last 24 hours can only be turned back on by the support team.

Writing your code within the limit

Use millis() instead of delay() for waiting, and set the send interval for your plan:

// Wait between two sends (milliseconds).
// Free: 30000, Maker: 5000, Trial / Pro / Ultimate: 1000
const unsigned long SEND_INTERVAL_MS = 30000;
unsigned long lastSend = 0;  // when we last sent

void loop() {
  mqtt.loop();  // keep the connection alive, read incoming commands (every pass)

  // millis(): milliseconds since the board started.
  // Subtracting the last send time from now gives the time that has passed.
  if (millis() - lastSend >= SEND_INTERVAL_MS) {
    lastSend = millis();  // remember now as the last send time

    // Send all readings in one message: {"temperature":24.6,"humidity":61.0}
    String json = String("{\"temperature\":") + t + ",\"humidity\":" + h + "}";
    mqtt.publish(TOPIC_DATA, json.c_str());
  }
}

delay() stops the board completely: while it waits, the connection cannot be kept alive and commands from the dashboard are not heard. With millis() the board keeps running and only checks "is it time yet?".

Common mistakes:

  • Calling publish in loop() without any wait. That is hundreds of messages a second, and access is turned off within minutes.
  • Publishing each variable to its own topic. On the Free plan, six variables sent separately every 30 seconds is six times the limit.
  • Retrying the connection non-stop when it drops. Retry every 5 seconds.
  • Sending a reading when the sensor fails (NaN). Skip values that could not be read.

If you have AI write your code, the MakerHex system information text on Write MakerHex code with AI includes all of these rules.

Command limit from the panel

Sending commands from the panel to a device (LED, relay, pump) is also limited: about 1 command per second per device (up to 5 in a row) and 60 commands per minute per workspace. When you hit the limit, the panel asks you to wait a moment and try again.

On a hold (jog) button and on direction keys set to hold, every press is two commands: one value when pressed, another when released. If you press very quickly many times in a row, the "release" command can hit the limit; the panel automatically resends it within a few seconds, so stopping may be delayed but is not lost. Still, use a watchdog timeout in your device code: if no command arrives for a while, the device should put itself into a safe state.

MakerHex must not be used for life-critical or safety-critical control. Commands and readings can be delayed or lost depending on network conditions.

Related examples

Try it with your own device: start free, 14 days of Pro features included, no credit card.

Start free