### Install N3uron Skill Manually (Antigravity) Source: https://docs.n3uron.com/docs/agent-skills Manually install the N3uron skill by copying the extracted skill folder into the Antigravity skills directory. Ensure the directory exists before copying. ```bash mkdir -p ~/.gemini/antigravity/skills cp -R n3uron-iiot-dataops ~/.gemini/antigravity/skills/ ``` -------------------------------- ### Enable and Start SparkPipe Service Source: https://docs.n3uron.com/docs/sparkpipe-configuration Commands to enable and start the SparkPipe service after configuration. Verify its status and view logs. ```bash sudo systemctl enable sparkpipe.service sudo systemctl start sparkpipe.service ``` ```bash sudo systemctl status sparkpipe.service ``` ```bash sudo journalctl -u sparkpipe.service -f ``` -------------------------------- ### N3uron REST API Code Examples Source: https://docs.n3uron.com/n3uron-chatgpt-assistants Provides ready-to-use code examples for interacting with N3uron's REST API. Supports various languages and common integration tasks. ```bash curl -X GET "http://localhost:5000/api/v1/tags?filter=name%3DMyTag" -H "accept: application/json" ``` ```javascript const axios = require('axios'); const getN3uronTags = async () => { try { const response = await axios.get('http://localhost:5000/api/v1/tags', { headers: { 'accept': 'application/json' }, params: { 'filter': 'name=MyTag' } }); console.log(response.data); } catch (error) { console.error('Error fetching N3uron tags:', error); } }; getN3uronTags(); ``` ```python import requests def get_n3uron_tags(): url = "http://localhost:5000/api/v1/tags" headers = { "accept": "application/json" } params = { "filter": "name=MyTag" } try: response = requests.get(url, headers=headers, params=params) response.raise_for_status() # Raise an exception for bad status codes print(response.json()) except requests.exceptions.RequestException as e: print(f"Error fetching N3uron tags: {e}") get_n3uron_tags() ``` -------------------------------- ### Install N3uron Skill Manually (Codex) Source: https://docs.n3uron.com/docs/agent-skills Manually install the N3uron skill by copying the extracted skill folder into the Codex skills directory. Ensure the directory exists before copying. ```bash mkdir -p ~/.agents/skills cp -R n3uron-iiot-dataops ~/.agents/skills/ ``` -------------------------------- ### N3uron REST API Assistant Code Examples Source: https://docs.n3uron.com/docs/n3uron-chatgpt-assistants Provides ready-to-use code examples for interacting with N3uron's REST API. Supports various languages and common use cases like data retrieval and configuration. ```bash curl -X GET "http://localhost:5000/api/v1/tags?filter=name%3D%3DMyTag" \ -H "accept: application/json" ``` ```javascript const n3uron = require('n3uron-api'); async function getTagValue(tagName) { const tag = await n3uron.getTag(tagName); return tag.value; } getTagValue('MyTag').then(value => console.log(value)); ``` ```python import requests url = "http://localhost:5000/api/v1/tags?filter=name==MyTag" headers = {"accept": "application/json"} response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Install N3uron Skill Manually (Claude Code) Source: https://docs.n3uron.com/docs/agent-skills Manually install the N3uron skill by copying the extracted skill folder into the Claude Code skills directory. Ensure the directory exists before copying. ```bash mkdir -p ~/.claude/skills cp -R n3uron-iiot-dataops ~/.claude/skills/ ``` -------------------------------- ### N3uron SQL Client JavaScript Example Source: https://docs.n3uron.com/n3uron-chatgpt-assistants Example of JavaScript logic for the N3uron SQL Client, likely for custom parsers or stored procedures. ```javascript function parseMySqlData(tag, data) { // Custom parser logic here return data; } ``` -------------------------------- ### Configure Multiple MQTT Brokers Source: https://docs.n3uron.com/docs/sparkpipe-configuration Example of configuring SparkPipe to connect to multiple MQTT brokers. Add additional [[mqtt.brokers]] sections for each broker. ```toml ## N3uron SparkPipe configuration file # Logging configuration [logging] # Log level: DEBUG, INFO, WARN, ERROR level = "info" # Log format: JSON, TEXT format = "json" # MQTT configuration [mqtt] # Sparkpug host application ID host_id = "sparkpipe" # Sparkplug reordering timeout in seconds reorder_timeout = 5 # Time in seconds before another Rebirth request can be sent to an EdgeNode rebirth_delay = 5 # MQTT brokers [[mqtt.brokers]] # HiveMQ public broker server = "ssl://broker.hivemq.com:8883" [[mqtt.brokers]] # Mosquitto public broker server = "ssl://test.mosquitto.org:8883" tls_insecure_skip_verify = true # Connectors ... ``` -------------------------------- ### Stdout Connector Configuration with Filter Source: https://docs.n3uron.com/docs/sparkpipe-connectors-stdout Example configuration for the Stdout connector to capture metrics with 'Temperature' in their name. ```toml ... # Connectors configuration [connectors] name = "stdout" # Stdout [connectors.stdout] metric_name_filter = "Temperature" ``` -------------------------------- ### N3uron MQTT Assistant - Payload Mapping Example Source: https://docs.n3uron.com/docs/n3uron-chatgpt-assistants Demonstrates a custom payload parser for N3uron's MQTT Assistant, enabling flexible mapping of incoming MQTT topic data into N3uron tags. ```javascript function customPayloadParser(payload) { // Parse the incoming payload (e.g., JSON string) const data = JSON.parse(payload); // Map payload fields to N3uron tag values return { 'Temperature': data.temp, 'Humidity': data.hum }; } ``` -------------------------------- ### N3uron SQL Client Assistant - JavaScript Logic Example Source: https://docs.n3uron.com/docs/n3uron-chatgpt-assistants Illustrates custom JavaScript logic for the N3uron SQL Client, useful for data manipulation and custom parsing within SQL transactions. ```javascript function customParser(value) { // Custom logic to parse or transform the value return value.toUpperCase(); } ``` -------------------------------- ### N3uron MQTT Payload Parser Example Source: https://docs.n3uron.com/n3uron-chatgpt-assistants Illustrates a custom JavaScript parser for MQTT payload data within the N3uron MQTT Assistant. ```javascript function parseMqttPayload(tag, payload) { // Custom payload parser logic here return payload; } ``` -------------------------------- ### Configure AWS IoT Core with mTLS Source: https://docs.n3uron.com/docs/sparkpipe-configuration Example configuration for connecting to AWS IoT Core using TLS certificates for mutual authentication. Ensure certificates are correctly placed and paths are accurate. ```toml ## N3uron SparkPipe configuration file # Logging configuration [logging] # Log level: DEBUG, INFO, WARN, ERROR level = "info" # Log format: JSON, TEXT format = "json" # MQTT configuration [mqtt] # Sparkpug host application ID host_id = "sparkpipe" # Sparkplug reordering timeout in seconds reorder_timeout = 5 # Time in seconds before another Rebirth request can be sent to an EdgeNode rebirth_delay = 5 # MQTT brokers [[mqtt.brokers]] # AWS IoT Core server = "ssl://e7paxflom6n2q-ats.iot.us-east-1.amazonaws.com:8883" tls_client_certificate = "/etc/sparkpipe/certs/703142e50c45a12ac5720aaae40347d56045aa433d71aae6dc5b39d572428f02-certificate.pem.crt" tls_client_certificate_key = "/etc/sparkpipe/certs/703142e50c45a12ac5720aaae40347d56045aa433d71aae6dc5b39d572428f02-private.pem.key" tls_certificate_authority = "/etc/sparkpipe/certs/AmazonRootCA1.pem" # Connectors ... ``` -------------------------------- ### module_restart Source: https://docs.n3uron.com/docs/mcp-server-tools Restarts a module instance by stopping and then starting it again. This operation applies configuration changes, clears module state, and reinitializes connections, making it essential after configuration updates. Returns void on success. ```APIDOC ## module_restart _Write_ ### Description Restart a module instance by stopping it and starting it again. Returns void on success. This operation applies configuration changes, clears module state, and reinitializes connections. Essential after configuration updates. ### Parameters #### Query Parameters - **moduleName** (string) - Required - Name of the module instance to restart. Can be either running or stopped - will be restarted in the running state. - **options_actor** (string) - Optional - Identifier for audit trail purposes. Records who restarted the module for compliance and security tracking. ``` -------------------------------- ### module_getConfigList Source: https://docs.n3uron.com/docs/mcp-server-tools Gets a list of available configuration files for a specific module type. Returns an object describing the configuration files/sections that can be managed for this module (e.g., 'config', 'tags', 'modules', 'links'). Each entry includes display text, icon, and filename. If moduleType is not provided, it returns the configuration list for the Bootstrap module (core system settings). ```APIDOC ## module_getConfigList _Read_ ### Description Get a list of available configuration files for a specific module type. Returns an object describing the configuration files/sections that can be managed for this module (e.g., 'config', 'tags', 'modules', 'links'). Each entry includes display text, icon, and filename. If moduleType is not provided, returns the configuration list for the Bootstrap module (core system settings). ### Parameters #### Query Parameters - **moduleType** (string) - Optional - Module type to query. Examples: 'MqttClient', 'OpcUaClient', 'ModbusClient'. Defaults to 'bootstrap' if not provided. ``` -------------------------------- ### module_getInstances Source: https://docs.n3uron.com/docs/mcp-server-tools Gets information about active module instances (running modules) with optional filtering. Returns runtime information about instantiated modules, including their current status, resource usage, and operational parameters, useful for monitoring active modules. ```APIDOC ## module_getInstances _Read_ ### Description Get information about active module instances (running modules) with optional filtering. Returns runtime information about instantiated modules, including their current status, resource usage, and operational parameters. Use this to monitor active modules ### Parameters #### Query Parameters - **filter_name** (string) - Optional - Filter by module instance name. Use partial names to search for specific running instances. - **filter_type** (string) - Optional - Filter by module type. Examples: 'MqttClient', 'OpcUaClient', 'ModbusClient', 'SqlClient'. - **filter_category** (string) - Optional - Filter by module category. publisher for data output modules, source for data input modules. - **filter_native** (boolean) - Optional - Filter to show only native modules (true) or exclude them (false). - **filter_preRelease** (string) - Optional - Filter by pre-release type. Use 'nightly' for development versions. ``` -------------------------------- ### UFL Exporter CSV File Example Source: https://docs.n3uron.com/docs/ufl-exporter-appendix This is an example of a CSV file generated by the UFL Exporter. It shows the data format including data type, tag path, timestamp, tag value, and OPC quality. ```csv N,Inverter001.Active_Power,2019-02-19T14:46:44.501Z,1020,192 N,Inverter002.Active_Power,2019-02-19T14:46:44.501Z,1250,192 N,Inverter003.Active_Power,2019-02-19T14:46:44.501Z,1210,192 N,Inverter004.Active_Power,2019-02-19T14:46:44.501Z,1137,192 N,Inverter005.Active_Power,2019-02-19T14:46:44.501Z,1112 ,192 N,Inverter001.Active_Power,2019-02-19T14:47:44.503Z,1035 ,192 N,Inverter002.Active_Power,2019-02-19T14:47:44.503Z,1249 ,192 N,Inverter003.Active_Power,2019-02-19T14:47:44.503Z,1245 ,192 N,Inverter004.Active_Power,2019-02-19T14:47:44.503Z,1168 ,192 N,Inverter005.Active_Power,2019-02-19T14:47:44.503Z,1098 ,192 ``` -------------------------------- ### Sample Data Structure Source: https://docs.n3uron.com/sql-client-examples Illustrates the structure of the data after transformation, showing an array of objects with specific keys and values. ```json [ { PO: 12002, SystemPO: 12002001, POPlannedStartTime: "2023-12-28 10:00:00", POPlannedEndTime: "2023-12-28 11:00:00", Product: "Product_02", }, { PO: 12003, SystemPO: 12003001, POPlannedStartTime: "2023-12-28 11:00:00", POPlannedEndTime: "2023-12-28 12:00:00", Product: "Product_02", }, { PO: 12004, SystemPO: 12004001, POPlannedStartTime: "2023-12-28 12:00:00", POPlannedEndTime: "2023-12-28 13:00:00", Product: "Product_02", }, ]; ``` -------------------------------- ### redundancy_status Source: https://docs.n3uron.com/docs/mcp-server-tools Get redundancy status. Returns enabled state, standby status, and mode (primary/backup). ```APIDOC ## redundancy_status _Read_ ### Description Get redundancy status. Returns enabled state, standby status, and mode (primary/backup). ### Method READ ### Parameters None required ``` -------------------------------- ### Launch SparkPipe Instance (AWS CLI) Source: https://docs.n3uron.com/docs/sparkpipe-deployment Launches an EC2 instance using the specified SparkPipe AMI ID, instance type, key pair, and security group. Replace with the actual AMI ID. ```bash aws ec2 run-instances \ --image-id \ --count 1 \ --instance-type m6g.medium \ --key-name my-key-pair \ --security-groups sparkpipe-sg ``` -------------------------------- ### backup_load Source: https://docs.n3uron.com/docs/mcp-server-tools Loads and applies a backup snapshot to restore the node configuration. WARNING: This action completely replaces the current configuration. Always create a current backup before loading. ```APIDOC ## backup_load ### Description Load and apply a backup snapshot to restore the node configuration. **WARNING: This completely replaces the current configuration** with the backup contents. Returns LoadBackupResult with operation status and any warnings. Always create a current backup before loading. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **name** (string) - Required - Name of the backup to load and apply. Must be an existing backup. Verify this is the correct backup, as loading will overwrite the current configuration. * **options_actor** (string) - Required - Identifier for audit trail purposes. Records who initiated the backup restore operation. Important for security and compliance tracking. ### Request Example ```json { "name": "backup_before_update", "options_actor": "admin_user" } ``` ### Response #### Success Response (200) * **status** (string) - Status of the load operation (e.g., 'success', 'warning'). * **warnings** (array) - A list of warnings encountered during the load operation. #### Response Example ```json { "status": "success", "warnings": [] } ``` ``` -------------------------------- ### module_getInstalled Source: https://docs.n3uron.com/docs/mcp-server-tools Retrieves a list of all modules installed on this node, including versions, types, categories, and availability status. Filters can be used to find specific modules by type, category, or other criteria. ```APIDOC ## module_getInstalled _Read_ ### Description Retrieve a list of all modules installed on this node. Returns module information, including versions, types, categories, and availability status. Use filters to find specific modules by type, category, or other criteria. ### Parameters #### Query Parameters - **filter_name** (string) - Optional - Filter by specific module name. Use partial names to search for modules containing the specified text. - **filter_type** (string) - Optional - Filter by module type. Examples include 'MqttClient', 'OpcUaClient', 'ModbusClient', 'SqlServer', etc. - **filter_category** (string) - Optional - Filter by module category. Common categories include publisher (data output modules) and source (data input modules). - **filter_native** (boolean) - Optional - Filter to show only native modules (true) or exclude them (false). Native modules are built-in components. - **filter_preRelease** (string) - Optional - Filter by pre-release type. Use 'nightly' to show development versions or leave empty for stable releases only. ``` -------------------------------- ### module_getConfigPresent Source: https://docs.n3uron.com/docs/mcp-server-tools Checks if configuration files exist for a specific module instance. Returns boolean information about which configuration files are present for the module, useful for validating module setup before operations. ```APIDOC ## module_getConfigPresent _Read_ ### Description Check if configuration files exist for a specific module instance. Returns boolean information about which configuration files are present for the module. Useful for validating module setup before operations. ### Parameters #### Query Parameters - **moduleName** (string) - Required - Name of the module instance to check for configuration files. Must be an existing module instance name. ``` -------------------------------- ### backup_create Source: https://docs.n3uron.com/docs/mcp-server-tools Creates a complete backup snapshot of the current node configuration, including modules, tags, alarms, and configurations. Optionally, secrets can be included. This operation returns void on success and may take several minutes for large configurations. ```APIDOC ## backup_create ### Description Create a complete backup snapshot of the current node configuration. Captures all modules, tags, alarms, configurations, and optionally secrets. Returns void on success. This operation may take several minutes for large configurations. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **name** (string) - Required - Unique name for the backup snapshot. Must be a valid filename (avoid special characters). This name will be used to identify the backup for future restore, export, or delete operations. * **metadata_description** (string) - Required - Human-readable description of the backup purpose. Include context like 'Before system update', 'Daily backup', or 'Pre-maintenance snapshot'. This helps determine the purpose of the backup later. ### Request Example ```json { "name": "backup_before_update", "metadata_description": "Backup before system update" } ``` ### Response #### Success Response (void) Returns void on success. #### Response Example None (void) ``` -------------------------------- ### system_restartService Source: https://docs.n3uron.com/docs/mcp-server-tools Restart the entire node service. Returns void on success. WARNING: This will stop all modules and restart the complete service. Use with caution, as this affects all running operations and connections. ```APIDOC ## system_restartService _Write_ ### Description Restart the entire node service. Returns void on success. WARNING: This will stop all modules and restart the complete service. Use with caution, as this affects all running operations and connections. ### Method WRITE ### Parameters #### Query Parameters - **options_actor** (string) - Required - Identifier for audit trail purposes. Records who initiated the service restart for compliance and security tracking. ``` -------------------------------- ### system_errorCount Source: https://docs.n3uron.com/docs/mcp-server-tools Get the current count of system errors and warnings. Returns numeric counts of different error levels, including critical errors, warnings, and informational messages. Useful for system health monitoring and alerting. ```APIDOC ## system_errorCount _Read_ ### Description Get the current count of system errors and warnings. Returns numeric counts of different error levels, including critical errors, warnings, and informational messages. Useful for system health monitoring and alerting. ### Method READ ### Parameters None required ``` -------------------------------- ### Synchronize Database to N3uron Tags Source: https://docs.n3uron.com/sql-client-examples Use this query script to select data from a database table for synchronization to N3uron tags. Ensure destination tags have Read/Write permissions. ```sql $.output = "SELECT `product1_demand`, `product2_demand`, `product1_label`, `product2_label`, `line1_active`, `line2_active`, `line3_active`, `line4_active` FROM db_n3_sync"; ``` -------------------------------- ### SSH into SparkPipe Instance (AWS CLI) Source: https://docs.n3uron.com/docs/sparkpipe-deployment Connects to your EC2 instance using EC2 Instance Connect. Replace with your instance's ID. ```bash aws ec2-instance-connect ssh --instance-id ``` -------------------------------- ### Execute SQL Server Table Creation and Data Insertion Source: https://docs.n3uron.com/sql-client-examples Combines table creation and data insertion queries for SQL Server. This script first ensures the table exists and then inserts a new row with current timestamp and voltage data. ```javascript // Execute the functions to create the table (if it doesn't exist) and insert data into it. $.output = _createTableSqlServer(); $.output += _insertDataSqlServer(); ```