{
  "spec_version": 1,
  "slug": "dfrobot-sen0604",
  "manufacturer": "DFRobot",
  "model": "RS485 4-in-1 Soil Moisture, Temperature, pH & EC Sensor (SEN0604)",
  "category": "Sensor",
  "supplier_url": "https://wiki.dfrobot.com/sen0604/",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 1,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst",
    "native_interface": "rs485",
    "serial": {
      "parity": "None",
      "baud_rate": 9600,
      "data_bits": 8,
      "stop_bits": 1
    }
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 0,
      "count": 1,
      "name": "Moisture content",
      "data_type": "UInt16",
      "units": "%",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Soil moisture, expanded 10 times in the register (658 returned = 65.8 %RH)."
    },
    {
      "address": 1,
      "count": 1,
      "name": "Temperature",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Soil temperature, expanded 10 times; two's complement for negative values (0xFF9B returned = -10.1 °C)."
    },
    {
      "address": 2,
      "count": 1,
      "name": "Conductivity",
      "data_type": "UInt16",
      "units": "µS/cm",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Electrical conductivity; the document's example returns 0x03E8 = 1000 µS/cm, i.e. no scaling."
    },
    {
      "address": 3,
      "count": 1,
      "name": "pH value",
      "data_type": "UInt16",
      "units": "pH",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "pH, expanded 10 times (0x0038 returned = 5.6 pH)."
    },
    {
      "address": 7,
      "count": 1,
      "name": "Salinity",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Salinity real-time value. The document marks it 'for reference only' and states neither a unit nor a scaling factor, so the raw register is reported unchanged."
    },
    {
      "address": 8,
      "count": 1,
      "name": "Total dissolved solids (TDS)",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "TDS real-time value. The document marks it 'for reference only' and states neither a unit nor a scaling factor, so the raw register is reported unchanged."
    },
    {
      "address": 34,
      "count": 1,
      "name": "Conductivity temperature coefficient",
      "data_type": "UInt16",
      "units": "%/°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "RW",
      "description": "0...100 corresponds to 0.0...10.0 %, default 0.0 %."
    },
    {
      "address": 35,
      "count": 1,
      "name": "Salinity coefficient",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "RW",
      "description": "0...100 corresponds to 0.00...1.00, default 55 (0.55)."
    },
    {
      "address": 36,
      "count": 1,
      "name": "TDS coefficient",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "RW",
      "description": "0...100 corresponds to 0.00...1.00, default 50 (0.5)."
    },
    {
      "address": 80,
      "count": 1,
      "name": "Temperature calibration value",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "RW",
      "description": "Integer expanded 10 times, i.e. 0.1 °C resolution."
    },
    {
      "address": 81,
      "count": 1,
      "name": "Water content calibration value",
      "data_type": "Int16",
      "units": "%",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "RW",
      "description": "Integer expanded 10 times, i.e. 0.1 % resolution."
    },
    {
      "address": 82,
      "count": 1,
      "name": "Conductivity calibration value",
      "data_type": "UInt16",
      "units": "µS/cm",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Integer in the conductivity unit; the document states no scaling."
    },
    {
      "address": 83,
      "count": 1,
      "name": "pH calibration value",
      "data_type": "UInt16",
      "units": "pH",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Integer; the document states no scaling for this register (the live pH register is expanded 10 times)."
    },
    {
      "address": 2000,
      "count": 1,
      "name": "Device address (slave ID)",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "1...254, factory default 1."
    },
    {
      "address": 2001,
      "count": 1,
      "name": "Device baud rate",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = 2400, 1 = 4800, 2 = 9600 bps. Factory default 2 (9600 bps)."
    }
  ],
  "combined_registers": [],
  "notes": "Source: DFRobot Wiki page 'RS485 4-in-1 Soil Moisture, Temperature, pH & EC Sensor (SKU: SEN0604)', reference article 'SEN0604 Sensor Reference: API, Protocol & Pinout', at the vendor URL above (read 7 Nov 2026). Factory communication settings from section 1 'Basic communication parameters': RS485, 8 data bits, no parity, 1 stop bit, CRC, default baud rate 9600 bit/s; section 2 gives the factory default address 0x01. Addressing: the register table prints the hex register address (0000H) next to its PLC reference (40001), and the worked example reads function code 0x03 from register 0x0000 with a length of 4 and receives moisture, temperature, EC and pH, so the hex numbers are stored unchanged as zero-based wire addresses. Every row is read and the configuration rows are written with the same function code 0x03/0x06 pair. Scaling follows the document's own examples: moisture, temperature and pH are expanded 10 times (0.1 resolution), conductivity is unscaled in µS/cm. Salinity (0007H) and TDS (0008H) are marked 'for reference only' and have neither a unit nor a scaling factor, so they are stored raw. The conductivity temperature coefficient, salinity coefficient and TDS coefficient registers (0022H-0024H) are normalised to their engineering values from the document's own '0-100 corresponds to' statements. The four calibration registers (0050H-0053H) are included as write targets; the pH and conductivity calibration rows carry no scaling in the document."
}
