Use Cases & Success Stories

Where opcgw delivers value in the field

Real-World Integration Scenarios

opcgw enables seamless integration of LoRaWAN IoT sensor networks into existing industrial systems. Here are detailed use cases showing how the gateway solves real problems.


🌱 Smart Agriculture: Precision Field Monitoring

The Challenge

A large agricultural cooperative manages 50+ farms across multiple regions. Each farm has soil, weather, and equipment sensors distributed across 100+ hectares. Previously:

  • Manual sensor checks β†’ inconsistent data
  • Paper/spreadsheet records β†’ slow decision-making
  • No real-time alerts β†’ late response to irrigation needs
  • Siloed data β†’ no cross-farm insights

The Solution with opcgw

Architecture:

[Soil/Weather Sensors] β†’ LoRaWAN Network β†’ ChirpStack β†’ opcgw β†’ Farm Management System (Ignition)
(Wireless)                   (Coverage)      (Aggregation)  (Bridge)   (Visualization & Logic)

Implementation:

  1. Deploy 300 LoRaWAN soil sensors across farms
    • Soil moisture (%)
    • Temperature (Β°C)
    • EC/Conductivity (mS/cm)
  2. ChirpStack aggregates sensor data
  3. opcgw gateway bridges to existing FMS running Ignition
  4. Ignition dashboard displays real-time field map
  5. Automated alerts trigger when soil moisture < 30%

Configuration:

[[application]]
application_name = "Farm Network"
application_id = "farm-network"

[[application.device]]
device_name = "Field A - North Block"
device_id = "soil_sensor_001"

[[application.device.read_metric]]
metric_name = "Soil Moisture"
chirpstack_metric_name = "soil_moisture_pct"
metric_type = "Float"
metric_unit = "%"

[[application.device.read_metric]]
metric_name = "Soil Temperature"
chirpstack_metric_name = "temp_celsius"
metric_type = "Float"
metric_unit = "Β°C"

[[application.device.read_metric]]
metric_name = "Soil EC"
chirpstack_metric_name = "ec_ms_per_cm"
metric_type = "Float"
metric_unit = "mS/cm"

# ... repeat for 300 devices across all farms

Results:

  • βœ… 30% reduction in water usage (precise irrigation)
  • βœ… 20% increase in crop yield (optimal growing conditions)
  • βœ… Real-time visibility β†’ faster decision-making
  • βœ… Historical data for trend analysis and planning

ROI: Sensor network + gateway cost recouped in first season through water/fertilizer savings.

πŸ’‘ Note: The TOML above illustrates the data model. In v2.x you normally configure all this from the web UI β€” config.toml is only a one-time bootstrap seed; the live configuration lives in SQLite and is portable via export/import.


πŸ’§ Precision Irrigation: Valve Actuation from SCADA

The Challenge

An orchard operator wants to open and close field irrigation valves directly from the control room, not just read sensors. Previously:

  • Valves opened manually in the field β†’ wasted trips and water
  • No closed-loop control β†’ irrigation tied to schedules, not conditions
  • No confirmation the valve actually moved β†’ silent failures

The Solution with opcgw

opcgw is not read-only: an OPC UA write to a command node becomes a LoRaWAN downlink to the device.

Architecture:

[SCADA / Fuxa] β†’ OPC UA write β†’ opcgw β†’ ChirpStack Enqueue β†’ LoRaWAN β†’ [Tonhe Valve]
                                  ↑                                          ↓
                          command status  ←  ack / txack events  ←  uplink (StreamDeviceEvents)

Flow:

  1. Operator (or automation logic) writes 1 = Open / 0 = Close to the valve’s OPC UA command node
  2. opcgw maps it through the command_class = "valve" device-class binding and enqueues a downlink via ChirpStack Enqueue
  3. The command moves through Pending β†’ Sent β†’ Confirmed as ack / txack events arrive on the device stream
  4. The valve’s reported state streams back as a raw last-known value (no aggregation), visible alongside the command status

Results:

  • βœ… Valves driven straight from the SCADA HMI β€” no field trips to actuate
  • βœ… Closed-loop irrigation: soil-moisture readings can trigger valve commands
  • βœ… Delivery confirmation (Pending β†’ Sent β†’ Confirmed) instead of fire-and-forget
  • βœ… Model-agnostic: the same class-aware path extends to other actuators, not just valves

Controlling irrigation valves from SCADA is opcgw’s origin story β€” the Tonhe E20 valve was its first proven control driver.


🏭 Smart Factory: Real-Time Equipment Monitoring

The Challenge

A mid-size manufacturing facility has 20 CNC machines spread across the shop floor. Current issues:

  • Manual rounds to check machine status β†’ labor intensive
  • No early warning for maintenance β†’ unexpected downtime
  • Disconnected data β†’ no production optimization
  • Temperature/vibration not monitored β†’ tool wear surprises

The Solution with opcgw

Architecture:

[Machine Sensors] β†’ LoRaWAN β†’ ChirpStack β†’ opcgw β†’ MES/ERP
(Vibration, Temp)              (Wireless)     (Bridge)

Sensors Deployed:

  • Vibration sensors on spindles
  • Temperature sensors on bearings
  • Power draw monitors (via wireless meters)
  • Door/status sensors (open/closed)

Implementation:

[[application]]
application_name = "Production Floor"
application_id = "production"

[[application.device]]
device_name = "CNC Machine 1"
device_id = "cnc001"

[[application.device.read_metric]]
metric_name = "Vibration Level"
chirpstack_metric_name = "vibration_g"
metric_type = "Float"
metric_unit = "G"

[[application.device.read_metric]]
metric_name = "Bearing Temperature"
chirpstack_metric_name = "bearing_temp"
metric_type = "Float"
metric_unit = "Β°C"

[[application.device.read_metric]]
metric_name = "Running"
chirpstack_metric_name = "machine_running"
metric_type = "Bool"

πŸ’‘ Note: This TOML shows the data model for clarity. In practice you configure devices and metrics from the web UI (with ChirpStack auto-discovery pickers); config.toml is just a bootstrap seed and the live config lives in SQLite, portable via export/import.

Integration with MES:

  • MES subscribes to OPC UA variables
  • High vibration β†’ trigger predictive maintenance alert
  • Temperature spike β†’ reduce spindle speed automatically
  • Machine stops β†’ log idle time for efficiency tracking

Results:

  • βœ… 40% reduction in unexpected downtime
  • βœ… Preventive maintenance before failures
  • βœ… Energy consumption visibility
  • βœ… Production metrics tied to equipment health

🌍 Environmental Monitoring: Urban Air Quality Network

The Challenge

A city health department wants to monitor air quality across neighborhoods. Goals:

  • Real-time public health alerts
  • Identify pollution hotspots
  • Track improvement over time
  • Publish open data for residents

The Solution with opcgw

Deployment:

  • 100+ air quality sensors distributed across city
  • LoRaWAN coverage via community network
  • Real-time data pipeline to city data system
  • Public-facing dashboard

Metrics Tracked:

PM2.5, PM10, NOβ‚‚, O₃, CO, Temperature, Humidity, Air Pressure

Integration:

[Air Quality Sensor Network] 
    ↓
[ChirpStack Aggregation]
    ↓
[opcgw Bridge]
    ↓
[Analytics Platform] β†’ [Public Dashboard]
    ↓
[Alert System] β†’ [Public Notifications]

Data Pipeline:

  1. Sensors report every 5 minutes
  2. opcgw exposes via OPC UA
  3. Analytics system subscribes to live data
  4. Trends detected β†’ historical database
  5. Public API serves open data to residents

Results:

  • βœ… Real-time air quality data for all neighborhoods
  • βœ… Health alerts when PM2.5 exceeds limits
  • βœ… Environmental justice: identify polluted areas
  • βœ… Accountability: track improvement initiatives
  • βœ… Resident engagement: transparency & public health

🏒 Building Automation: Energy Management at Scale

The Challenge

A 20-building commercial campus has:

  • HVAC zones across 200,000 mΒ²
  • Occupancy varies dramatically (20-100%)
  • Energy consumption: $5M/year
  • Limited visibility into actual vs. scheduled consumption

The Solution with opcgw

Wireless Sensor Deployment (eliminate wiring costs):

  • 500+ room occupancy sensors
  • 1000+ temperature/humidity sensors
  • 50+ water/gas meters
  • All wirelessly reporting via LoRaWAN

Integration with BMS:

[Sensors] β†’ LoRaWAN β†’ ChirpStack β†’ opcgw β†’ Building Management System
                                     ↓
                          [Demand-Controlled HVAC]
                          [Energy Optimization]
                          [Fault Detection]

Automated Logic:

If room unoccupied for 15 min:
  β†’ Set HVAC to standby
  β†’ Dim lighting to 10%
  β†’ Close blinds if temps allow

If temperature differential > 3Β°C for 10 min:
  β†’ Alert maintenance team
  β†’ Check for air leaks

Results:

  • βœ… 25% reduction in HVAC energy (occupancy-based)
  • βœ… 15% reduction in lighting energy (sensor-based)
  • βœ… Early fault detection (unexpected temperature variance)
  • βœ… Tenant comfort: maintain setpoints while saving energy
  • βœ… No wiring disruption to tenants

Payback: Energy savings exceed sensor + gateway cost in year 2.


⚑ Renewable Energy: Microgrid Optimization

The Challenge

A community solar cooperative with:

  • 50 rooftop solar installations
  • 10 battery storage units
  • Grid-tied + island mode capability
  • Complex energy balance requirements

The Solution with opcgw

Real-Time Microgrid Control:

[Solar Inverters] β†’ LoRaWAN β†’ ChirpStack β†’ opcgw β†’ Energy Management System
[Battery Units]                                ↓
[Grid Meters]                        [Optimization Engine]

Monitored Parameters:

  • Solar generation (kW) per building
  • Battery state of charge (%)
  • Grid import/export (kW)
  • Load consumption (kW)

Optimization Logic:

  1. Solar peak hours: Charge batteries, power loads, export excess
  2. Cloudy periods: Use battery, minimize imports
  3. Night time: Use battery first, then import
  4. Grid stress: Support grid with battery discharge
  5. Faults: Disconnect from grid, island mode

Results:

  • βœ… 90% solar self-consumption (not exported at low rates)
  • βœ… Reduced grid imports 40%
  • βœ… Revenue: participate in grid services markets
  • βœ… Resilience: island mode during grid outages
  • βœ… Sustainability: maximize renewable usage

πŸš› Logistics: Asset Tracking & Condition Monitoring

The Challenge

A logistics company moves temperature-sensitive goods (pharmaceuticals, food). Issues:

  • Need to track goods location in real-time
  • Monitor temperature during transport
  • Prove compliance with cold chain requirements
  • Detect tampering or handling issues

The Solution with opcgw

Wireless Sensor Packages:

  • LoRaWAN GPS trackers on shipments
  • Tamper-evident sensors
  • Temperature/humidity data loggers
  • Shock detectors

Real-Time Visibility:

[Shipment Sensors] β†’ LoRaWAN β†’ ChirpStack β†’ opcgw β†’ Logistics Platform

Integration:

  • Real-time location feeds GPS map
  • Temperature alerts if exceeds range
  • Tamper alert β†’ automatic quarantine in system
  • Proof of compliance: automated certificate generation

Results:

  • βœ… Full supply chain visibility
  • βœ… Compliance verification (audit-ready)
  • βœ… Early warning: act on cold chain violations
  • βœ… Liability protection: documented conditions
  • βœ… Efficiency: optimized routes based on real data

Common Success Patterns

Across all use cases, opcgw provides:

  1. Wireless First: LoRaWAN eliminates wiring costs/disruption
  2. Real-Time Integration: Live data in existing systems
  3. Standards-Based: OPC UA works with any SCADA/MES/analytics
  4. Low TCO: Simple architecture = easy to maintain
  5. Scalable: Hundreds of devices, minutes to add more

Getting Started With Your Use Case

  1. Identify Sensors: What data do you need?
  2. Plan LoRaWAN: Existing network or new deployment?
  3. Map to OPC UA: Which systems will consume data?
  4. Configure opcgw: Define applications β†’ devices β†’ metrics
  5. Integrate Target System: Wire OPC UA into SCADA/MES/Analytics
  6. Monitor & Optimize: Tune polling intervals, validate data quality

Ready to build? Start with the Quick Start Guide.

Have a specific use case? Open an issue or start a discussion.