### Install TDengine All-in-One with Apex Source: https://idmpdocs.tdengine.com/administration/all-in-one-deploy/installation-on-linux Downloads and runs the Apex deployment tool to start TDengine All-in-One installation. Must be run as root. During deployment, select the All-in-One option to deploy the complete TDengine platform. ```bash curl -fsSL https://downloads.taosdata.com/apex/latest/install.sh | bash -s -- -m apex ``` -------------------------------- ### Install Java SDK into local Maven repository Source: https://idmpdocs.tdengine.com/integrating-with-other-systems/client-sdk/installation First step for Java SDK installation. Navigate to the idmp-java-sdk directory and run Maven install with tests skipped to install the SDK into your local Maven repository. ```bash cd idmp-java-sdk mvn install -DskipTests ``` -------------------------------- ### Install agent-skills (online) Source: https://idmpdocs.tdengine.com/integrating-with-other-systems/idmp-cli Installs the taosdata/agent-skills globally with automatic confirmation. ```bash npx --yes skills add taosdata/agent-skills -g -y ``` -------------------------------- ### Full sample data configuration example Source: https://idmpdocs.tdengine.com/administration/sample-data Complete JSON example of a sample data configuration file for a smart metering monitoring system. It includes info, TDasset connection settings, datasource, databases, enumerations, and templates with super_tables and metrics. The example is truncated in the source at the metrics array. ```json { "info": { "id": "smart_meters", "name": "Utilities", "description": "A smart metering monitoring system that collects real-time data from electricity and water meters to enable precise energy management and anomaly detection.", "file": "smart_meters-en.json", "image": "smart_meters.png" }, "TDasset": { "url": "http://127.0.0.1:6042", "user": "", "password": "" }, "datasource": { "db": { "host": "127.0.0.1", "port": 6041, "user": "root", "password": "taosdata", "version": "3.3.6.0", "useTokenForAuth": false, "enableSsl": false }, "max_active": 10, "min_idle": 3, "max_lifetime": 1800000, "idle_timeout": 600000, "keep_alive_time": 30000, "connection_timeout": 30000, "validation_timeout": 5000, "validation_query": "SELECT 1" }, "databases": [ { "name": "idmp_sample_utility", "drop": "yes", "buffer": 10, "cachesize": "", "cachemodel": "'none'", "comp": null, "duration": "10d", "wal_fsync_period": 3000, "maxrows": 4096, "minrows": 100, "stt_trigger": 2, "keep": "3650d,3650d,3650d", "pages": 256, "pagesize": 4, "precision": "ms", "replica": 1, "vgroups": 1, "single_stable": 0, "table_prefix": 0, "table_suffix": 0, "tsdb_pagesize": 4, "wal_retention_period": 3600, "wal_retention_size": 0, "keep_time_offset": 0, "compact_interval": "0d", "compact_time_range": "0d,0d", "compact_time_offset": "0h", "dnodes": "" } ], "enumerations": [ { "name": "Meter Status", "code": "meter_status", "description": "Meter operating status", "valueType": "Varchar", "valueLength": 64, "values": [ { "name": "Normal", "value": "0", "description": "Normal operation" }, { "name": "Abnormal", "value": "1", "description": "Operating abnormally" } ] } ], "templates": [ { "name": "Electricity meter", "description": "This is electricity meter information", "namingPattern": "${KEYWORD1}", "keywordsDesc": { "KEYWORD1": "child table name" }, "location": { "altitude": { "min": -10985, "max": 10000 }, "latitude": { "min": -90, "max": 90 }, "longitude": { "min": -180, "max": 180 } }, "leaf": true, "super_tables": [ { "name": "electricity_meters", "start_timestamp": null, "time_step": 600000, "non_stop_mode": false, "slice_size": 10, "insert_rows": 1440, "batch_insert_num": 500, "insert_interval": 0, "metrics": [ { "name": "current", "title": "Current", "description": "current info", "type": "Float", "tdType": "metric", "uomClass": "Electric Current", "uom": "A", "displayDigits": 2, "fun": "4*sin(x)+random(2)+4" }, { ``` -------------------------------- ### Start and stop TDengine All-in-One on Linux/macOS Source: https://idmpdocs.tdengine.com/administration/installation/docker-guide Commands to manually start and stop the TDengine All-in-One deployment on Linux or macOS. Run them from the deployment directory ~/.apex/docker after installation completes. ```bash cd ~/.apex/docker ./tdengine.sh start ``` ```bash cd ~/.apex/docker ./tdengine.sh stop ``` -------------------------------- ### macOS offline installation: download and run install.sh Source: https://idmpdocs.tdengine.com/excel-add-in/installation Download the install.sh and manifest.xml files on a machine with internet access, then run the installer on the target macOS machine. Replace the example URL, script path, and manifest directory with your actual values. Excel will be force-closed during installation, so save all open workbooks first. ```bash mkdir -p ~/Downloads ~/manifest curl -fsSL https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.sh -o ~/Downloads/install.sh curl -fsSL https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/manifest.xml -o ~/manifest/manifest.xml chmod +x ~/Downloads/install.sh ``` ```bash ~/Downloads/install.sh install --force-close --url https://idmp.tdengine.net:6034 --manifest-dir ~/manifest --enable-logging ``` -------------------------------- ### EasyUse complete example Source: https://idmpdocs.tdengine.com/administration/easyuse Complete example of the EasyUse command for creating a wastewater treatment demo. After execution, EasyUse generates a requirement baseline, asset model, simulated data, analyses, panels, and a report. Do not specify an existing database. ```text /idmp-easyuse create a wastewater treatment demo. ``` -------------------------------- ### Create and activate Python virtual environment Source: https://idmpdocs.tdengine.com/integrating-with-other-systems/client-sdk/installation Recommended to avoid dependency conflicts with other projects. Create a virtual environment, activate it (with a Windows alternative), and then install the SDK. ```bash python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install . ``` -------------------------------- ### Windows offline installation: download and run install.ps1 Source: https://idmpdocs.tdengine.com/excel-add-in/installation Download the install.ps1 and manifest.xml files on a machine with internet access, then run the installer on the target Windows machine. PowerShell must be run as Administrator. Replace the example URL, script path, and manifest directory with your actual values. Excel will be force-closed during installation, so save all open workbooks first. ```powershell New-Item -ItemType Directory -Force -Path C:\Scripts, C:\manifest Invoke-WebRequest -Uri https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.ps1 -OutFile C:\Scripts\install.ps1 Invoke-WebRequest -Uri https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/manifest.xml -OutFile C:\manifest\manifest.xml ``` ```powershell C:\Scripts\install.ps1 -Action Install -ForceCloseExcel -Url 'https://idmp.tdengine.net:6034' -ManifestDir 'C:\manifest' -EnableLogging ``` -------------------------------- ### Initialize OpenCode with /init Source: https://idmpdocs.tdengine.com/administration/easyuse Optional initialization command to run in the OpenCode interactive interface, recommended on first use. ```bash /init ``` -------------------------------- ### Get Single Element (Python) Source: https://idmpdocs.tdengine.com/integrating-with-other-systems/client-sdk/api-reference/elements Python example retrieving a single element by ID using api_v1_elements_element_id_get. Throws ApiException(404) if not found. ```python element = element_api.api_v1_elements_element_id_get(123) print(element.name) ``` -------------------------------- ### Get Single Element (Java) Source: https://idmpdocs.tdengine.com/integrating-with-other-systems/client-sdk/api-reference/elements Java example retrieving a single element by ID using apiV1ElementsElementIdGet. Throws ApiException(404) if not found. ```java ElementDTO element = elementApi.apiV1ElementsElementIdGet(123L); System.out.println(element.getName()); ``` -------------------------------- ### Verify IDMP CLI installation with --help and --version Source: https://idmpdocs.tdengine.com/integrating-with-other-systems/idmp-cli Verifies that the CLI is available after installation. Runs the help and version commands. ```bash idmp-cli --help idmp-cli --version ``` -------------------------------- ### Start TDengine IDMP with Docker Source: https://idmpdocs.tdengine.com/get-started/get-started-docker Commands to manually start TDengine IDMP after All-in-One installation. The Linux/macOS command uses the shell script tdengine.sh, while the Windows command uses the PowerShell script tdengine.ps1. Both commands prompt you to select a deployment mode: Standard (TDengine TSDB Enterprise + IDMP) or Full (TDengine TSDB Enterprise + IDMP + TDgpt). ```bash cd ~/.apex/docker ./tdengine.sh start ``` ```powershell cd C:\ProgramData\TDengine\Apex\docker .\tdengine.ps1 start ```