This section lists the steps to onboard your gateway to VMware Pulse IoT Center using Liota.

Prerequisites

Note: Ensure that the properties that you provide when enrolling your gateway are secure.

Procedure

  1. Copy the general_edge_system.py and iotcc_v2_gateway.py packages from the examples/pulsev2 folder in the Liota installation folder to the /usr/lib/liota/packages/ directory.
  2. Modify the gateway name in the general_edge_system.py package:
    class PackageClass(LiotaPackage):
         def run(self, registry):
    	    from liota.entities.edge_systems.general_edge_system import GeneralEdgeSystem
    	    import socket
    
               # Set the name of the gateway
               edge_system = GeneralEdgeSystem("Gateway001")
               registry.register("edge_system", edge_system)
        def clean_up(self)
    	  pass
  3. Load the packages using the following command:
    cd /usr/lib/liota/packages
    sha1sum iotcc_v2_gateway.py (# Use this command to get the SHA1SUM.)
    liotad/liotapkg.sh load iotcc_v2_gateway "SHA1SUM" (# Use SHA1SUM from the previous command.)
    

Results

The gateway is onboarded to Vmware Pulse IoT Center. If the gateway is already onboarded, it loads the instance to Liota.

What to do next

Collect metrics: A sample package temperature_sensor.py is available in the examples/pulsev2 folder. Update the callback function to collect the metrics.