Skip to content

zbest1000/node-red-contrib-Node-Red-sensor-Data-Generators

Repository files navigation

πŸš€ node-red-contrib-enhanced-data-generators

npm version Node-RED License: MIT

Advanced Node-RED nodes for AI-powered IoT data simulation, environmental monitoring, and manufacturing intelligence with FlowForge integration

🎯 Overview

This comprehensive Node-RED contrib package provides 20+ advanced nodes for creating sophisticated IoT simulations, implementing AI-powered analytics, and building modern dashboard applications. Perfect for developers, researchers, and enterprises working with sensor data, predictive analytics, and industrial IoT applications.

πŸ“¦ Installation

Via Node-RED Palette Manager (Recommended)

  1. Open your Node-RED instance
  2. Go to Menu β†’ Manage palette β†’ Install
  3. Search for node-red-contrib-enhanced-data-generators
  4. Click Install

Via npm

cd ~/.node-red
npm install node-red-contrib-enhanced-data-generators

Via Command Line (Global)

npm install -g node-red-contrib-enhanced-data-generators

πŸŽ›οΈ Available Nodes

🌍 Data Simulation Nodes

Enhanced Environmental Simulator

  • 25+ environmental sensors with realistic data patterns
  • Seasonal and daily cycles for authentic simulation
  • Air quality monitoring (PM2.5, PM10, CO2, NOx, O3)
  • Weather patterns with wind, rainfall, and solar radiation
  • Soil and water quality metrics
  • Configurable anomaly injection for testing

Enhanced Manufacturing Simulator

  • Production line metrics and quality control
  • Predictive maintenance data simulation
  • Energy consumption and efficiency tracking
  • Supply chain and inventory management
  • Safety and compliance monitoring

πŸ€– AI & Machine Learning Nodes

AI Predictor

  • 5 prediction algorithms: Linear regression, exponential smoothing, moving average, polynomial, isolation forest
  • Anomaly detection with configurable sensitivity
  • Confidence scoring and accuracy metrics
  • Real-time model updates with streaming data
  • Configurable history management (10-2000 data points)

AI Anomaly Detector

  • Statistical outlier detection using Z-scores
  • Isolation forest for complex anomaly patterns
  • Adaptive thresholds based on data characteristics
  • Severity classification (low, medium, high)
  • Real-time alerting integration

AI ChatGPT Analyzer

  • Natural language analysis of sensor data
  • Intelligent insights and recommendations
  • Contextual alerts with human-readable explanations
  • Trend summarization in plain English
  • Custom prompt engineering for specialized analysis

🎨 Advanced Dashboard Nodes

Advanced Dashboard Chart

  • Real-time line, bar, and scatter plots
  • 3D visualizations with WebGL acceleration
  • AI prediction overlays with confidence bands
  • Interactive zoom and pan controls
  • Export functionality (PNG, SVG, PDF)

Advanced Dashboard Gauge

  • Animated circular and linear gauges
  • Multi-zone color coding with thresholds
  • Trend indicators and sparklines
  • Customizable styling and themes
  • Alert integration with visual notifications

Advanced Dashboard 3D

  • Three.js powered 3D scenes
  • Real-time data visualization in 3D space
  • Interactive camera controls
  • Custom geometries and materials
  • VR/AR ready for immersive experiences

Advanced Dashboard Heatmap

  • Real-time heatmap visualizations
  • Geographic mapping integration
  • Time-series animation controls
  • Custom color scales and legends
  • Density clustering algorithms

πŸ”§ Utility & Management Nodes

Context Manager

  • Instance-based data storage with unique IDs
  • Automatic cleanup and memory management
  • Cross-instance communication capabilities
  • Persistent storage options (Redis, file, memory)
  • Data analytics and statistical functions

Instance Manager

  • Multi-device simulation management
  • Dynamic instance creation and destruction
  • Load balancing across instances
  • Status monitoring and health checks
  • Configuration synchronization

Data Analytics

  • Statistical analysis (mean, median, std dev, percentiles)
  • Trend analysis and pattern recognition
  • Data quality assessment and scoring
  • Correlation analysis between sensors
  • Automated reporting generation

Performance Monitor

  • System resource monitoring (CPU, memory, network)
  • Node-RED flow performance metrics
  • Database connection health checks
  • Alert thresholds and notifications
  • Historical performance tracking

πŸ”— Integration Nodes

FlowForge Connector

  • Team collaboration features
  • Remote device management
  • Version control integration
  • Deployment automation
  • Enterprise security and RBAC

Multi-Database Connector

  • Redis, InfluxDB, MongoDB, MySQL support
  • Connection pooling and failover
  • Query optimization and caching
  • Transaction management
  • Schema migration tools

Smart Alert Manager

  • Intelligent alert routing based on context
  • Escalation policies and notification chains
  • Alert correlation and deduplication
  • Multi-channel notifications (email, Slack, SMS)
  • Alert analytics and reporting

πŸš€ Quick Start Guide

1. Basic Environmental Monitoring

// Flow: Environmental Simulator β†’ AI Predictor β†’ Dashboard
[Enhanced Env Simulator] β†’ [AI Predictor] β†’ [Advanced Chart]
                        ↓
                   [Anomaly Detector] β†’ [Smart Alert Manager]

2. Manufacturing Intelligence

// Flow: Manufacturing Data β†’ Analytics β†’ Dashboard
[Manufacturing Simulator] β†’ [Data Analytics] β†’ [Advanced Gauge]
                          ↓
                    [Performance Monitor] β†’ [Multi-DB Connector]

3. AI-Powered Dashboard

// Flow: Data Sources β†’ AI Analysis β†’ Visualization
[Multiple Simulators] β†’ [Context Manager] β†’ [AI Predictor]
                                         ↓
                                   [Dashboard 3D] + [Heatmap]

πŸŽ›οΈ Configuration Examples

Environmental Simulator Setup

// Configure enhanced environmental simulator
{
  "instanceId": "env-station-001",
  "sensorCount": 25,
  "updateInterval": 5000,
  "enableSeasonalPatterns": true,
  "enableAnomalyDetection": true,
  "location": {
    "name": "Industrial Zone Alpha",
    "lat": 40.7128,
    "lon": -74.0060,
    "elevation": 10
  }
}

AI Predictor Configuration

// Configure AI prediction engine
{
  "predictionMethod": "exponential_smoothing",
  "predictionSteps": 5,
  "historySize": 100,
  "enableAnomalyDetection": true,
  "anomalyThreshold": 2.0,
  "confidenceThreshold": 0.7
}

Dashboard Chart Setup

// Configure advanced dashboard chart
{
  "chartType": "line",
  "realTime": true,
  "aiPrediction": true,
  "anomalyHighlight": true,
  "theme": "dark",
  "animations": true,
  "exportEnabled": true
}

πŸ“Š Data Formats

Environmental Data Output

{
  "instanceId": "env-001",
  "timestamp": "2024-01-15T14:30:00Z",
  "dataType": "environmental",
  "location": {
    "name": "Sensor Station Alpha",
    "coordinates": { "lat": 40.7128, "lon": -74.0060 }
  },
  "sensors": {
    "temperature": { "value": 22.5, "unit": "Β°C", "trend": "increasing" },
    "humidity": { "value": 65.2, "unit": "%", "trend": "stable" },
    "pm25": { "value": 35.1, "unit": "ΞΌg/mΒ³", "trend": "decreasing" },
    "airQualityIndex": { "value": 72, "unit": "AQI" }
  },
  "metadata": {
    "sensorCount": 25,
    "qualityScore": 94.2,
    "aiEnabled": true
  }
}

AI Prediction Output

{
  "original": { /* original sensor data */ },
  "ai": {
    "predictions": {
      "temperature": {
        "predictions": [
          { "step": 1, "value": 23.2, "confidence": 0.87 },
          { "step": 2, "value": 23.4, "confidence": 0.82 }
        ],
        "confidence": 0.87,
        "method": "exponential_smoothing"
      }
    },
    "anomalies": {
      "humidity": [{
        "value": 95.2,
        "severity": "high",
        "type": "spike",
        "timestamp": "2024-01-15T14:29:00Z"
      }]
    },
    "summary": {
      "totalSensors": 25,
      "predictionsGenerated": 23,
      "anomaliesDetected": 1,
      "averageConfidence": 0.78
    }
  }
}

πŸ”§ Advanced Configuration

Environment Variables

# AI Configuration
OPENAI_API_KEY=sk-your-openai-key
TENSORFLOW_MODEL_PATH=./models/tensorflow/

# Database Configuration  
REDIS_URL=redis://localhost:6379
INFLUXDB_URL=http://localhost:8086
MONGODB_URL=mongodb://localhost:27017/nodered

# FlowForge Configuration
FLOWFORGE_TOKEN=your-flowforge-token
FLOWFORGE_PROJECT_ID=your-project-id

Node-RED Settings

// Add to settings.js
functionGlobalContext: {
    // Enhanced Data Generators
    enhancedDataGenerators: require('node-red-contrib-enhanced-data-generators'),
    
    // AI Configuration
    openai_api_key: process.env.OPENAI_API_KEY,
    tensorflow_models: './models/',
    
    // Database connections
    redis_url: process.env.REDIS_URL,
    influxdb_url: process.env.INFLUXDB_URL
}

🎨 Dashboard Themes

Built-in Themes

  • Dark Mode: Professional dark theme with blue accents
  • Light Mode: Clean light theme with material design
  • Industrial: Orange and gray theme for manufacturing
  • Environmental: Green theme for environmental monitoring
  • Custom: Fully customizable theme system

Theme Configuration

{
  "theme": "dark",
  "primaryColor": "#1976d2",
  "accentColor": "#ff4081",
  "backgroundColor": "#121212",
  "surfaceColor": "#1e1e1e",
  "textColor": "#ffffff"
}

πŸ” Troubleshooting

Common Issues

Installation Problems

# Clear npm cache
npm cache clean --force

# Install with verbose logging
npm install node-red-contrib-enhanced-data-generators --verbose

# Check Node-RED logs
tail -f ~/.node-red/node-red.log

AI Features Not Working

// Check OpenAI API key
console.log(global.get('openai_api_key'));

// Verify TensorFlow installation
const tf = global.get('tensorflow');
console.log(tf ? 'TensorFlow loaded' : 'TensorFlow not available');

Performance Issues

// Reduce history size for better performance
{ "historySize": 50 }

// Decrease update intervals
{ "updateInterval": 10000 }

// Disable AI features temporarily
{ "enableAI": false }

πŸ“š Documentation

Node Documentation

Tutorials

API Reference

🀝 Contributing

We welcome contributions! Please read our Contributing Guide for details.

Development Setup

# Clone the repository
git clone https://github.com/enhanced-node-red/node-red-contrib-enhanced-data-generators.git

# Install dependencies
cd node-red-contrib-enhanced-data-generators
npm install

# Link for local development
npm link
cd ~/.node-red
npm link node-red-contrib-enhanced-data-generators

# Start Node-RED
node-red

Testing

# Run unit tests
npm test

# Run integration tests
npm run test:integration

# Run linting
npm run lint

# Run type checking
npm run type-check

πŸ“ˆ Roadmap

Version 2.1.0 (Q2 2024)

  • Edge Computing: Support for edge deployment and processing
  • Advanced ML Models: LSTM and GRU neural networks
  • Real-time Collaboration: Multi-user flow editing
  • Enhanced Security: Zero-trust security model

Version 2.2.0 (Q3 2024)

  • Cloud Integration: Native AWS, Azure, GCP connectors
  • WebAssembly: WASM support for high-performance computing
  • Blockchain: Distributed ledger integration
  • Voice Control: Voice-activated flow management

Version 3.0.0 (Q4 2024)

  • Augmented Reality: AR-based data visualization
  • Advanced AI: GPT-4 integration and custom LLMs
  • IoT Protocols: Support for newer IoT standards
  • Enterprise Features: Advanced RBAC and audit logging

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Node-RED Team: For the amazing flow-based programming platform
  • FlowForge: For enterprise-grade Node-RED management
  • OpenAI: For cutting-edge AI capabilities
  • TensorFlow.js: For in-browser machine learning
  • Three.js: For 3D visualization capabilities
  • Community Contributors: For extensive feedback and contributions

πŸ“ž Support & Community

⭐ Star History

Star History Chart


πŸš€ Ready to transform your IoT and data analytics workflows? Install node-red-contrib-enhanced-data-generators today and start building the future of intelligent automation!

About

Node-Red random data generator/simulator for iot and IIOT environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •