Skip to content

ESP32 quick start ​

Connect an ESP32 to Autoconnecto over MQTT, see a live reading, then restore shared attributes after a power cycle.

What you need ​

  • An ESP32. That is the board this library has been tested on.
  • Arduino IDE or PlatformIO
  • A free Autoconnecto account at app.autoconnecto.in

Steps ​

  1. In the app, open Devices → create a device → open the device → Reveal the access token once and copy it.
  2. Install AutoconnectoSDK. In Arduino IDE, open Library Manager and search AutoconnectoSDK. In PlatformIO, set lib_deps = autoconnecto/AutoconnectoSDK. You can also clone autoconnecto-sdk.
  3. Open BasicTelemetry_mqtt (first live reading). For shared attributes after reboot, use Attributes_RestoreOnBoot_mqtt. Copy secrets.h.example to secrets.h and set Wi‑Fi SSID, password, and the device token.
  4. Upload the sketch. On Devices, the device should go Active and show telemetry keys.
  5. Create a dashboard, add a Latest value (or Switch / Slider for attributes), and bind the same keys the sketch publishes.

You are done when ​

  • The device shows Active on Devices
  • A dashboard Latest value (or the device page) updates with the sketch keys
  • Optional: a profile alarm fires and mail/Telegram reaches you after you turn notify on under Users and connect Mail and SMS

After a power cycle ​

Call sdk.requestSharedAttributes() on connect. The platform returns stored shared attributes; your onAttributeUpdate handler applies them and you confirm with client attributes. The dashboard stays aligned with the hardware.

Readings and attributes are stored by the platform. You do not add a rule-engine “save” node. Drop is the only way a reading is not stored.

Next ​

support@autoconnecto.in · founder@autoconnecto.in · +91 92121 00555 · app.autoconnecto.in