OTA Updates

System.updatesEnabled()

System.updatesEnabled, updatesEnabled

// System.updatesEnabled() example
bool isSafeToUpdate() {
  return true;
}

void loop() {
  if (!isSafeToUpdate() && System.updatesEnabled()) {
      Particle.publish("error", "Updates are enabled but the device is not safe to update.");
  }
}

Determine if firmware updates are presently enabled or disabled for this device.

Returns true on startup, and after System.enableUpdates() has been called. Returns false after System.disableUpdates() has been called.

Version Self service customers Standard Product Enterprise Product
Device OS < 1.2.0 Supported Supported Supported
Device OS >= 1.2.0 Supported Supported Supported