Global Driver Setup for Edge

Is there a clean way to setup “global” configs for all devices associated with a driver? For example, I want to be able to manually enter an IP address and auth token for another hub/bridge before entering device discovery. This would let me discover devices on that other hub/bridge. In the past, I could have made a SmartApp to setup this sort of info before creating instances of the device. Where does that go now with Edge?

I have seen @TAustin handle this in a few of his drivers by creating a single bootstrap device by default on discovery, and then you can use that to create further devices.

Ideally, I would like to be able to create an entry in the devices menu that walks the user through device setup rather than “scanning” for it. Setup would include:

  1. Enter IP address of your bridge
  2. Pair to your bridge or enter an auth token (depending on model)
  3. Import devices associated with that bridge

To provide a custom onboarding page for the user to enter data, you can use a SmartApp connector.

Another option, if you’re using an OAuth flow, is the ST Schema Connector where you can integrate a discoveryCallback which allows you to discover devices on-demand.

Note: Take into consideration that those devices won’t run locally because it’s a Cloud-to-Cloud integration.

Up to now, a custom onboarding process is not available in Edge, you need to discover the device first, and then, you could handle other actions (like creating new devices) after that.
But you have to check if the function has a warning on its usage, for example call_with_delay.

@TAustin has helped others with similar implementations, you could pick up his brain.

2 Likes