1

I have two sensors which are getting read one after one. At first I read sensor 1, safe the data to SD Card and send it to Thingsboard via GSM / GPRS. Then I read sensor 2 and do the same. To differ between the sensors I name them 1 and 2 as value which I also safe and send in front of the "string".

My problem is that I receive all this in thingsboard but I dont know how to set a filter which allows data of sensor 1 to dashboard one and data of sensor 2 to dashboard two.

And also I have to send all the data in series. Can I send multiple data at once?

Code snippet:

 Serial.println("Sending Sensor Number...");
 tb.sendTelemetryInt("Sensor", Sensor_Number); //gets defined before reading the sensor


  Serial.println("Sending UL1...");
  tb.sendTelemetryInt("UL1", UL1);
  Serial.println("Sending UL2...");
  tb.sendTelemetryInt("UL2", UL2);
  Serial.println("Sending UL2...");
  tb.sendTelemetryInt("UL3", UL3);


  Serial.println("Sending IL1...");
  tb.sendTelemetryInt("IL1", IL1);
  Serial.println("Sending IL2...");
  tb.sendTelemetryInt("IL2", IL2);
  Serial.println("Sending IL3...");
  tb.sendTelemetryInt("IL3", IL3);
KnuKnu
  • 11
  • 1

1 Answers1

0

You could use the .sendTelemetryJson(const char* json) function.

Peter Csala
  • 17,736
  • 16
  • 35
  • 75
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 01 '22 at 06:55