Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
app-notes:ein-mqtt-server-fuer-iot-telemetry-sensoren [2023/11/09 15:04]
gray [4.1 The first visualization under Grafana]
app-notes:ein-mqtt-server-fuer-iot-telemetry-sensoren [2024/03/21 14:40] (current)
gray [2.1 Collect telemetry data with the help of SDK scripts]
Line 66: Line 66:
  ​if(DEBUG) printf("​%s\n",​ MESSAGE);  ​if(DEBUG) printf("​%s\n",​ MESSAGE);
     /* publish the message to mqtt broker Temperature */     /* publish the message to mqtt broker Temperature */
- ret = nb_mqtt_publish(HOST,​ PORT, USERNAME, PASSWORD, TOPIC, QOS, RETAIN, MESSAGE);+ ret = nb_mqtt_publish(HOST,​ PORT, USERNAME, PASSWORD, TOPIC, QOS, RETAIN, MESSAGE);;
  if (ret<0){  if (ret<0){
    ​nb_syslog("​Failed to publish mqtt message"​);​    ​nb_syslog("​Failed to publish mqtt message"​);​
Line 90: Line 90:
  ​if(DEBUG) printf("​%s\n",​ MESSAGE4);  ​if(DEBUG) printf("​%s\n",​ MESSAGE4);
     /* publish the message to mqtt broker Sys */     /* publish the message to mqtt broker Sys */
- ret = nb_mqtt_publish(HOST,​ PORT, USERNAME, PASSWORD, TOPIC, QOS, RETAIN, MESSAGE4);+ ret = nb_mqtt_publish(HOST,​ PORT, USERNAME, PASSWORD, TOPIC, QOS, RETAIN, MESSAGE4); ​
  if (ret<0){  if (ret<0){
    ​nb_syslog("​Failed to publish mqtt message"​);​    ​nb_syslog("​Failed to publish mqtt message"​);​
Line 530: Line 530:
 From now on you have access to the data that is already in the database and that will be added over time. From now on you have access to the data that is already in the database and that will be added over time.
  
-Which measurements have been deposited in the database: 
- 
-<​konsole>​ 
-:~ $ influx 
-Connected to http://​localhost:​8086 version 1.8.10 
-InfluxDB shell version: 1.8.10 
-:> use Shelly 
-Using database Shelly 
-:> show series 
-key 
---- 
-power,​location=shellyplug-s-C8C9A3B8E8C6 
-rh,​location=shelly-08b61fcf3380 
-tC,​location=shelly-08b61fcf3380 
-tC,​location=shellydw2-73BBC6 
-tC,​location=shellyflood-244CAB430495 
-temperatur,​location=shellyplug-s-80646F81A273 
-temperatur,​location=shellyplug-s-80646F81AD26 
-temperatur,​location=shellyplug-s-80646F81F06B 
-temperatur,​location=shellyplug-s-C8C9A3A4DE17 
-value,​location=shellydw2-73BBC6 
-value,​location=shellyflood-244CAB430495 
-voltage,​location=shellydw2-73BBC6 
-voltage,​location=shellyflood-244CAB430495 
-</​konsole>​ 
  
 ==== - The first visualization under Grafana ==== ==== - The first visualization under Grafana ====