Skip to main content
Provisioning gives a device its Wi-Fi credentials and identity (device ID and user). The library persists these in Preferences, so it only happens once; on later boots the device connects automatically.

What begin() does

When you call device.begin(), the library:
  1. Tries to connect with saved Wi-Fi credentials
  2. Starts AP-mode if nothing is configured
  3. Sets up DNS + an HTTP provisioning page
  4. Initializes the realtime connection
  5. Loads deviceid, ssid, email, productid, and versionid from storage
  6. Registers default and user-provided command handlers

AP-mode provisioning (first boot)

If the device has no saved credentials, it starts its own Wi-Fi access point and serves a setup page: Connect to that network, open the provisioning page, and enter Wi-Fi + device details. The device saves them and restarts, connecting automatically from then on.

Manual provisioning

To set credentials from code instead of the AP page:
Helpers to inspect and reset stored credentials:

Reading identity at runtime

Next: API reference

Every method you can call on the device.