Call Phone +8618073152920 Hotline: +8618073152920
Call Phone +8618073152920
English
CONTACT US/ CONTACT US
Consumer hotline +8618073152920
Changsha Zoko Link Technology Co., Ltd.

Email:Arvin@niubol.com

WhatsApp:+8615367865107

Address:Room 102, District D, Houhu Industrial Park, Yuelu District, Changsha City, Hunan Province, China

Position:Home >> Blogs >> Technical Support

Technical Support

RS485 Sensor to Cloud: LoRaWAN, MQTT and HTTP Integration Guide

Time:2026-09-07 16:27:29 Popularity:472

Most industrial RS485 sensors do not connect directly to the Internet. They provide measurements through a serial interface, while a compatible data logger, RTU or wireless acquisition node collects those measurements and transfers them to a remote monitoring system.

For agricultural IoT, weather stations, water quality monitoring and hydrological projects, NiuBoL sensors can be integrated into different communication architectures, including cellular networks, Ethernet, LoRaWAN, MQTT and HTTP-based private-server connections.

The correct solution depends on sensor distribution, available power, network coverage and the receiving platform. Selecting a gateway simply because it supports MQTT or RS485 is not sufficient.

How Does an RS485 Sensor Send Data to the Cloud?

A complete sensor-to-cloud connection normally contains three functional layers: field measurement, data acquisition and network communication.

       Industrial IoT architecture connecting water level wind rainfall and other field equipment to a gateway and remote monitoring center    

The acquisition device reads the sensor registers, converts raw values into engineering units and prepares data for transmission. The communication network carries the resulting message to the receiving application.

For example, a soil moisture sensor may return an integer through Modbus RTU. The logger converts that integer into volumetric water content and publishes the measurement to an MQTT broker or sends it to an HTTP endpoint.

MQTT and HTTP operate on the network side. They do not replace the sensor's Modbus register definitions.

Three Practical Architectures for Connecting Industrial Sensors

ArchitectureData Transmission PathSuitable Application
Direct cellular or EthernetRS485 sensors → Industrial data logger → 4G or Ethernet → Customer serverWeather stations, water monitoring stations and concentrated sensor installations
LoRaWANRS485 sensor → LoRaWAN end device → Radio gateway → Network server → ApplicationDistributed agricultural monitoring points and low-data-rate environmental networks
Existing PLC or RTUSensors → Existing controller → Supported network interface → SCADA or customer serverIndustrial retrofit projects with existing local acquisition equipment

If several sensors are installed around one weather station mast, direct wired acquisition through a shared 4G logger may be simpler than adding a separate wireless node to every sensor.

For widely distributed orchard blocks, irrigation zones or soil monitoring points, LoRaWAN may reduce the need for long communication cables and individual cellular subscriptions.

Where a customer already has a working PLC, the existing controller may continue acquiring sensor measurements while an appropriate network interface handles remote transmission.

Solution 1: Connect RS485 Sensors Directly to a 4G IoT Gateway

The NiuBoL TG462/TG462S industrial data logger supports multiple serial and analog field instruments. It provides an acquisition and communication platform for weather stations, agricultural sensors, water quality monitoring and industrial IoT installations.

       TG462S industrial IoT data logger with touchscreen and multiple RS485 sensor interfaces    

The TG462 is suitable for projects that do not require a local touchscreen, while the TG462S includes a 7-inch display for supported local visualization and operation.

TG462/TG462S Gateway Integration Specifications

Interface or FunctionSpecification
RS4853 serial ports for compatible Modbus RTU instruments
RS2324 ports, including one debug port
Analog acquisition8 × 12-bit ADC; 4–20 mA or optional 0–5 V configuration
Digital inputs and relays4 digital inputs and 4 relay outputs
Ethernet2 × RJ45
Wireless connectivityCellular according to regional configuration; optional Wi-Fi
Communication functionsMQTT, TCP/UDP, Modbus RTU-to-TCP gateway; HTTP networking with application-level configuration
External storageMicroSD support up to 32 GB; USB 2.0
Input voltage5–35 VDC; standard supply 12 VDC/1.5 A
Protection ratingIP30; requires suitable protective enclosure for outdoor installation

Three RS485 ports allow the gateway to separate sensor groups where different communication settings or bus layouts are required. Each shared Modbus segment must use compatible serial settings and unique device addresses.

For example, one gateway may acquire weather sensors through one RS485 port and a separate group of soil or water quality sensors through another port.

       TG462 IoT gateway terminal layout showing RS485 RS232 analog inputs Ethernet power and wireless communication interfaces    

The number of sensors that can be connected depends on communication settings, polling requirements, electrical loading and available power. Three RS485 ports do not mean that the gateway is limited to three sensors.

For register configuration and communication troubleshooting, see the RS485 Modbus RTU sensor communication guide.

A transparent DTU is different from an active acquisition gateway. A transparent device may forward serial bytes to a remote system, whereas an active gateway can be configured to poll sensors, decode measurements and prepare application data.

Confirm where the Modbus acquisition software will operate before selecting the equipment.

Solution 2: Connect RS485 Sensors to a LoRaWAN Network

Standard NiuBoL RS485 soil, weather and water quality sensors do not contain a native LoRaWAN radio. A compatible LoRaWAN end device is required to acquire their measurements and transmit encoded wireless data.

One available integration approach uses the Seeed Studio SenseCAP S2100 LoRaWAN data logger with a compatible RS485 sensor.

NiuBoL RS485 Modbus Sensor

↓ RS485 A/B and suitable sensor power supply

SenseCAP S2100 LoRaWAN End Device

↓ LoRaWAN Wireless Uplink

Compatible LoRaWAN Gateway

↓ Ethernet or 4G Backhaul

LoRaWAN Network and Application Server Functions

↓ Payload Decoding and MQTT or HTTP Integration

Customer Database or Private Monitoring Platform

The S2100 performs local sensor acquisition. The LoRaWAN gateway receives radio packets and forwards them toward the network server. Application-side decoding converts the received payload into useful measurement fields.

Depending on the selected gateway and server architecture, network-server functions may be embedded within the gateway or hosted externally.

SenseCAP S2100 LoRaWAN Data Logger Specifications

ParameterSpecification
ModelSenseCAP S2100
ManufacturerSeeed Studio
Sensor interfaceRS485 Modbus RTU, analog or GPIO acquisition modes
Wireless protocolLoRaWAN v1.0.3 Class A
Regional channel plansEU868, US915, AU915, AS923 and IN865
Internal battery19 Ah non-rechargeable lithium battery
External supply option12 VDC with suitable connection arrangement
ConfigurationBluetooth and compatible SenseCAP configuration application
Protection ratingIP66
Operating temperature−40 to +85 °C

The S2100 uses one selected acquisition mode at a time. For standard NiuBoL RS485 integration projects, plan one compatible RS485 sensor per S2100 node unless a different configuration has been specifically verified.

A multi-parameter sensor may provide several measurements through its own Modbus registers. This is different from connecting several independently addressed instruments to the same wireless node.

For complete hardware specifications, see the official SenseCAP S2100 documentation.

Important: The S2100 Battery Cannot Directly Power a 12 V Sensor

Many NiuBoL industrial sensors require a 12–24 VDC power supply.

The S2100 internal battery and its low-voltage sensor outputs cannot directly supply the required 12 V operating voltage to these instruments.

Where the selected NiuBoL sensor supports 12 VDC operation, use an appropriate external 12 V power supply for the sensor and S2100 connection arrangement.

For agricultural installations without mains electricity, a separately sized solar panel, rechargeable battery and charge controller may provide the external supply.

The S2100 internal battery is non-rechargeable. It should not be connected directly to a solar charging system. Its backup function also does not guarantee continued operation of an externally powered 12 V sensor when that external supply fails.

Refer to the official S2100 12 V RS485 sensor configuration guide for the external power and wiring arrangement.

Modbus protocol.png

Configure the LoRaWAN Node and Gateway Before Deployment

  1. Confirm that the selected sensor supports the required Modbus RTU acquisition settings.

  2. Connect the sensor to the S2100 RS485 interface with an appropriate power supply.

  3. Configure the sensor address, baud rate, register definitions and data conversion parameters.

  4. Select the regional LoRaWAN channel plan permitted at the installation location.

  5. Register the end device in the selected LoRaWAN network server using the appropriate activation configuration, such as OTAA.

  6. Configure the payload decoder and application-side measurement fields.

  7. Test the complete uplink and receiving-server integration before field installation.

The node and gateway must use compatible regional parameters. For example, a European EU868 network should use compatible EU868 device configurations.

Matching radio frequency alone does not establish LoRaWAN interoperability. Check network registration, device activation, payload format and server compatibility.

For background information on LoRaWAN network architecture and regional parameters, see the LoRa Alliance technical resources.

Actual wireless coverage depends on terrain, antenna position, vegetation, buildings and radio configuration. A nominal communication-distance specification is not a guarantee of coverage at every agricultural monitoring point.

4G or LoRaWAN: Which Architecture Is More Suitable?

Selection FactorDirect 4G GatewayLoRaWAN Nodes and Gateway
Sensor arrangementSeveral nearby sensors connected to a shared acquisition deviceDistributed measurement points using individual wireless nodes
Local communicationWired RS485 or other supported inputsShort sensor cable followed by a LoRaWAN radio link
Cellular subscriptionsTypically required for each independently connected cellular stationMay be shared through a cellular gateway backhaul
Reporting frequencySuitable for more frequent or larger data uploads, subject to configurationBest suited to compact periodic telemetry within network constraints
Power arrangementCentral station power supplyPower supply required at each node according to sensor requirements
Server integrationGateway software prepares and transfers application dataRequires network-server functions and payload decoding
Typical applicationAutomatic weather stations and centralized water monitoring sitesDistributed soil monitoring points and agricultural IoT networks

For a farm containing multiple independently irrigated blocks, LoRaWAN can provide an efficient way to connect distributed soil monitoring points to a shared receiving network.

For a complete weather station with wind, rainfall, temperature, humidity, radiation and soil sensors located close together, one industrial acquisition gateway may be more practical.

The TG462/TG462S is not a native LoRaWAN radio gateway. A separate LoRaWAN radio and network-server arrangement is required where LoRaWAN connectivity is specified.

Solution 3: Connect an Existing PLC or SCADA System to a Private Server

If an existing PLC already acquires the sensors correctly, replacing the local acquisition equipment may be unnecessary.

The PLC can remain responsible for sensor polling and measurement conversion, while an appropriate gateway or software interface transfers the selected data to the customer's server.

For a shared RS485 segment, avoid connecting a second independent Modbus master that polls the same sensors without a suitable coordination arrangement.

Identify which device performs register scaling, timestamping and data formatting. This prevents a measurement from being converted twice or assigned an incorrect acquisition time.

Where a customer requires Modbus TCP communication, a compatible Modbus gateway can provide access to supported serial devices through an appropriately configured network.

Modbus TCP connectivity is different from publishing named measurement records to an MQTT broker or posting JSON data to an HTTP endpoint.

MQTT vs HTTP for Private-Server Integration

MQTT and HTTP are both commonly used to transfer industrial sensor measurements to remote applications. The choice normally depends on the customer's existing software architecture.

Integration ItemMQTTHTTP/HTTPS
Communication methodPublish/subscribe messagingRequest/response communication
Data destinationMQTT broker and defined topicDefined server URL or API endpoint
Common ports1883 or 8883 with TLS80 or 443 for HTTPS
AuthenticationBroker credentials or supported certificate configurationAPI credentials, headers or other supported authentication methods
Data formatAgreed message payload, such as JSONAgreed request body and content type
Typical useIoT telemetry, distributed devices and multiple data subscribersWeb applications, existing REST APIs and server-side data ingestion

The listed ports are common conventions rather than mandatory settings. Use the actual broker or server configuration supplied by the customer.

Where TLS encryption or HTTPS is required, confirm support for the relevant certificates, authentication method and firmware configuration.

Support for HTTP in a gateway's networking stack does not automatically establish compatibility with every custom HTTPS API, authentication procedure or JSON structure. Endpoint-specific configuration or software development may be necessary.

Example MQTT and HTTP Data Formats for Soil Monitoring

Before configuring every monitoring station, agree on one sample message with the customer's software team.

For example, an agricultural monitoring application might expect soil moisture measurements containing station identity, sensor identity, depth, engineering unit and acquisition time.

Illustrative MQTT Topic

farm/01/station/03/soil

Illustrative JSON Payload

{
  "station_id": "farm01-station03",
  "sensor_id": "soil01",
  "measured_at": "2026-12-02T08:00:00Z",
  "record_id": "farm01-station03-000123",
  "measurements": [
    {
      "parameter": "soil_moisture",
      "depth_cm": 30,
      "value": 26.5,
      "unit": "%VWC",
      "quality": "valid"
    },
    {
      "parameter": "soil_temperature",
      "depth_cm": 30,
      "value": 21.8,
      "unit": "degC",
      "quality": "valid"
    }
  ]
}

The same agreed JSON structure could be published to an MQTT topic or submitted to a compatible HTTP endpoint.

Illustrative HTTP Request

POST /api/v1/measurements HTTP/1.1
Host: monitoring.example.com
Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN

These examples illustrate a possible customer-defined interface. They are not the fixed native message format of the TG462 or SenseCAP S2100, nor do they represent a live NiuBoL server endpoint.

For LoRaWAN applications, the initial radio payload may use a compact binary encoding. The application server can decode that payload and then prepare an appropriate MQTT or HTTP message.

LoRaWAN radio payloads and final application JSON records do not need to have identical formats.

How to Check the Complete Sensor-to-Cloud Data Path

A sensor may operate correctly while its value is displayed incorrectly on a remote platform. The problem can occur during Modbus decoding, gateway scaling, payload generation or server-side field mapping.

Integration StageConfiguration RequiredVerification Method
Sensor acquisitionPower, address, register definitions and numerical scalingCompare raw register values with decoded local measurements
Message preparationChannel names, measurement units, timestamps and station identifiersInspect an actual outgoing payload
Network transmissionServer address, authentication, security and retry behaviorConfirm receipt at the intended customer endpoint
Database and dashboardField mapping, duplicate handling and measurement identityRetrieve the same observation from the receiving application

If the gateway's local engineering value is correct but the private-server value is incorrect, investigate the outgoing payload and receiving parser before replacing the sensor.

Keep rainfall accumulation separate from interval rainfall, and preserve soil measurement depth when several soil layers are monitored. These details are part of measurement identity rather than optional display information.

What Happens When the 4G or LoRaWAN Connection Fails?

Network availability and measurement availability are different conditions.

A correctly powered sensor may continue operating during an Internet outage, but its observations will only remain available for later recovery if the acquisition system implements suitable local recording and retransmission functions.

The TG462 series provides hardware storage options. The actual retention period and automatic retransmission behavior depend on the configured software.

For LoRaWAN systems, do not assume that every end device or gateway automatically preserves all observations during a network failure.

Test the following conditions before deploying unattended monitoring stations:

  • Interrupt the upstream network while keeping the sensors and acquisition device powered.

  • Check whether local acquisition continues and whether measurements are retained.

  • Restore the connection and verify historical upload behavior.

  • Confirm that recovered records preserve their original measurement timestamps.

  • Test equipment restart separately to verify the persistence of stored records and settings.

MQTT delivery settings do not replace these checks. According to the OASIS MQTT specification, QoS 1 uses at-least-once delivery, meaning duplicate messages may occur.

The receiving application should use an appropriate record identifier or deduplication mechanism where repeated delivery is possible.

A retained MQTT message is not a historical data archive. Likewise, a successful HTTP response does not independently prove that every measurement was stored correctly.

Set MQTT Connection Parameters on Data Logger.png

Private Cloud Integration, Data Access and Security

Customers who operate their own IoT platforms may use compatible acquisition equipment to transmit sensor measurements directly to their own receiving infrastructure.

This allows the customer to implement application-specific dashboards, historical storage, data analysis and operational notifications without changing the underlying sensor measurement principle.

For a private-server project, use authenticated communication and appropriate encryption where required. Keep administrative access separate from normal telemetry transmission.

Do not expose an unprotected Modbus interface directly to the public Internet. Use a suitable authenticated network architecture or protected access arrangement.

The standard NiuBoL cloud platform supports viewing monitoring data. SMS and email alarm functions are not included.

Customers requiring automatic notifications, irrigation control, custom APIs or simultaneous transmission to multiple platforms should specify these functions separately. Their availability depends on the selected hardware, software configuration and receiving application.

For LoRaWAN Class A devices, downlink opportunities are associated with receive windows following uplink transmissions. Do not assume that the node provides immediate remote actuator control at any time.

Time-critical control and protective functions should remain within an appropriately engineered local control arrangement.

What Information Does NiuBoL Need to Configure Your IoT System?

A private-cloud integration quotation can be prepared more efficiently when both the sensor requirements and the receiving-server requirements are available.

  • Sensor models, quantities, power supply and communication interfaces.

  • Installation country and approximate distances between monitoring points.

  • Preferred communication method: direct 4G, Ethernet, Wi-Fi or LoRaWAN.

  • Existing LoRaWAN gateway, network server or industrial controller, where applicable.

  • MQTT broker address, port, topic and authentication requirements, or HTTP/HTTPS endpoint specification.

  • A sample of the expected application payload.

  • Required sensor acquisition and data reporting intervals.

  • Local recording, outage recovery and external notification requirements.

Provide test credentials through an appropriate secure channel during technical configuration. Avoid publishing production passwords, API tokens or LoRaWAN application keys in shared project documents.

Where the receiving system requires a custom parser, authentication process or data structure, identify that integration work separately from the hardware quotation.

For an existing agricultural IoT platform, industrial SCADA system or private cloud, NiuBoL can help select compatible RS485 sensors, LoRaWAN acquisition nodes and industrial data gateways according to the actual connection architecture.

Whether the project requires distributed soil monitoring through LoRaWAN or a complete weather station sending MQTT or HTTP data directly to a customer server, Contact NiuBoL with your sensor list and server requirements for equipment selection and integration assessment.

Related recommendations

Sensors & Weather Stations Catalog

Agriculture Sensors and Weather Stations Catalog-NiuBoL.pdf

Weather Stations Catalog-NiuBoL.pdf

Agriculture Sensors Catalog-NiuBoL.pdf

Water Quality Sensor Catalog-NiuBoL.pdf

Related products

Tell us your requirements, Let's discuss more about your project.we can do more.

Name*

Tel*

Email*

Company*

Country*

Message


online
Contacts
Email
Top
XRS485 Sensor to Cloud: LoRaWAN, MQTT and HTTP Integration Guide-Technical Support-Automatic Weather Stations_Industrial, Agricultural, Water & Environmental IoT Monitoring Solutions—NiuBoL

Screenshot, WhatsApp to identify the QR code

WhatsApp number:+8615367865107

(Click on WhatsApp to copy and add friends)

Open WhatsApp

The WhatsApp ID has been copied, please open WhatsApp to add consultation details!
WhatsApp