Cayenne / HCSR04 / NODEMCU

Hello,
I am sorry for my English because I am French.
I have a problem with my nodemcu and my temperature sensor with cayenne.
On the console I see my active nodemcu (generic ESP8266) which connects with the connection parameter username, password and clientid.
However I can not connect my HC SR04 cayenne.

My VCC on the nodemcu 3V3
GND on the nodemcu GND
ECHO on the nodemcu D3
TRIGGER on the nodemcu D4

I am totally lost on the code to achieve.

// This example shows how to connect to Cayenne using an Ethernet W5100 shield and send/receive sample data.

//#define CAYENNE_DEBUG
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

char ssid[] = "homewifi";
char wifiPassword[] = "passwordhomewifi ";

int Trigger = 4;
int Echo = 3;

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "code_username_of_cayenne";
char password[] = "code_username_of_cayenne";
char clientID[] = "code_clientid_of_cayenne";

unsigned long lastMillis = 0;

void setup() {
  Serial.begin(9600);
  Cayenne.begin(username, password, clientID, ssid, wifiPassword);
  pinMode(Trigger, OUTPUT);
  pinMode(Echo, INPUT);
  Serial.begin(9600);
  Cayenne.begin(username, password, clientID);
}

void loop() {
  Cayenne.loop();
  long duration, distance;
  digitalWrite(Trigger, LOW);
  delayMicroseconds(2);

  digitalWrite(Trigger, HIGH);
  delayMicroseconds(10);

  digitalWrite(Trigger, LOW);
  duration = pulseIn(Echo, HIGH);
  distance = (duration / 2) / 29.1;

  Serial.print(distance);
  Serial.println("Centimeter:");
  delay(500);
  //Publish data every 10 seconds (10000 milliseconds). Change this value to publish at a different interval.
  if(millis() - lastMillis > 10000) {
    lastMillis = millis();
    //Write data to Cayenne here. This example just sends the current uptime in milliseconds.
    Cayenne.virtualWrite(0, distance);
  }
}

Thank you.

before sending HC-SR04 data to cayenne, are you able to read distance from it without cayenne code?

It’s ok without cayenne code.
I see the distance into the serial monitor on arduino IDE

uncomment this code and check the serial monitor if there is any error.

In addition, here are the lines of the serial monitor.
I think that my HCSR04 sensor is not recognized. It works perfectly well with my arduino MEGA but poses problems with my nodemcu ESP12.
I connected GND to GND
The VCC at 3.3V

TRIGGER at D1 of nodemcu
ECHO at D2 of nodemcu.

I was wondering if the problem did not come from the voltage (3.3v instead of 5V).

Thank you for your help.

[26006] Connected to WiFi
[26007] IP: 192.168.0.3
[26007] Connecting to mqtt.mydevices.com:1883
[53020] Connected
[67594] Publish: topic 4, channel 65534, value NodeMCU, subkey, key
[67595] Publish: topic 6, channel 65534, value Xtensa32, subkey, key
[67611] Publish: topic 7, channel 65534, value 80000000, subkey, key
[67686] Publi [67831] IP: 192.168.0.3
[67831] Connecting to mqtt.mydevices.com:1883
[69301] Connected
[70044] Publish: topic 4, channel 65534, value NodeMCU, subkey, key
[70046] Publish: topic 6, channel 65534, value Xtensa32, subkey, key
[70061] Publish: topic 7, channel 65534, value 80000000, subkey, key
[70136] Publish: topic 5, channel 65534, value 1.2.0, subkey, key
[70208] Publish: topic 8, channel 65534, value ESP8266, subkey, key
0Centimeter:
[72789] Publish: topic 1, channel 0, value 0, subkey, key
0Centimeter:
0Centimeter:
0Centimeter:
[81306] Connection ok
0Centimeter:
[82806] Publish: topic 1, channel 0, value 0, subkey, key
0Centimeter:
0Centimeter:
0Centimeter:
[91324] Connection ok
0Centimeter:
[92824] Publish: topic 1, channel 0, value 0, subkey, key
0Centimeter:
0Centimeter:
0Centimeter:
[101347] Connection ok
0Centimeter:
[102847] Publish: topic 1, channel 0, value 0, subkey, key
0Centimeter:
0Centimeter:
0Centimeter:

try this code. connect VCC to VIN pin of nodemcu.

// This example shows how to connect to Cayenne using an Ethernet W5100 shield and send/receive sample data.

//#define CAYENNE_DEBUG
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

// WiFi network info.
char ssid[] = "xx";
char wifiPassword[] = "xx";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "xxx";
char password[] = "xxx";
char clientID[] = "xxx";

unsigned long lastMillis = 0;

// defines pins numbers

const int trigPin = 2;  //D4
const int echoPin = 0;  //D3

// defines variables
long duration;
int distance;

void setup() {
  Cayenne.begin(username, password, clientID, ssid, wifiPassword);

  pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
  pinMode(echoPin, INPUT); // Sets the echoPin as an Input
  Serial.begin(9600); // Starts the serial communication
}

void loop() {
  Cayenne.loop();

  // Clears the trigPin
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  // Sets the trigPin on HIGH state for 10 micro seconds
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  // Reads the echoPin, returns the sound wave travel time in microseconds
  duration = pulseIn(echoPin, HIGH);

  // Calculating the distance
  distance = duration * 0.034 / 2;
  // Prints the distance on the Serial Monitor
  Serial.print("Distance: ");
  Serial.println(distance);
  delay(500);
  if (millis() - lastMillis > 10000) {
    lastMillis = millis();
    Cayenne.virtualWrite(10, distance);
  }
}

I have this message in compilation :

Arduino : 1.8.5 (Windows 10), Carte : “NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200”

In file included from C:\Users\vcarre\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:21:0,

             from C:\Users\vcarre\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTESP8266.h:27,

             from C:\Users\vcarre\Desktop\Final\final\final.ino:6:

C:\Users\vcarre\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h: In member function ‘void CayenneArduinoMQTTClient::connect()’:

C:\Users\vcarre\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:58:63: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

if (!NetworkConnect(&_network, CAYENNE_DOMAIN, CAYENNE_PORT)) {

                                                           ^

Le croquis utilise 270012 octets (25%) de l’espace de stockage de programmes. Le maximum est de 1044464 octets.
Les variables globales utilisent 34896 octets (42%) de mémoire dynamique, ce qui laisse 47024 octets pour les variables locales. Le maximum est de 81920 octets.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

Ce rapport pourrait être plus détaillé avec
l’option “Afficher les résultats détaillés de la compilation”
activée dans Fichier → Préférences.

select your port correctly.

Thanks shramiksalgaonkar everything is OK now during the compilation and in the monitor serie I return correctly my values as well as on the cayenne interface.
By cons my project is the filling of water tank.
How to make up in the place of the distance a percentage of filling.
Let me explain :
The maximum height of my tank before overflow is 95 cm
When the tank is empty my sensor should display about 95 cm and convert to 0% filling.
When my tank is full my sensor should display about 0 cm and convert me to 100 filling.

Finally, is it possible to cayenne graphically display a gauge in addition to the percentage value?

Many thanks to you for your precious help.

use the below in your code. add a tank widget with channel 13.

int y;
  y = map(distance, 95, 10, 0, 100);
    Cayenne.virtualWrite(13, y, "t1", "null");

this means water is touching your sensor and then :bomb::boom: . so keep it at 10 cm away.

I had to make a mistake. indeed I have the following error:

‘y’ does not name a type

Here is the complete code:

For the sensor and the water level I will leave a margin of error to avoid any risk of contact.

// This example shows how to connect to Cayenne using an Ethernet W5100 shield and send/receive sample data.

//#define CAYENNE_DEBUG
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

// WiFi network info.
char ssid[] = "XXX";
char wifiPassword[] = "XXX";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "XXX";
char password[] = "XXX";
char clientID[] = "XXX";

unsigned long lastMillis = 0;

// defines pins numbers

const int trigPin = 2;  //D4
const int echoPin = 0;  //D3

// defines variables
long duration;
int distance;
int y;
  y = map(distance, 95, 10, 0, 100);

void setup() {
  Cayenne.begin(username, password, clientID, ssid, wifiPassword);

  pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
  pinMode(echoPin, INPUT); // Sets the echoPin as an Input
  Serial.begin(9600); // Starts the serial communication
}

void loop() {
  Cayenne.loop();

  // Clears the trigPin
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  // Sets the trigPin on HIGH state for 10 micro seconds
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  // Reads the echoPin, returns the sound wave travel time in microseconds
  duration = pulseIn(echoPin, HIGH);

  // Calculating the distance
  distance = duration * 0.034 / 2;
  // Prints the distance on the Serial Monitor
  Serial.print("Distance: ");
  Serial.println(distance);
  delay(500);
  if (millis() - lastMillis > 10000) {
    lastMillis = millis();
    Cayenne.virtualWrite(10, distance);
    Cayenne.virtualWrite(13, y, "t1", "null");
  }
}
// This example shows how to connect to Cayenne using an Ethernet W5100 shield and send/receive sample data.

//#define CAYENNE_DEBUG
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

// WiFi network info.
char ssid[] = "XXX";
char wifiPassword[] = "XXX";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "XXX";
char password[] = "XXX";
char clientID[] = "XXX";

unsigned long lastMillis = 0;

// defines pins numbers

const int trigPin = 2;  //D4
const int echoPin = 0;  //D3

// defines variables
long duration;
int distance;
int y;

void setup() {
  Cayenne.begin(username, password, clientID, ssid, wifiPassword);

  pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
  pinMode(echoPin, INPUT); // Sets the echoPin as an Input
  Serial.begin(9600); // Starts the serial communication
}

void loop() {
  Cayenne.loop();

  // Clears the trigPin
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  // Sets the trigPin on HIGH state for 10 micro seconds
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  // Reads the echoPin, returns the sound wave travel time in microseconds
  duration = pulseIn(echoPin, HIGH);

  // Calculating the distance
  distance = duration * 0.034 / 2;
  // Prints the distance on the Serial Monitor
  Serial.print("Distance: ");
  Serial.println(distance);
  y = map(distance, 95, 10, 0, 100);
  y = constrain(y, 0, 100);  
  delay(500);
  if (millis() - lastMillis > 10000) {
    lastMillis = millis();
    Cayenne.virtualWrite(10, distance);
    Cayenne.virtualWrite(13, y, "t1", "null");
  }
}

All is ok thank you again.

I have a question about my water tank management project.

To go in the same direction as your warning of water contact and the sensor I had planned in my assembly to ecapsulate the sensor outside my tank to 10 cm above the water level max a know the height of the overflow.

when my tank is empty then the length measured by the sensor will be 95 cm + my 10 cm of elevation of my sensor.

When my tank is full the measured height will be 0 cm + my 10 cm of elevation of my sensor.

How to integrate in the code this elevation of 10 cm.

Finally the tank icon is fixed I do not see the gauge vary according to the filling of my tank. is this normal?

Again, thank you very much.

to add a gauge, add this and change the choose widget to gauge in the setting.

Cayenne.virtualWrite(14, y, "analog_sensor", "null");

I just tested the gauge but the needle does not move. the values ​​for them are OK. Is this normal?

I would like to add a new sensor HCSR04 to my MCU node how should I proceed in the code?

i have the same code working on my device and all are working fine. i am not sure what error you are facing. can you give more detail and share some screenshot.

new as in 2 HCSR04 connected to nodemcu?

In addition and to explain my problematic here are photos. When my tank is empty or full the gauge does not move but the values ​​are correct.

vide
vide2
plein
plein2

Finally, I would like to add a second distance sensor HCSR04 on my nodemcu.

I cabled the second HCSR04 on the nodemcu on the gpio 5 for the trigger and 4 for echo, the vcc on the VIN and gnd on the gnd

I do not see how to write the code in addition to my first sensor.

do this
asdasd

give it a try. i cant write a code for you. i can help you out with an error you are facing.

Hello,

I forgot the code.
Here is the copy below I have a problem because my distance N ° 2 is 0 and does not move.

// 2 HCSR04 Pour la mesure de hauteur d'eau dans des cuves de 1000 litres.

#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

// WiFi network info.
char ssid[] = "XXX";
char wifiPassword[] = "XXX";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "XXX";
char password[] = "XXX";
char clientID[] = "XXX;

unsigned long lastMillis = 0;
unsigned long lastMillis2 = 0;

// defines pins numbers HCSR04 N°1
const int trigPin = 2;  //D4
const int echoPin = 0;  //D3

// defines pins numbers HCSR04 N°2
const int trigPin2 = 4;  //D2
const int echoPin2 = 5;  //D1


// defines variables HCSR04 N°1
long duration;
int distance;
int y;
// defines variables HCSR04 N°2
long duration2;
int distance2;
int y2;

void setup() {
  Cayenne.begin(username, password, clientID, ssid, wifiPassword);

  pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
  pinMode(echoPin, INPUT); // Sets the echoPin as an Input
  pinMode(trigPin2, OUTPUT); // Sets the trigPin2 as an Output
  pinMode(echoPin2, INPUT); // Sets the echoPin2 as an Input
  Serial.begin(9600); // Starts the serial communication
}

void loop() {
  Cayenne.loop();

//HCSR04 N°1

  // Clears the trigPin
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  // Sets the trigPin on HIGH state for 10 micro seconds
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  // Reads the echoPin, returns the sound wave travel time in microseconds
  duration = pulseIn(echoPin, HIGH);

  // Calculating the distance
  distance = duration * 0.034 / 2;
  // Prints the distance on the Serial Monitor
  Serial.print("Distance: ");
  Serial.println(distance);
  y = map(distance, 95, 10, 0, 100);
  y = constrain(y, 0, 100);  
  delay(5000);
  if (millis() - lastMillis > 10000) {
    lastMillis = millis();
    Cayenne.virtualWrite(10, 105-distance);
    Cayenne.virtualWrite(11, y, "t1", "null");
    Cayenne.virtualWrite(12, y, "analog_sensor", "null");

//HCSR04 N°2

 // Clears the trigPin N°2
  digitalWrite(trigPin2, LOW);
  delayMicroseconds(2);

  // Sets the trigPin N°2 on HIGH state for 10 micro seconds
  digitalWrite(trigPin2, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin2, LOW);

  // Reads the echoPin N°2, returns the sound wave travel time in microseconds
  duration2 = pulseIn(echoPin2, HIGH);

  // Calculating the distance N°2
  distance2 = duration2 * 0.034 / 2;
   // Prints the distance N°2 on the Serial Monitor
  Serial.print("Distance2: ");
  Serial.println(distance2);
  y2 = map(distance2, 95, 10, 0, 100);
  y2 = constrain(y2, 0, 100);  
  delay(5000);
  if (millis() - lastMillis2 > 10000) {
    lastMillis2 = millis();
    Cayenne.virtualWrite(20, 105-distance2);
    Cayenne.virtualWrite(21, y2, "t1", "null");
    Cayenne.virtualWrite(22, y2, "analog_sensor", "null");


    
  }
}
}

here are the results the two sensors are at the same distance yet there is a difference of result
The sensor 1 seems ok but the results of the 2 are not correct.

For the gauge all is oK

Distance: 167
[1580194] Publish: topic 1, channel 10, value -62, subkey , key
[1580196] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1580204] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 131
[1585304] Publish: topic 1, channel 20, value -26, subkey , key
[1585306] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1585313] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1586403] Connection ok
Distance: 10
[1591405] Publish: topic 1, channel 10, value 95, subkey , key
[1591406] Publish: topic 1, channel 11, value 100, subkey null, key t1
[1591415] Publish: topic 1, channel 12, value 100, subkey null, key analog_sensor
Distance2: 1
[1596516] Publish: topic 1, channel 20, value 104, subkey , key
[1596517] Publish: topic 1, channel 21, value 100, subkey null, key t1
[1596527] Publish: topic 1, channel 22, value 100, subkey null, key analog_sensor
[1597618] Connection ok
Distance: 167
[1602629] Publish: topic 1, channel 10, value -62, subkey , key
[1602631] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1602639] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 132
[1607739] Publish: topic 1, channel 20, value -27, subkey , key
[1607741] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1607749] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1608838] Connection ok
Distance: 168
[1613849] Publish: topic 1, channel 10, value -63, subkey , key
[1613851] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1613859] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 130
[1618959] Publish: topic 1, channel 20, value -25, subkey , key
[1618961] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1618968] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1620058] Connection ok
Distance: 167
[1625069] Publish: topic 1, channel 10, value -62, subkey , key
[1625071] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1625079] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 129
[1630179] Publish: topic 1, channel 20, value -24, subkey , key
[1630181] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1630188] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1631279] Connection ok
Distance: 167
[1636289] Publish: topic 1, channel 10, value -62, subkey , key
[1636291] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1636299] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 130
[1641399] Publish: topic 1, channel 20, value -25, subkey , key
[1641401] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1641409] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1642499] Connection ok
Distance: 167
[1647510] Publish: topic 1, channel 10, value -62, subkey , key
[1647512] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1647519] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 129
[1652620] Publish: topic 1, channel 20, value -24, subkey , key
[1652622] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1652629] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1653718] Connection ok
Distance: 167
[1658729] Publish: topic 1, channel 10, value -62, subkey , key
[1658731] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1658739] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 132
[1663839] Publish: topic 1, channel 20, value -27, subkey , key
[1663841] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1663849] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1664937] Connection ok
Distance: 167
[1669948] Publish: topic 1, channel 10, value -62, subkey , key
[1669950] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1669958] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 128
[1675058] Publish: topic 1, channel 20, value -23, subkey , key
[1675060] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1675068] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1676156] Connection ok
Distance: 167
[1681167] Publish: topic 1, channel 10, value -62, subkey , key
[1681169] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1681176] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 129
[1686277] Publish: topic 1, channel 20, value -24, subkey , key
[1686278] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1686286] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1687375] Connection ok
Distance: 169
[1692386] Publish: topic 1, channel 10, value -64, subkey , key
[1692388] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1692396] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 131
[1697496] Publish: topic 1, channel 20, value -26, subkey , key
[1697498] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1697506] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1698595] Connection ok
Distance: 183
[1703607] Publish: topic 1, channel 10, value -78, subkey , key
[1703608] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1703616] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 167
[1708717] Publish: topic 1, channel 20, value -62, subkey , key
[1708718] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1708726] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1709816] Connection ok
Distance: 167
[1714827] Publish: topic 1, channel 10, value -62, subkey , key
[1714829] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1714837] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 132
[1719937] Publish: topic 1, channel 20, value -27, subkey , key
[1719939] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1719946] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1721038] Connection ok
Distance: 168
[1726050] Publish: topic 1, channel 10, value -63, subkey , key
[1726051] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1726059] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 151
[1731160] Publish: topic 1, channel 20, value -46, subkey , key
[1731162] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1731169] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1732260] Connection ok
Distance: 168
[1737271] Publish: topic 1, channel 10, value -63, subkey , key
[1737273] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1737281] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 131
[1742381] Publish: topic 1, channel 20, value -26, subkey , key
[1742383] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1742390] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1743480] Connection ok
Distance: 168
[1748491] Publish: topic 1, channel 10, value -63, subkey , key
[1748493] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1748501] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 130
[1753601] Publish: topic 1, channel 20, value -25, subkey , key
[1753603] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1753610] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1754699] Connection ok
Distance: 167
[1759710] Publish: topic 1, channel 10, value -62, subkey , key
[1759712] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1759720] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 159
[1764820] Publish: topic 1, channel 20, value -54, subkey , key
[1764821] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1764830] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1765918] Connection ok
Distance: 168
[1770929] Publish: topic 1, channel 10, value -63, subkey , key
[1770930] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1770938] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 167
[1776038] Publish: topic 1, channel 20, value -62, subkey , key
[1776040] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1776048] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1777138] Connection ok
Distance: 167
[1782149] Publish: topic 1, channel 10, value -62, subkey , key
[1782150] Publish: topic 1, channel 11, value 0, subkey null, key t1
[1782158] Publish: topic 1, channel 12, value 0, subkey null, key analog_sensor
Distance2: 132
[1787259] Publish: topic 1, channel 20, value -27, subkey , key
[1787260] Publish: topic 1, channel 21, value 0, subkey null, key t1
[1787268] Publish: topic 1, channel 22, value 0, subkey null, key analog_sensor
[1788360] Connection ok
Distance: 167