To enroll a Thing Device to your Linux gateway, perform the following steps:
In this example, we enroll a temperature sensor device.
Prerequisites
You must have created a Thing device template.
Procedure
- Log in to your gateway and change the directory to /opt/vmware/liota/data/packages.
- To enroll the Thing device, run:
python3 liotad/liotapkg.py enroll-device <ThingTemplateName> <NameOfThingDevice>
python3 liotad/liotapkg.py enroll-device LightBulbTemplate LightBulb001
- Alternatively, you can enroll a Thing device using the reg.py file:
- Navigate to the Packages folder and open the device package in a text editor.
- Replace the
deviceName
with your device name.
deviceName = "TemperatureSensor001"
- Replace
TemperatureSensorTemplate
with your device template name.
d = PulseConnectedDevice(device_name, "TemperatureSensor", self.iotcc_edge_system.reg_entity_id)
- Save and close the file.
- Navigate to cd /opt/vmware/liota/data/package and run:
python3 reg.py temperature_sensor
Results
The Thing device is enrolled and connected to your Liota Linux gateway.
What to do next
Run commands on your enrolled Thing device.