You can enroll multiple Modbus devices by specifying the IP address range to scan for Modbus devices.


Ensure that you have:
  • Created a Liota gateway template on VMware Pulse IoT Center.
  • Enrolled a gateway using the Liota gateway template.
  • Created a Thing template to enroll the Modbus Thing devices.


  1. Copy the Liota packages from the installer location to the packages folder in your gateway. Run the following command:
    root@photon-machine [ /opt/vmware/liota/data/packages ]# cp ~/mirrors_github_liota/example/pulsev2/* .
    The Liota packages are copied to the packages folder in your gateway.
  2. Edit the package:
    root@photon-machine [ /opt/vmware/liota/data/packages ]# vi
  3. The package contains definitions for collecting metrics and for running commands.
    1. Configure the following parameters:
      Parameter Description
      device_props Specify the IP address range in a particular port for Modbus to scan for devices. For example,
      device_props = {"start-ip-range": "", "end-ip-range": "",
                                  "port": "502"}
      d Enter the device template name that you have created on VMware Pulse IoT Center. For example,
      d = PulseConnectedDevice(device_name, "HumiditySensorTemplate",
      metricName The name of the metric that is collected in VMware Pulse IoT Center. Ensure that you provide the same metric name and value type when creating a Thing template. For example,
      metricName = "Humidity"
      args To configure your humidity sensor device to send metrics to VMware Pulse IoT Center, update the entity type to InputRegister and specify the value type as float 32. The following entity types are available:
      • Coil
      • DiscreteInput
      • HoldingRegister
      • InputRegister
      For example,
      args = [self.reg_device.reg_entity_id,
                              {"entity": "InputRegister",
                               "address": 1, "type": "float32"}]
      d_metric Define the type of metric that is sent to VMware Pulse IoT Center. For example:
      d_metric = Metric(
      client_id The ID for sending the commands. For example,
      client_id = "com.liota.modbus"
      interval The time interval in seconds to check for the commands. For example,
  4. After configuring the package, register it by running the following command:
    root@photon-machine [ /opt/vmware/liota/data/packages ]# python3 modbus_discovery


All Modbus devices that are available within the specified IP address range are enrolled to VMware Pulse IoT Center and are listed in the Inventory > Devices page. The Metrics tab of each device publishes the metrics every 10 seconds.