You can enroll your Liota gateway and its connected Things such as light bulbs and sensors using the Token-based enrollment method.
- Ensure that you have created a Liota gateway template with Token-Based as the enrollment provider type, and have connected Thing templates to it.
- Ensure that you install Liota and VMware Pulse IoTC Agent in the /opt/vmware/ folder of your gateway.
- From the VMware Pulse IoT Center UI, go to Inventory > Devices.
The Devices - All Devices page is displayed.
- Click REGISTER.
The Register Gateway wizard is displayed.
- Enter your gateway name and select the Liota device template that has Token-Based Authentication enabled to associate with your gateway.
- Click REGISTER.
Your gateway is registered and is listed in the Devices - All Devices page.
- Create a credential to enroll your gateway. From the Devices -All Devices page, click the gateway that you have registered.
- Click the Actions drop-down menu and select Create Gateway Credentials. Click CREATE.
- Copy the token to the clipboard.
The token expiry time that you set when creating the template is displayed.
- Log in to your gateway and change the directory to /opt/vmware/liota/data/packages.
- Open the pulse_edge_system.py file and edit the property-based enrollment properties. Run the command: vi pulse_edge_system.py.
- Under #token, enter the gateway template name, Thing device template name, and paste the token value.
- To enroll your Liota gateway, run:
./liotad/liotapkg.py enroll <token>
- You must receive the following output:
Device ID: <device-ID> Device enrolled successfully.
Your Liota gateway is enrolled successfully. Verify that the status of your gateway is displayed as ENROLLED in the VMware Pulse IoT Center console. Also verify that the properties and metrics are populated.
What to do next
Enroll a Thing device to your Liota gateway.