24,000 Contact Us Cloud

TDengine IDMP in Action: Electric Vehicle Monitoring

TDengine Team

August 7, 2025 /

This article presents an example scenario simulating the collection of electric vehicle monitoring metrics over MQTT into TDengine TSDB and the AI-driven generation of panels and real-time analyses in TDengine IDMP.

Environment Setup

In this demonstration, TDengine TSDB and TDengine IDMP are deployed using Docker, with MQTT serving as the data source for the demo environment. The data flow is described in the following figure:

Prerequisites

  • Install Docker Engine 20.10 or later on your local machine. For instructions, see Install Docker Engine in the Docker documentation.
  • Install Docker Compose 1.29.2 or later on your local machine. For instructions, see Overview of installing Docker Compose in the Docker documentation.
  • Install Git on your local machine. For more information, see the Git website.

Install the Demonstration Environment

  1. Clone the tdengine-idmp-deployment repository:

    git clone https://github.com/taosdata/tdengine-idmp-deployment.git
  2. Start Docker Compose:

    cd tdengine-idmp-deployment/examples/electric_vehicle
    docker compose up -d

    This command will automatically pull the required images and start the TDengine IDMP service, TDengine TSDB-Enterprise service, and MQTT simulator in detached mode.

You can access TDengine TSDB through TDengine Explorer at http://localhost:6060 and TDengine IDMP at http://localhost:6042.

Troubleshooting

  • What happens: You try to start, but it fails or says the port is in use.
  • Why: An old demo or another program is still using Docker.
  • Fix:
    1. Stop all Docker containers by running docker stop $(docker ps -q)
    2. If the issue persists, restart Docker Desktop.

Create a Data Ingestion Task and Simulate Data Writing

Create a Database

  1. In your browser, access TDengine Explorer at http://localhost:6060.

  2. Log in with the default username root and password taosdata.

  3. Enter your name and email address as prompted to activate TDengine TSDB-Enterprise.

  4. Create a database to store the sample data.

    1. In the main menu on the left, click Explorer. Then click the + (Create Database) button next to Databases.

    2. In the Name field, enter ev. Retain the default values for all other settings.

    3. Click Create.

Create a Data Ingestion Task

  1. In the main menu on the left, click Data In.

  2. On the Data In page, click Import Task.

  3. Select the /examples/electric_vehicle/ev-task.json file in the tdengine-idmp-deployment repository that you cloned to your local machine.

  4. From the Target drop-down list, select the ev database.

  5. In the dialog box displayed, select the checkbox to the left of the task and click Confirm.

  6. In the task list, select the checkbox to the left of the task and click Start Task.

Once the task starts successfully, its status will display Running.

Generate Simulated Data

  1. Open a terminal in the ev-mqtt container.

    docker compose exec -it ev-mqtt /bin/sh
  2. Start the data simulator to send simulated data.

    ./mqtt_pub --schema ev-history-en.toml --interval 0ms
  3. In a web browser, access http://localhost:6060 and open the Explorer page. You should see that the electric vehicle simulation data has been generated.

Troubleshooting

  • What happens: No rows are shown in the database.
  • Why: The simulator hasn’t started creating data yet or encountered an error while writing data.
  • Fix:
    1. Wait a minute — the simulator may need time.
    2. Ensure that the simulator has been started in step 2 of this procedure.

Get Started with TDengine IDMP

Import Asset Model and Data from TDengine TSDB

TDengine TSDB supports static tags in a tree structure, with different levels separated by a period (.). In this example, the location tag column is used to store the hierarchy.

  1. In a web browser, access http://localhost:6042 and activate TDengine IDMP.

  2. Click your user avatar and select Admin Console.

  3. Under Connections, click the three-dot menu to the right of TDengine and select Easy Import.

  4. On the Data Import tab, select the ev database and electric_vehicle supertable.

  5. Under Tags, set location as a Path in the asset model and set all other tags to Attribute.

  6. At the bottom of the page, click Next Supertable. Select Ignore on all supertables other than electric_vehicle.

  7. Click Finish to import the asset model into TDengine IDMP.

Open the Explorer page and select EVs by Location in the sidebar. You can now see the electric vehicle tree organized by location.

Try AI-Generated Dashboards

  1. In the sidebar, select EVs by Location > California > OrangeCounty > Anaheim > ev-17.

  2. Open the Panels page on this element to see AI recommendations.

  3. Click Generate on a panel that you want to try. Once the panel is generated, click View to open it.

  4. On the details page, you can view the panel or click Edit to make changes. When you edit a panel, you can select Advanced to view the SQL statement used to create the panel.

  5. When you have finished modifying the panel, click Save to add it to the element.

Troubleshooting

  • What happens: The web dashboard is empty.
  • Why:
    • The time window does not include any data.
    • The panel is asking for the wrong table or column.
  • Fix:
    1. Set the dashboard time to “Last 15 minutes”.
    2. Click the Refresh button.
    3. Double-check the panel is looking at the correct data source.
  • What happens: You see old numbers, nothing updates.
  • Why: Auto-refresh is off.
  • Fix: Turn on auto-refresh (every 10–30 seconds). You can also click the Refresh button manually.

Try AI-Generated Analysis

  1. In the sidebar, select EVs by Location > California > OrangeCounty > Anaheim > ev-17.

  2. Open the Analyses page on this element to see AI recommendations.

  3. Click one of the suggested questions to generate a real-time analysis task.

  4. On the details page, you can view the configuration for the real-time analysis task and make changes as needed. When you have finished, click Save.

Troubleshooting the Demonstration Environment

  • See running containers:

    docker ps
  • Confirm that the database has been created:

    docker exec -it tdengine-tsdb taos -s "SHOW DATABASES;"

    If the list of databases includes ev, this indicates that the database exists in TDengine.

  • Confirm that the database has data:

    docker exec -it tdengine-tsdb taos -s "SELECT * FROM ev.electric_vehicle ORDER BY ts DESC LIMIT 5;"

    If rows of electric vehicle data appear, this indicates that the MQTT data simulator is sending data to TDengine TSDB.

Tips to Avoid Problems

  • Always stop Docker before running the demo again: docker compose down -v
  • If nothing works: restart Docker Desktop (non-Linux users) and try again.

Uninstall the Demonstration Environment

Once you have completed your evaluation, you can stop and remove the demonstation containers by running the following command:

docker compose down

If you also wish to remove the volumes created by the demonstration, use the following command.

docker compose down -v

Summary

In this demonstration, the combination of TDengine TSDB and TDengine IDMP delivers four key benefits:

  • Effortless data ingestion: TDengine IDMP is seamlessly integrated with TDengine TSDB. Once Monitoring data in TDengine TSDB can be quickly imported into TDengine IDMP, making a data catalog in a familiar tree structure for asset management.
  • Automatic onboarding of new data: When data from a new vehicle is ingested into the supertable, it is automatically imported into TDengine IDMP and displayed in your data catalog.
  • Zero-query intelligence: TDengine IDMP automatically identifies your scenario based on your data and recommends panels and real-time analytics tasks. You can analyze and visualize your data without writing prompts or SQL queries.
  • Chat BI: You can describe the panel or analysis that you want, and IDMP will automatically create it for you, bringing the barrier to data visualization and analytics down to zero.