title: Device integration using MQTT
body: <p>Hello I am new to cumulocity and need help for the following scenarios </p>
  
  <ol>
  <li>I am trying to create a child device with following code:</li>
  </ol>
  
  <pre><code>public static void main(String[] args) {
  
          final MqttConnectOptions connOpts = new MqttConnectOptions();
          connOpts.setUserName(TENANT + "/" + USERNAME);
          connOpts.setPassword(PASSWORD.toCharArray());
  
          final MqttClient client;
  
          try {
              client = new MqttClient(SERVERURL, CLIENTID, null);
              client.connect(connOpts);
  
              client.publish("s/us", ("100," + DEVICE_NAME + ",c8y_MQTTDevice").getBytes(), 2, false);
  
              // set device's hardware information
              client.publish("s/us", "110,101010203,MQTT test model,Rev0.1".getBytes(), 2, false);
              //create Child device
              client.publish("s/us", ("101, 9999,ivelin13, c8y_MQTTChildDevice").getBytes(), 2, false);
  } catch (
          MqttException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>The above code creates child device but i want to set it- hardware information. The template for that operation is </p>
  
  <blockquote>
    <p>110,serialNumber,hardwareModel,revision</p>
  </blockquote>
  
  <p>But i could not find how to set hardware information on the current child device. Maybe i have to select that child device- but i don't know how?</p>
  
  <ol start="2">
  <li>Also i want to sent temperature measurement to the current child device. How do I select a child device?</li>
  </ol>
  
  <p>Thanks in advance</p>