EmsTechLabs Logo EmsTechLabs

Master Modbus Register 1: Slave DHT22 Temperature

Technical documentation for Modbus register 1 on Master. Data type: FP32. Includes Python and YAML configuration examples.

January 16, 2026 1 min read

Technical Definition

The register Slave DHT22 Temperature at address 1 is used to monitor slave dht22 Temperature on the Master.

  • Protocol: Modbus RTU
  • Data Type: FP32
  • Unit: °C
  • Access: Read Only

How to Read (Python pymodbus)

Use this code snippet to read this specific value via RS485:

from pymodbus.client.sync import ModbusSerialClient

client = ModbusSerialClient(method='rtu', port='/dev/ttyUSB0', baudrate=9600)
client.connect()

# Read Slave DHT22 Temperature (Address: 1)
# Note: Check if your device uses 0-based or 1-based addressing
result = client.read_input_registers(address=1, count=2, unit=1)

if not result.isError():
    print(f"Raw Value: {result.registers}")
else:
    print("Error reading register")

client.close()

Integration (Home Assistant)

Paste this into your configuration.yaml:

- platform: modbus_controller
  name: "Slave DHT22 Temperature"
  address: 1
  value_type: FP32
  unit_of_measurement: "°C"

Connection Diagram

Here is the standard RS485 wiring for this configuration:

graph TD
    PLC[Host Controller / Home Assistant]
    Device[Master]

    PLC -- "A+ (D+)" --> Device
    PLC -- "B- (D-)" --> Device
    PLC -- GND --> Device


💡 Engineer's Insight

Analysis: Temperature reading from a remote DHT22 sensor, usually in degrees Celsius (°C). Used for ambient or specific area monitoring.

Troubleshooting: A value of 0 or an error code indicates sensor failure, loss of communication with the slave device, or extreme Temperature outside sensor range.