title: IoT Raspberry Pi Sensor Tag
body: <p>I am trying build a IoT small application, using IBM Bluemix platform. I found a video of Ryan J Baxter's on connecting a Sensor Tag to the IoT Cloud Foundation with a Beagle-bone. Now I'm trying the same procedure with a Raspberry Pi device instead of a Beagle-Bone, facing some issues with the <code>sensor-tag.js</code> file we are not able to get the cfg parameter values like <code>cfg type</code>, <code>cfg org</code>, <code>cfg id</code> from <code>config.properties</code> file.</p>
  
  <p>I got the mac address which I gave when I'm registering the device I gave my Raspberry Pi mac address as it is connected to my Ethernet <code>eth0</code>.  </p>
  
  <pre><code>    if(cfg.id != deviceId) {
          console.warn('The device MAC address does not match the ID in the configuration file.');
      }
      //------------- This is where I'm facing  a problem --------
  
      var clientId = ['d', cfg.org, cfg.type, cfg.id].join(':');
  
      var client = mqtt.connect("mqtts://" + cfg.org + 
        '.messaging.internetofthings.ibmcloud.com:8883', 
        {
          "clientId" : clientId,
          "keepalive" : 30,
          "username" : "use-token-auth",
          "password" : cfg['auth-token']
        });
      client.on('connect', function() {
        console.log('MQTT client connected to IBM IoT Cloud.');
      });
      client.on('error', function(err) {
        console.log('client error' + err);
        process.exit(1);
      });
      client.on('close', function() {
        console.log('client closed');
        process.exit(1);
      });
      monitorSensorTag(client);
    });
  });
  
  function monitorSensorTag(client) {
    console.log('Make sure the Sensor Tag is on!');
  </code></pre>