> For the complete documentation index, see [llms.txt](https://kb.linknlink.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.linknlink.com/kb/smart-home-devices/eremote/ble-sensor-modbus-ha.md).

# BLE sensor: modbus - HA

**1. Update firmware of eRemote**\
Go to the device page, click on the "..." menu > "Settings" > "Firmware Update" > "URL", then paste the following URL:  <http://eufirmware.linklinkiot.com/firmware/eRemote-60868-8720-BL-3330.upd.bin>

**2. Configure `configuration.yaml` File in Home Assistant**

* **Step 1: Configure the Main Modbus Integration**\
  Find eRemote IP in eRemote App page, select top right ..., choose modbus, then you can see the IP of eRemote, you need to provide the **IP address** and **port** of your eRemote:

  ```yaml
  modbus:
    - name: "modbus_tcp"
      type: tcp
      host: 192.168.1.100  # Replace with your eRemote's IP address
      port: 502            # Default port for Modbus TCP
  ```
* **Step 2: Configure Sensors**

  Under the `modbus` integration, define the sensors you wish to read. Each sensor needs to specify the **register address**, **input type** (e.g., `holding` or `input`), **data type** (e.g., `int16`, `uint16`, etc.), and optional settings such as **unit of measurement**, **precision**, and **scale**.

  Here’s tabel configuration for multiple sensors excel download url:\
  <https://docs.google.com/spreadsheets/d/1VPKUUr-IxFr8NOj_vTzm4ZTsAf2Hla2T/edit?usp=sharing&ouid=117827812234970938974&rtpof=true&sd=true>
* Here's an example configuration for multiple sensors:

```

modbus:
  - name: "modbus_tcp"
    type: tcp
    host: 192.168.115.122       # change to eRemote IP
    port: 502

    sensors:
 # First TH Sensor 
      - name: "Temp001"
        unique_id: modbus_sensor_temperature001
        device_class: temperature
        state_class: measurement
        slave: 1
        address: 3008
        input_type: holding
        data_type: int16
        scale: 0.01
        precision: 1
        unit_of_measurement: '°C'
        scan_interval: 30

      - name: "humidity001"
        unique_id: modbus_sensor_humidity001
        device_class: humidity
        state_class: measurement
        slave: 1
        address: 3009
        input_type: holding
        data_type: int16
        scale: 0.01
        precision: 1
        unit_of_measurement: '%'
        scan_interval: 35

      - name: "th_battery001"
        unique_id: modbus_sensor_th_battery001
        device_class: power
        slave: 1
        address: 3010
        input_type: holding
        data_type: int16
        unit_of_measurement: '%'
        scan_interval: 40

      - name: "th_status001"
        unique_id: modbus_sensor_th_status001
        slave: 1
        address: 3012
        input_type: holding
        data_type: int16
        scan_interval: 60

 # Second TH Sensor
      - name: "Temp002"
        unique_id: "modbus_sensor_temperature002"
        device_class: temperature
        state_class: measurement
        slave: 1
        address: 3021
        input_type: holding
        data_type: int16
        scale: 0.01
        precision: 1
        unit_of_measurement: "°C"
        scan_interval: 30

      - name: "humidity002"
        unique_id: "modbus_sensor_humidity002"
        device_class: humidity
        state_class: measurement
        slave: 1
        address: 3022
        input_type: holding
        data_type: int16
        scale: 0.01
        precision: 1
        unit_of_measurement: "%"
        scan_interval: 35

      - name: "th_battery002"
        unique_id: "modbus_sensor_th_battery002"
        device_class: power
        slave: 1
        address: 3023
        input_type: holding
        data_type: int16
        unit_of_measurement: "%"
        scan_interval: 40

      - name: "th_status002"
        unique_id: "modbus_sensor_th_status002"
        slave: 1
        address: 3025
        input_type: holding
        data_type: int16
        scan_interval: 60

# First Door Sensor
      - name: "door_battery001"
        unique_id: "modbus_sensor_door_battery001"
        device_class: power
        slave: 1
        address: 3309
        input_type: holding
        data_type: int16
        unit_of_measurement: "%"
        scan_interval: 40

      - name: "door_status001"
        unique_id: "modbus_sensor_door_status001"
        slave: 1
        address: 3311
        input_type: holding
        data_type: int16
        scan_interval: 60

# Second Door Sensor
      - name: "door_battery002"
        unique_id: "modbus_sensor_door_battery002"
        device_class: power
        slave: 1
        address: 3321
        input_type: holding
        data_type: int16
        unit_of_measurement: "%"
        scan_interval: 40

      - name: "door_status002"
        unique_id: "modbus_sensor_door_status002"
        slave: 1
        address: 3323
        input_type: holding
        data_type: int16
        scan_interval: 60
        
    binary_sensors:
# First Door Sensor
      - name: "door001"
        unique_id: "modbus_sensor_door001"
        device_class: door
        slave: 1
        address: 3308
        input_type: holding
        scan_interval: 1

# Second Door Sensor
      - name: "door002"
        unique_id: "modbus_sensor_door002"
        device_class: door
        slave: 1
        address: 3320
        input_type: holding
        scan_interval: 1

```

#### **3. Restart Home Assistant**

After configuring the Modbus integration, save the `configuration.yaml` file and restart Home Assistant.

#### **4. Use Sensor Data**

Once the sensors are successfully reading data, you can use them for various purposes in Home Assistant, such as:

* Displaying the data on a dashboard (Lovelace).
* Triggering automations based on sensor values (e.g., turning on a fan if the temperature exceeds a certain value).
