Provisioning customer devices

Hello, i’m fairly new to Losant. I’m working on a project where customers can purchased devices online and then connect them to the Losant cloud. My question is, whats the best way to provision devices at the customer site? i.e. Customers will need to join their WiFi before it can connect to Losant. Once they’re connected, they will join the nested experience groups so they can have access to all their devices provisioned.

Thanks,

Steve

@Steve_Ermish,

Hi, and this is a great question. This blog post is a little out of date, but the concept and approach are the same:

Essentially, your device would need to send some sort of identifier to a Experience Endpoint. You can then decide what to do with that identifier from within the workflow.

In the blog article, the device sends in a serial number. The workflow looks to see if there are any devices tagged with that serial number. If not, create the Losant device and it’s access key/secret, and send those items back to the device. The expectation is that the device can now store those credentials locally to be used for future connections.

Hi and thanks for the reply. That is helpful and I see value in both the self-registration as well as the experience registration where the end-user is typing in a serial number within their login to register the device. My question more specifically is about getting the device connected to a network before its even registered. So if a customer unboxes the consumer device with the embedded IoT device lets say an ESP32, what is the best practice for the customer to put their WiFi credentials into the device to get it connected and then go through the registration process?

I realize now that I’m thinking this through that this may be more of a device question than a Losant platform question. But I have to imagine Losant customers having run into this issue before.

@Steve_Ermish,

You’re exactly right. This is more of a device thing than a Losant thing. However! After some quick research, I did find this for you:

It seems to be a nice library for the ESP32 that has all of this built right in. I haven’t used this before, but it seems like a possible tool.

Generally, the process is different based on the device/requirements. However, for this reason, we see cellular being a popular option because you can just avoid this entire process.

In terms of WiFi, the flow is the same as what you see in consumer devices. The device itself will expose a WiFi network the user must connect to. Then, through an app or a website, the user inputs the credentials of the network to be stored locally on the device.