Astarte.Device.start_link

You're seeing just the function start_link, go back to Astarte.Device module for more information.
Link to this function

start_link(device_options)

Specs

start_link(opts :: device_options()) :: :gen_statem.start_ret()

Start an Astarte.Device.

Device Options

  • pairing_url - base URL of the Astarte Pairing API instance the device will connect to, e.g. https://astarte.api.example.com/pairing or http://localhost:4003 for a local installation.
  • realm - Realm which the device belongs to.
  • device_id - Device ID of the device. The device ID must be 128-bit long and must be encoded with url-safe base64 without padding. You can generate a random one with :crypto.strong_rand_bytes(16) |> Base.url_encode64(padding: false).
  • credentials_secret - The credentials secret obtained when registering the device using Pairing API (to register a device use Astarte.API.Pairing.Agent.register_device/2 or see https://docs.astarte-platform.org/latest/api/index.html?urls.primaryName=Pairing API#/agent/registerDevice).
  • interface_provider - A tuple {module, args} where module is a module implementing Astarte.Device.InterfaceProvider behaviour and args are the arguments passed to its init function. It's also possible to pass a path containing the JSON interfaces the device will use, and that path will be passed to Astarte.Device.FilesystemInterfaceProvider.
  • credential_storage (optional) - A tuple {module, args} where module is a module implementing Astarte.Device.CredentialStorage behaviour and args are the arguments passed to its init function. If not provided, Astarte.Device.InMemoryStorage will be used.
  • handler (optional) - A tuple {module, args} where module is a module implementing Astarte.Device.Handler behaviour and args are the arguments passed to its init_state function. If not provided, Astarte.Device.DefaultHandler will be used.
  • ignore_ssl_errors (optional) - Defaults to false, if true the device will ignore SSL errors during connection. Useful if you're using the Device to connect to a test instance of Astarte with self signed certificates, it is not recommended to leave this true in production.
  • max_http_redirects (optional) - The maximum number of HTTP redirects that will be followed by the Pairing HTTP client. Defaults to 5.