{
  "id": "vn.agritrace.soil-rs485-4in1-ec",
  "version": "1.0.0",
  "vendor": "generic",
  "category": "field-sensor",
  "description": "RS485 Modbus soil probe with an EC channel (moisture, temperature, pH, bulk EC): soil-rs485-4in1 1.0.0 plus the conductivity register it skipped, as a profile of its own so that devices registered with soil-rs485-4in1 keep the readings they were registered with. Onboarded by register map only, no driver code. The register map is the vendor's (registerMapSource); the driver has not been tested on this hardware yet.",
  "driver": "modbus-register-map",
  "connectivity": ["modbus-rtu"],
  "produces": [
    {"capability": "soil.moisture"},
    {"capability": "soil.temperature"},
    {"capability": "soil.ec_bulk"},
    {"capability": "soil.ph"}
  ],
  "events": ["observe"],
  "requires": [],
  "mobility": "fixed",
  "registerMapSource": {
    "vendor": "DFRobot",
    "model": "SEN0604 (RS485 4-in-1 soil moisture, temperature, pH and EC sensor)",
    "document": "https://wiki.dfrobot.com/sen0604/",
    "section": "ModBus-RTU communication protocol (article 20297 of the product wiki): register table and example",
    "retrieved": "2026-10-15",
    "verified": true,
    "testedOnHardware": false,
    "notes": "Read with function 03, factory address 1, 9600 baud. Register 0000H moisture and 0001H temperature are 'expanded 10 times' (temperature in two's complement when negative), 0002H conductivity in uS/cm (the example reads 03E8H as 1000 uS/cm, here scaled to mS/cm), 0003H pH 'expanded 10 times'. The document does not say whether the conductivity is bulk or pore-water EC; the probe measures the soil around its pins, so it maps to soil.ec_bulk."
  },
  "defaults": {
    "pollIntervalSeconds": 900,
    "baudrate": 9600,
    "unit": 1,
    "registers": [
      {"address": 0, "function": 3, "type": "u16", "capability": "soil.moisture", "scale": 0.1},
      {"address": 1, "function": 3, "type": "s16", "capability": "soil.temperature", "scale": 0.1},
      {"address": 2, "function": 3, "type": "u16", "capability": "soil.ec_bulk", "scale": 0.001},
      {"address": 3, "function": 3, "type": "u16", "capability": "soil.ph", "scale": 0.1}
    ]
  }
}
