Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungLarge AI Labs Face Regulatory Capture Allegations(21.09.2026 um 05:18 Uhr)
Sichere ProgrammierungWhat people are building with Jev: a look through nine awesome lists(21.09.2026 um 05:44 Uhr)
IT Security Toolsnetwatch v0.32.3(21.09.2026 um 04:36 Uhr)
Sichere ProgrammierungLarge AI Labs Face Regulatory Capture Allegations(21.09.2026 um 05:18 Uhr)
Sichere ProgrammierungWhat people are building with Jev: a look through nine awesome lists(21.09.2026 um 05:44 Uhr)
IT Security Toolsnetwatch v0.32.3(21.09.2026 um 04:36 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How to Send ESP32 Sensor Data to Miniviz for Real-time Visualization(Miniviz #1)

Reagiere als Erste:r — dein Feedback zählt!

What is Miniviz?

Miniviz is a BI platform developed for individuals to accelerate IoT PoC (Proof of Concept). It enables you to easily achieve data transmission, storage, visualization, and notifications all in one place.

The main features are:

  • Database functionality
  • Graph/chart functionality
  • External alert functionality

https://miniviz.net/

What We'll Build

In this tutorial, we'll create a sample project that sends data from a temperature and humidity sensor and creates graphs to visualize the data.

What You'll Need

  • ESP32
  • USB cable (for data transfer)
  • Temperature and humidity sensor (DHT11 or similar)
  • Jumper wires
  • Breadboard (optional)

Steps

  1. Set up ESP32 development environment (PlatformIO)
  2. Connect sensor and implement source code (read temperature/humidity and send data)
  3. Verify data transmission, create graphs, and set up notifications

1. ESP32 Development Environment Setup (PlatformIO)

We'll set up the ESP32 development environment using PlatformIO as a VS Code extension.

  1. Download and install PlatformIO IDE
  2. It's recommended to install it as a Visual Studio Code extension
  3. Launch Visual Studio Code and verify that the PlatformIO extension is enabled
  4. Create a new project
  • Select "New Project" from the PlatformIO home screen
  • Enter a project name (e.g., esp32-miniviz)
  • Select "ESP32 Dev Module" as the board
  • Select "Arduino" as the framework

Example platformio.ini File

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
lib_deps = adafruit/DHT sensor library@^1.4.6
monitor_speed = 115200

Adding the DHT Library

The DHT sensor library for temperature and humidity sensors is imported in the configuration above.

2. Sensor Connection and Source Code Implementation

Sensor Connection

Connect a temperature and humidity sensor like DHT11 to the ESP32.

DHT11 Connection Example:

DHT11              ESP32
------             ----------------
(1) VCC  --------> 3.3V
(2) DATA --------> GPIO4
(3) NC   --------> -
(4) GND  --------> GND

Wiring Example

Here's a visual reference (apologies for the image quality):

Running the Data Transmission Sample

We'll create ESP32 code to send data to the Miniviz API.

The source code is provided at the end of this article.

Getting Project ID and Token

Create a Miniviz account -> Create a project -> Get your project ID and token

For more details, check the Quick Start Guide

Source Code Implementation and Build

Write the following content in the src/main.cpp file (replace PROJECT_ID and TOKEN with your actual values).

Build and upload the code. Verify in the serial monitor that the POST request is successful.

The sample code is provided at the end of this article.

3. Verify Data Transmission and Create Graphs

Verify Data Transmission

Open the Database in the sidebar, and you should see the parsed data displayed.

Create Graphs

  • Create a graph from the Visualize menu
  • Select a graph type (line chart is recommended)
  • Select temperature and humidity as data sources
  • Verify that the graph displays correctly

Get Notifications via Slack and Email!

Miniviz also has an external alert feature, so you can set up notifications as needed!

Source Code

The transmission interval is set to 90 seconds.

#include <Arduino.h>
#include <DHT.h>
#include <WiFi.h>
#include <HTTPClient.h>

//----------------------------------------
// Configuration
//----------------------------------------
const int PIN_DHT = 4;
DHT dht(PIN_DHT, DHT11);

const char *ssid = "WIFI_SSID";
const char *password = "WIFI_PASSWORD";

// Miniviz API
const char *project_id = "MINIVIZ_PROJECT_ID";
const char *token = "MINIVIZ_API_TOKEN";

String endpoint = String("https://api.miniviz.net/api/project/") +
                  project_id + "?token=" + token;

// Deep Sleep (90 seconds)
const uint64_t SLEEP_INTERVAL_US = 90ULL * 1000000ULL;


//----------------------------------------
// Wi-Fi Connection
//----------------------------------------
void connectWiFi()
{
  Serial.println("Connecting to Wi-Fi...");
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);

  int retry = 0;
  while (WiFi.status() != WL_CONNECTED && retry < 30) {
    delay(300);
    Serial.print(".");
    retry++;
  }
  Serial.println();

  if (WiFi.status() == WL_CONNECTED) {
    Serial.println("Wi-Fi connected");
  } else {
    Serial.println("Wi-Fi connection failed");
  }
}

//----------------------------------------
// NTP Time Synchronization
//----------------------------------------
void syncTime()
{
  Serial.println("Syncing NTP...");
  configTime(0, 0, "ntp.nict.jp", "time.google.com");

  struct tm timeinfo;
  while (!getLocalTime(&timeinfo)) {
    delay(200);
    Serial.print("*");
  }
  Serial.println("\nTime synced");
}

//----------------------------------------
// UNIX Timestamp in Milliseconds
//----------------------------------------
uint64_t getTimestampMs()
{
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (uint64_t)tv.tv_sec * 1000ULL + (tv.tv_usec / 1000ULL);
}

//----------------------------------------
// POST to Miniviz
//----------------------------------------
void sendToMiniviz(float temp, float humid)
{
  if (WiFi.status() != WL_CONNECTED)
    connectWiFi();

  HTTPClient http;
  http.begin(endpoint);
  http.addHeader("Content-Type", "application/json");

  uint64_t ts = getTimestampMs();

  String body = "{";
  body += "\"timestamp\":" + String(ts) + ",";
  body += "\"label_key\":\"esp32_home\",";
  body += "\"payload\":{";
  body += "\"temperature\":" + String(temp) + ",";
  body += "\"humidity\":" + String(humid);
  body += "}}";

  int code = http.POST(body);
  Serial.println("HTTP code: " + String(code));
  Serial.println(http.getString());
  http.end();
}

//----------------------------------------
// Setup
//----------------------------------------
void setup()
{
  Serial.begin(115200);
  delay(200);

  dht.begin();
  connectWiFi();
  syncTime();
}

//----------------------------------------
// Loop (exits after one iteration due to DeepSleep)
//----------------------------------------
void loop()
{
  float t = dht.readTemperature();
  float h = dht.readHumidity();

  Serial.printf("Temperature: %.2f°C  Humidity: %.2f%%\n", t, h);

  sendToMiniviz(t, h);

  Serial.println("Entering deep sleep...");
  esp_deep_sleep(SLEEP_INTERVAL_US);
}
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Send ESP32 Sensor Data to Miniviz for Real-time Visualization(Miniviz #1)

Thematisch verwandte Begriffe: Send, ESP32, Sensor, Data · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94104 | NivoCart through 2.4.0 contains an arbitrary file upload vulnerability i…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick