XY XY-MD02 Modbus register map
RS485 temperature and humidity transmitter with an SHT20 sensor, Modbus RTU
- Verified
- 6 registers
- Modbus RTU
- Revision 2 · 2026-11-08
Verified: Tested on a real device.
Communication
- Protocol
- Modbus RTU
- Unit ID
- 1
- Serial
- 9600 8N1 · 9600 baud, 8 data bits, none parity, 1 stop bit
- Byte / word order
- ABCD · bytes big-endian, words high first default
- Addresses
- 0-based
Connection values are defaults: the device may be configured differently.
Map
- Registers
- 4 holding registers, 2 input registers
- Groups
- 2
- Revision
- 2 · 2026-11-08
- Added
- ()
- File
- maps/xy/xy-md02.mbmap.json · 4 KB · history
- SHA-256
- 740fbc5a2b323a72bf92d164bc7325963316de36b6ba6647dbd4ed383dc0311f
Sources and notes
- XY-MD02 Modbus RTU RS485 SHT20 Temperature Humidity Transmitter manual Modbus protocol tables and examples
- Test report on an XY-MD02 · 2026-11-08 baud rate encoding, correction scale and stop bits
Source: XY-MD02 Modbus RTU RS485 SHT20 Temperature Humidity Transmitter manual
- Function codes 0x03, 0x04, 0x06 and 0x10. Temperature and humidity are input registers (FC04); the settings are holding registers (FC03 read, FC06 or FC10 write).
- Addresses are the ones in the manual's frames: temperature is read from address 0x0001 (frame 01 04 00 01 00 01).
- The baud rate register holds the rate itself in bit/s (9600 reads 9600), as in the manual's write example; the 0/1/2 codes in the manual's register table are wrong.
- The temperature correction is in tenths of a degree: writing 10 raised the reading by about 1 °C. The humidity correction was not tested and is taken to work the same way. The manual's range of -10 to 10 is therefore -100 to 100 on the wire.
- Factory defaults: 9600 bit/s, 8N1, address 1. The device uses 1 stop bit, but it also answers a master set to 2.
- A new address or baud rate applies only after the device is powered off and on again.
- Tested on an XY-MD02, firmware not shown, November 2026: temperature (including -1.8 °C, read as 0xFFEE), humidity, the address and baud rate registers, the serial settings and the temperature correction. The humidity correction was not tested.
| Area | Address | Name | Type | Access | Unit | Scale | Description |
|---|---|---|---|---|---|---|---|
| IR | 1 | int16 | R | °C | ×0.1 | Signed value in tenths of a degree (0x0131 is 30.5 °C, 0xFF33 is -20.5 °C) | |
| IR | 2 | uint16 | R | %RH | ×0.1 | Relative humidity in tenths of a percent (0x0222 is 54.6 %RH) | |
| HR | 257 | uint16 | RW | Modbus slave address, default 1. Applies after a power cycle | |||
| HR | 258 | uint16 | RW | bit/s | The rate itself, for example 9600 or 19200. Applies after a power cycle | ||
| HR | 259 | int16 | RW | °C | ×0.1 | Added to the measured temperature, in steps of 0.1 °C | |
| HR | 260 | int16 | RW | %RH | ×0.1 | Added to the measured humidity, in steps of 0.1 %RH |
No registers match
Try part of the name, an address (decimal or 0x hex) or clear the filters.
Help improve this map
- I tested it on a deviceReport whether it worked, even if you did not write the map.
- Suggest a correctionEdit the file on GitHub; it opens a pull request.
- Report a problemA wrong address, type, scale or byte order.
- Read the formatWhat each key of the file means (SPEC.md).