Appearance
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
- In the app, open Devices → create a device → open the device → Reveal the access token once and copy it.
- Install AutoconnectoSDK. In Arduino IDE, open Library Manager and search AutoconnectoSDK. In PlatformIO, set
lib_deps = autoconnecto/AutoconnectoSDK. You can also clone autoconnecto-sdk. - Open
BasicTelemetry_mqtt(first live reading). For shared attributes after reboot, useAttributes_RestoreOnBoot_mqtt. Copysecrets.h.exampletosecrets.hand set Wi‑Fi SSID, password, and the device token. - Upload the sketch. On Devices, the device should go Active and show telemetry keys.
- 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
- Joining the strongest access point on a mesh
- Device connectivity — ports, topics, HTTPS
- Telemetry and attributes
- OTA updates
- Marketing: ESP32 MQTT
