Missing Data from Cloud Bridge to AWS

Questions about the Waspmote v15 and its modules
Post Reply
samkosky
Posts: 2
Joined: Sun Oct 20, 2019 10:12 am
Company: Transport Canberra

Missing Data from Cloud Bridge to AWS

Post by samkosky » Mon Oct 21, 2019 12:46 pm

Hi guys,

We have deployed 2 sensor kits - Smart Cities Pro and Smart Security. Both are using the Telit LE910-AU 4G module and I have used this example to send data from our P&S devices to Cloud Bridge. These are the frames we are sending for our Smart Cities module (excerpt from loop() function);

Code: Select all

  // set identifier
  frame.setID("Node01");
  
  // Create new frame
  frame.createFrame(BINARY);

  // switch on BME sensor
  // read temperature, humidity and pressure
  // switch off BME sensor
  bme.ON();
  frame.addSensor(SENSOR_CITIES_PRO_TC, bme.getTemperature());
  frame.addSensor(SENSOR_CITIES_PRO_HUM, bme.getHumidity());
  frame.addSensor(SENSOR_CITIES_PRO_PRES, bme.getPressure());
  bme.OFF();

  // switch on luxes sensor
  // read luminosity
  // switch off luxes sensor
  luxes.ON();
  frame.addSensor(SENSOR_CITIES_PRO_LUXES, luxes.getLuminosity());
  luxes.OFF();

  // Read the ultrasound sensor
  ultrasound.ON();
  frame.addSensor(SENSOR_CITIES_PRO_US, ultrasound.getDistance());
  ultrasound.OFF();

  // Turn on the particle matter sensor
  OPC_status = PM.ON();
  if (OPC_status == 1)
  {
    USB.println(F("Particle sensor started"));
  }
  else
  {
    USB.println(F("Error starting the particle sensor"));
  }

  // Get measurement from the particle matter sensor
  if (OPC_status == 1)
  {
    // Power the fan and the laser and perform a measure of 5 seconds
    OPC_measure = PM.getPM(5000, 5000);
  }

  PM.OFF();

  // check answer
  if (OPC_measure == 1)
  {
    frame.addSensor(SENSOR_CITIES_PRO_PM1, PM._PM1);
    frame.addSensor(SENSOR_CITIES_PRO_PM2_5, PM._PM2_5);
    frame.addSensor(SENSOR_CITIES_PRO_PM10, PM._PM10);
  }
  else
  {
    USB.print(F("SOCKET_D -- > Error performing the measure. Error code : "));
    USB.println(OPC_measure, DEC);
  }

  // set GPS on
  GPS.ON();

  USB.println(F("\n----------------------"));
  USB.println(F("GPS waiting for signal..."));
  USB.println(F("----------------------"));

  gps_status = GPS.waitForSignal(GPS_TIMEOUT);

  if(gps_status == true)
  {
    GPS.getLatitude();
    GPS.getLongitude();
    frame.addSensor(SENSOR_GPS, GPS.convert2Degrees(GPS.latitude, GPS.NS_indicator), GPS.convert2Degrees(GPS.longitude, GPS.EW_indicator));
  }
  else
  {
    USB.println(F("\n----------------------"));
    USB.println(F("GPS TIMEOUT. NOT connected"));
    USB.println(F("----------------------"));
  }

  frame.addSensor(SENSOR_BAT, PWR.getBatteryLevel());

  frame.showFrame();

  GPS.OFF();
  error = _4G.ON();

  if (error == 0)
  {
    USB.println(F("- 4G module ready..."));

    ////////////////////////////////////////////////
    // Send data
    ////////////////////////////////////////////////
    sendFrame();
  }
  else
  {
    // Problem with the communication with the 4G module
    USB.println(F("- 4G module not started"));
  }

  USB.println(F("- Switch OFF 4G module"));
  _4G.OFF();
We receive a "200 OK" response from Cloud Bridge, with no additional errors being output to USB. The logs in Cloud Bridge display;

Code: Select all

 [2019-10-21 06:50:09] - START Connector [] []
 INFO [2019-10-21 06:50:09] - Connector: Amazon [] []
 INFO [2019-10-21 06:50:09] - Preparing for syncing [] []
 INFO [2019-10-21 06:50:09] - Preparing connector [] []
 INFO [2019-10-21 06:50:09] - Public Key stored properly [] []
 INFO [2019-10-21 06:50:09] - Private Key stored properly [] []
 INFO [2019-10-21 06:50:09] - Certificate stored properly [] []
 INFO [2019-10-21 06:50:09] - Sending values: Start [] []
 INFO [2019-10-21 06:50:10] - Syncing: Forde - Smart Security (#585XXXXXXXXX) [] []
 INFO [2019-10-21 06:50:11] - {"message":"OK","traceId":"16d637a1-e15c-4ee8-96a2-0f95372d6ceb"} [] []
 INFO [2019-10-21 06:50:11] - {"message":"OK","traceId":"f9a1c9f6-f6d3-149d-4a4c-a2bd66a97e01"} [] []
 INFO [2019-10-21 06:50:11] - {"message":"OK","traceId":"c602f360-d8fd-dda0-f32e-504595958442"} [] []
 INFO [2019-10-21 06:50:12] - {"message":"OK","traceId":"1243d62d-0c53-9411-7263-91edcf2b9e5c"} [] []
 INFO [2019-10-21 06:50:12] - {"message":"OK","traceId":"5c98996a-813b-4464-f8aa-28f46f371f85"} [] []
 INFO [2019-10-21 06:50:12] - {"message":"OK","traceId":"9e322ba4-1c77-2dd4-cd14-a2da0d552af1"} [] []
 INFO [2019-10-21 06:50:13] - {"message":"OK","traceId":"0582eb05-1785-9440-ca5d-270d676ec1a7"} [] []
 INFO [2019-10-21 06:50:13] - {"message":"OK","traceId":"86b55647-c89b-d37d-9261-ec02b0694592"} [] []
 INFO [2019-10-21 06:50:13] - Sending values: End [] []
 INFO [2019-10-21 06:50:13] - Post syncing Start [] []
 INFO [2019-10-21 06:50:13] - Closing connection [] []
 INFO [2019-10-21 06:50:13] - Post syncing End [] []
 INFO [2019-10-21 06:50:13] - TOTAL Synced values = 8 [] []
 INFO [2019-10-21 06:50:13] - END Connector [] []
 
So Cloud Bridge appears to be processing the data correctly. However, when I look at the raw events that are coming through in AWS;

Code: Select all

{
    "id": 8409759,
    "device_id": 393,
    "device_serial": "585CXXXXXXXXXX",
    "device_name": "Smart Security",
    "device_type": "Plug & Sense!",
    "gateway_id": 0,
    "gateway_serial": "libelium_bridge",
    "gateway_name": "Libelium Bridge Gateway",
    "gateway_type": "libelium_bridge",
    "variable": "HALL",
    "variable_name": "Hall effect",
    "units": "Open/Closed",
    "ts": "2019-10-21T06:34:17+00:00"
},
{
    "id": 8409761,
    "device_id": 393,
    "device_serial": "585CXXXXXXXXXX",
    "device_name": "Smart Security",
    "device_type": "Plug & Sense!",
    "gateway_id": 0,
    "gateway_serial": "libelium_bridge",
    "gateway_name": "Libelium Bridge Gateway",
    "gateway_type": "libelium_bridge",
    "variable": "TC",
    "variable_name": "BME - Temperature Celsius",
    "units": "ºC",
    "ts": "2019-10-21T06:34:17+00:00"
}
You will notice that all fields are flowing through, except for the most important field - the actual value of the sensor!

So my issues that I need to resolve are;
  • How do I inspect what frames/packets are being sent to AWS? The documentation states that I should be able to use the "Monitor Data" link under "More Actions" - this does not exist.
  • How do I get the value of each sensor flowing through to AWS??

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Missing Data from Cloud Bridge to AWS

Post by libelium-dev » Tue Oct 22, 2019 8:51 am

Hi,

Thanks for the detailed explanations. Our colleagues are going to check what could be the problem. We will let you know as soon as possible.

Regards

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Missing Data from Cloud Bridge to AWS

Post by libelium-dev » Tue Oct 22, 2019 9:43 am

Hi,

"Monitor Data" is a new feature that will be available in the coming hours.

We have solved an issue in the Bridge. You should be able to receive sensors values now.

Apologies for the inconvenience.

Regards

samkosky
Posts: 2
Joined: Sun Oct 20, 2019 10:12 am
Company: Transport Canberra

Re: Missing Data from Cloud Bridge to AWS

Post by samkosky » Thu Oct 24, 2019 2:18 am

Hi guys,

I can confirm the "value" field is now flowing through to AWS.

Looking forward to the "Monitor Data" feature too so we can get full visibility of the data flow :)

Thanks for your help!

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Missing Data from Cloud Bridge to AWS

Post by libelium-dev » Thu Oct 24, 2019 11:56 am

Hi,

The Monitor Data feature is already available. If you don't visualize it, please try to refresh the website (CTLR + F5).

Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest