Particle boron and xenon issue

Hi guys, have been struggling to pass light level data through xenon via mesh to the boron and onto the web hook. It’s finally pushing data but the id is that of the boron and not xenon. Has anyone experienced the same? Thanks

Hi there, according to the docs the method meshPublishToUbidots() receives as argument the device label to use to publish your dots. You may use it as follows:

#include "Ubidots.h"

/****************************************
 * Define Instances and Constants
 ****************************************/

#ifndef UBIDOTS_TOKEN
#define UBIDOTS_TOKEN "..."  // Put here your Ubidots TOKEN
#endif

char* _default_device_label;

Ubidots ubidots(UBIDOTS_TOKEN, UBI_INDUSTRIAL, UBI_MESH);
//Ubidots ubidots(UBIDOTS_TOKEN, UBI_EDUCATIONAL, UBI_MESH); Replace the above line if you're an Ubidots for Education user.

/****************************************
 * Auxiliar Functions
 ****************************************/

// Put here your auxiliar functions

/****************************************
 * Main Functions
 ****************************************/

void setup() {
  Serial.begin(115200);
  String particle_id_str = System.deviceID();
  _default_device_label = new char[particle_id_str.length() + 1];
  sprintf(_default_device_label, "%s", particle_id_str.c_str());
  // ubidots.setDebug(true);  // Uncomment this line for printing debug messages
}

void loop() {

    float value = analogRead(A0);
    ubidots.add("variable-label", value);
    ubidots.meshPublishToUbidots(_default_device_label);
}

Keep in mind that if you are using Particle Webhooks to send data from your gateway, the device label will be the one that you set in your webhook endpoint. If this is the case, the best for you will be to use ubifunctions to replace dynamically your device label.

All the best

Hi Jose

Many thanks for the prompt reply.

My set up is 17 sensors sending data to the cloud via 8 Xenons and a Boron gateway. Having thought about it for a while, if the data arrives as 17 seperate variables then that would be ideal.

My concern was that there will be 3 different temp, humidity & gas readings which will need to be separated. How will Ubidots differentiate between them if they are not using the Particle ID?

Thanks