> For the complete documentation index, see [llms.txt](https://help.aranet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aranet.com/base-stations/base-stations/integrations-and-3rd-party-systems/modbus/requesting-data-from-aranet-pro-modbus-tcp-ip-server.md).

# Requesting data from Aranet PRO Modbus TCP/IP server

Important notes for the client side:

| Parameter            | Value                                                                                              |
| -------------------- | -------------------------------------------------------------------------------------------------- |
| Register size        | 16 bits                                                                                            |
| Unit ID (slave ID)   | 1 (not changeable)                                                                                 |
| Supported functions  | Read discrete inputs (code: 2), read input registers (code: 4)                                     |
| Supported data types | Discrete inputs, input registers (any address in the supported range of 0—65535)                   |
| Endianness           | Big-endian with high word first (high byte first or high word first for 2 registers/32-bit values) |

### Used Modbus TCP exceptions

* Unsupported function requested → ILLEGAL\_FUNCTION.
* Unavailable registry address requested → ILLEGAL\_DATA\_ADDRESS. This exception is also sent if a particular address is colliding with any other registry address.
* Uninitialized registry address requested → ILLEGAL\_DATA\_VALUE. The address exists, but valid data of measurement has not been assigned yet.

### Custom address-to-measurements mapping: Input registers

Below is an example of an uploaded custom address-to-measurements mapping configuration JSON file used for input registers (example with three 2×16-bit wide registries):

```json
{ 
  "inputRegisters": {
    "1056849": {
      "battCharge": { // Registry address: 30044
        "dataType": "int32",
        "multiplier": 100,
        "offset": 4
      },
      "offset": 40,
      "rssi": { // Registry address: 30046
        "dataType": "int32",
        "multiplier": 1,
        "offset": 6
      },
      "time": { // Registry address: 30048
        "dataType": "uint32",
        "multiplier": 1,
        "offset": 8
      }
    },
    "offset": 30000
  }
}
```

Representation in a Modbus client application is shown in Fig. 3.

<figure><img src="/files/wsbzRPTAXmgGcTUhX2xF" alt=""><figcaption></figcaption></figure>

<p align="center">Figure 3: Modbus client application view with an example configuration</p>

### Custom address-to-measurements mapping: Discrete inputs

Example of uploaded custom mapping configuration for Discrete inputs:

```json
"discreteInputs": {
  "4196581": {
    "offset": 20,
    "rssiAlarm": { // Registry address: 10020
      "dataType": "bit",
      "multiplier": 1,
      "offset": 1
    }
  },
  "6292285": {
    "offset": 20,
    "rssiAlarm": { // Registry address: 10021
      "dataType": "bit",
      "multiplier": 1,
      "offset": 0
    }
  },
  "offset": 10000
}
```

<figure><img src="/files/fIcuano27gA0AYsl867a" alt=""><figcaption></figcaption></figure>

<p align="center">Figure 4: Modbus client application view with an example configuration</p>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aranet.com/base-stations/base-stations/integrations-and-3rd-party-systems/modbus/requesting-data-from-aranet-pro-modbus-tcp-ip-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
