M&L TechnologyIntelligence in motion

The M&L technology approach

NetRelay MQTT Server

Monitor NetRelay devices through a local or cloud-based MQTT server and manage inputs, sensors and relay states in real time.

Ready product
NetRelay MQTT Server

Manage NetRelay Devices Centrally Through MQTT

The NetRelay MQTT Server solution allows NetRelay devices installed in factories, branches, technical rooms and remote field locations to be monitored and controlled centrally through a local or cloud-based MQTT broker.

NetRelay devices connect to the MQTT server as clients. Digital-input states, analog sensor measurements, relay outputs, device information and system telemetry can be published through defined MQTT topics. Relays can be switched on, switched off or activated for a specified duration using commands published by centralized software.

This architecture combines multiple field devices within one communication platform. Instead of connecting to every device separately, data and control operations are managed through the MQTT broker.

What Is MQTT?

MQTT is a lightweight publish-subscribe communication protocol designed for fast data exchange between connected devices.

Devices publish information to a centralized MQTT broker rather than sending it directly to other devices. Applications receive information by subscribing to the relevant topics.

This enables IoT devices, sensors, web applications, mobile applications and automation systems to operate independently while remaining coordinated.

How NetRelay MQTT Server Works

Each NetRelay device is configured with a unique device identifier, MQTT host, port, username, password and topic structure.

After startup, the device connects to the MQTT broker and publishes information through its assigned topics. Digital-input changes, sensor measurements, relay states and online status can be transferred to the centralized platform.

The management software controls relays by publishing messages to the command topic assigned to the device. NetRelay can publish its latest state after executing the command to confirm the result.

Local or Cloud-Based MQTT Broker

NetRelay devices can operate with an MQTT broker installed inside the local business network. In this model, IoT information can remain within the facility.

A cloud-based broker can be used when devices installed across different cities or field locations must be managed through one platform.

Hybrid architectures combining local and cloud systems can also be developed according to security and business-continuity requirements.

Publishing Digital-Input States

The four NetRelay digital inputs can collect machine status, fault signals, door contacts, float switches, alarms, sensors and production pulses.

When an input changes state, its current value can be published immediately through the MQTT broker.

The central application can create an alarm, notify a user or send a control command to another NetRelay device.

Analog Sensor Data

Temperature, humidity, light, pressure, soil-moisture and similar measurements can be transferred to centralized software through MQTT.

Sensor values can be displayed on charts, stored in databases and compared with historical information.

When a value moves outside a defined range, the management platform can create an alarm or publish a relay-control command.

Relay Control Through MQTT

The four NetRelay relay outputs can be managed remotely through MQTT commands.

Relays can be switched on, switched off, queried or activated temporarily before returning to their previous state.

Warning lights, sirens, fans, pumps, motor contactors, barriers, door locks, modems, IP cameras and other electrical equipment can be controlled.

Example MQTT Topic Structure

netrelay/factory-1/line-1/device-1001/status
netrelay/factory-1/line-1/device-1001/inputs
netrelay/factory-1/line-1/device-1001/sensors
netrelay/factory-1/line-1/device-1001/relays
netrelay/factory-1/line-1/device-1001/command

This structure allows hundreds of devices to be organized by facility, department and application.

Online and Offline Monitoring

The connection status of each NetRelay device can be monitored through the centralized dashboard.

Last-message time, IP address, device identifier and latest telemetry can be displayed.

A device that does not publish data for a defined period can be marked offline and reported to technical personnel.

MQTT Last Will and Testament can be used to publish an offline state automatically after an unexpected disconnection.

Multi-Device Management

Multiple NetRelay devices can connect to the same MQTT server. Each device is separated by its unique identifier and topic structure.

Devices can be grouped by factory, branch, department, production line and application.

Group commands can control multiple devices together, such as switching all outdoor lights or ventilation fans in a selected area.

Real-Time Management Dashboard

Information received through MQTT can be displayed in a real-time web dashboard.

The dashboard can show device connectivity, digital inputs, relays, sensor values, alarms and last communication times.

Authorized users can control relays, review device details and access event history.

Data Storage and Historical Analysis

Input, sensor and relay information can be stored in SQL Server, PostgreSQL, MySQL and other databases.

Users can review device states, sensor changes, alarm events and relay operations for selected date ranges.

The collected information can support production analysis, energy management, maintenance and operational reporting.

Alarm and Notification Management

Automatic alarms can be generated for input changes, sensor-limit violations, device disconnection and unexpected relay states.

Alerts can be delivered through email, SMS, mobile notifications and other business communication platforms.

Priority, responsible teams, repetition periods and closing conditions can be configured for each alarm.

Production Monitoring

Production pulses generated by conveyor and machine sensors can be collected through NetRelay digital inputs and published to the MQTT server.

The centralized application can treat each pulse as one product or machine cycle and calculate total output and hourly production speed.

When no pulse is received for a defined period, the system can create a production-downtime event.

Machine Fault and Downtime Notifications

Machine operation, downtime, thermal-fault and emergency-stop signals can be connected to NetRelay inputs.

State changes are transferred instantly to the centralized server through MQTT.

When a fault occurs, a maintenance record can be created, technical personnel can be notified and response time can be monitored.

Server-Room and Network-Cabinet Monitoring

Temperature, humidity, door and power information from server rooms can be transferred through NetRelay and MQTT.

When temperature exceeds a critical value, a fan or backup cooling relay can activate automatically.

Door openings, power failures and offline devices can generate immediate notifications.

Modem, Camera and Access-Point Control

The power of remote modems, routers, access points, IP cameras and NVR systems can be controlled through NetRelay relays.

The centralized platform can detect a disconnected device and publish a restart command through MQTT.

NetRelay Ping Watchdog can also monitor network equipment autonomously and power-cycle unresponsive devices.

Water-Well and Tank Automation

A float-switch state from a water tank can be read by NetRelay and published to the MQTT server.

When the water level falls, the central software can publish a pump-start command to a second NetRelay device installed at the remote well.

The pump can stop when the tank is full. Operation can be blocked when a thermal fault or dry-running condition is detected.

Smart Irrigation and Greenhouse Automation

Soil moisture, temperature, humidity, wind and water-level information can be transferred through MQTT.

Irrigation valves, pumps, fans and electric mechanisms can be controlled according to defined rules.

Historical sensor information can be analyzed to report irrigation duration and environmental conditions.

Lighting and Energy Management

Factory, residential-site, park and garden lighting can be managed centrally through NetRelay and MQTT.

Lighting can operate according to schedules, sunrise and sunset information or light-sensor values.

Lighting groups installed in different areas can be monitored through one interface and controlled through group commands.

Access Control and Barrier Management

License-plate recognition, card-access and custom authorization software can publish MQTT commands to control barriers, turnstiles and electric locks through NetRelay.

Door and limit-switch states can be returned to the central platform through digital inputs.

Access events can be recorded with device, user, date and time information.

Artificial Intelligence and Computer Vision Integration

AI-powered cameras can publish events when they detect defective products, area violations, authorized vehicles, smoke or missing protective equipment.

The central platform can route these events to NetRelay devices to activate warning lights, sirens, barriers and product-separation mechanisms.

This converts computer-vision results directly into physical field actions.

Home Assistant and Node-RED Integration

NetRelay inputs, sensors and relays can be included in Home Assistant and Node-RED through MQTT.

Home Assistant can provide monitoring and control dashboards.

Node-RED can create visual workflows connecting NetRelay with APIs, databases, other devices and notification services.

Custom Software Integration

The MQTT server can integrate with custom applications developed in Python, Node.js, C#, Java, PHP and other technologies.

Web, desktop and mobile applications can subscribe to MQTT topics and display device information in real time.

User commands can be sent to the relevant NetRelay device through the MQTT broker.

ERP, MES and SCADA Integration

NetRelay MQTT information can be transferred to ERP, MES, SCADA, production-monitoring and building-management platforms.

Production pulses, machine states, energy information and alarms can be associated with machines and production orders.

When an enterprise application does not support MQTT directly, an integration service can convert MQTT messages into REST APIs, SQL records or other formats.

QoS and Message Reliability

Different MQTT quality-of-service levels can be selected according to project requirements.

Lightweight delivery can be used for continuous telemetry, while delivery-confirmation methods can be preferred for alarms and control commands.

Critical relay commands can include request identifiers and be verified through state messages published by the device.

Retained Messages

Retained messages allow newly connected applications to receive the latest known device state immediately.

Storing the most recent input, sensor and relay states helps dashboards display current information as soon as they open.

Retained messages on command topics should be configured carefully to prevent unwanted repeated operations.

Secure MQTT Communication

Broker access can be restricted through usernames, passwords and topic-based authorization rules.

Each NetRelay device can be permitted to publish only to its own data topics and subscribe only to its assigned command topics.

TLS encryption, VPN and private-network connections can protect internet-based communication.

Local Operation without Cloud Dependency

The MQTT broker can run on a business-owned local server so NetRelay devices remain fully controlled inside the local network.

Automation can continue without internet access when devices, the broker and the management application operate on the same network.

This architecture is suitable for production facilities, security applications and projects where operational data should remain on-site.

Automated Reporting

Device, sensor, alarm and relay information received through MQTT can be converted into daily, weekly and monthly reports.

Operating durations, alarm quantities, temperature changes, production totals and device-availability rates can be reported.

Reports can be prepared in Excel or PDF format and delivered automatically by email.

Example Production Scenario

A photoelectric sensor on a conveyor sends one pulse to a NetRelay digital input for every product.

NetRelay publishes each pulse to the related production topic. The central application calculates total output and hourly speed.

When no production message is received for three minutes, the system creates a downtime event and notifies the operator.

When the target is completed, the software publishes a command to activate a green warning light through NetRelay.

Example Server-Room Scenario

A temperature sensor and door contact are connected to NetRelay inside a server cabinet.

Sensor and input information is published regularly to the MQTT server.

When temperature exceeds the limit, the server sends a command to activate the fan relay. A door-opening event generates an administrator notification.

Remote modems and access points can be power-cycled when they become unavailable.

Example Water-Tank Scenario

Low and high-level float switches are connected to the digital inputs of one NetRelay device.

Level information is published to the MQTT server. When the low-level switch activates, the central application sends a start command to the NetRelay controlling the remote pump.

The pump stops when the high-level switch activates. A thermal fault blocks operation and generates a technical alarm.

Measurable Success Indicators

  • Central management of NetRelay devices across different locations
  • Real-time monitoring of sensor and input information
  • Secure remote relay control
  • Faster identification of offline devices
  • Automatic collection of production and machine information
  • Automated notifications for alarms and faults
  • Flexible local or cloud-based deployment
  • Integration with ERP, MES, SCADA and custom software
  • Reduced field visits and manual inspections
  • Easy addition of new devices

Scalable MQTT Infrastructure

The system can begin with one NetRelay device and expand to manage hundreds of devices.

Topic structures, device identifiers and user permissions are designed for scalable operation.

New factories, branches, locations and devices can be added without replacing the existing platform.

A NetRelay MQTT Project Customized for Your Business

Every MQTT project has different requirements for device quantity, data frequency, communication security, deployment and integration.

The project defines NetRelay devices, network connections, MQTT broker infrastructure, topic structures, data-retention periods and user permissions.

A pilot can begin with a limited number of devices. After communication, storage and control scenarios are validated, the system can expand to additional devices and facilities.

For detailed configuration instructions, visit the NetRelay MQTT Installation and User Guide.

Community

Comments and questions

Nothing has been published yet.

Share your thoughts

Let’s build together

Have a similar challenge?

Ask a short question and our team will follow up. Filling out the project request form speeds things up if you need a similar solution.

Fill out the project request

Use the project request form for a detailed proposal.