{
 "manufacturer": "LOYTEC",
 "manufacturer_slug": "loytec",
 "model": "L-STAT network thermostat / room operating unit (Modbus RTU)",
 "model_slug": "l-stat",
 "short_model": "L-STAT",
 "aliases": [
  "L-STAT",
  "LSTAT-800",
  "LSTAT-801",
  "LSTAT-802",
  "LSTAT-800-Gx-Lx",
  "LSTAT-801-Gx-Lx",
  "LSTAT-802-Gx-Lx"
 ],
 "equipment_type": "Thermostat (room operating unit with sensors)",
 "applies_to": "LSTAT-800/801/802 room operating units (all button layouts), user manual version 3.2.8 (document 88085811).",
 "summary": "Wall-mounted room panel with LCD, touch buttons, temperature and humidity sensors (plus occupancy on the 801/802 and CO2 on the 802) that works as a Modbus RTU slave for a LOYTEC controller or any master. Everything is in holding registers: button and flag words, sensor readings, display values pushed by the master, set points with limits, offsets and configuration.",
 "transport": [
  "RTU"
 ],
 "defaults": {
  "unit_id": 1,
  "baud": 57600,
  "parity": "None",
  "data_bits": 8,
  "stop_bits": 2,
  "tcp_port": null
 },
 "addressing": {
  "convention": "0-based",
  "note": "Each register is printed with its decimal address and hex equivalent (e.g. 48 / 0x0030). The table starts at register address 0 (present_state, 0x0000), which only exists in 0-based protocol addressing, so these are the wire addresses. 'documented' keeps both forms."
 },
 "default_word_order": null,
 "firmware": null,
 "source": {
  "title": "L-STAT User Manual",
  "doc_number": "88085811, version 3.2.8",
  "revision_date": null,
  "url": "https://www.loytec.com/component/docman/doc_download/2159-l-stat-user-manual-3-2-4",
  "pages": "pp. 26-60 (Modbus chapter, register tables 8-42)"
 },
 "notes": [
  "The download link is named 3.2.4 but the document inside is printed as version 3.2.8.",
  "Only function codes 03 (read holding registers) and 06 (write single register) are supported, so multi-register values and strings must be read with FC03 and written one register at a time.",
  "Sensor scaling comes from the manual's value-scaling table: temperatures x0.1 in the configured Modbus unit system (factory default °C; K uses a -2740 offset, °F also x0.1), humidity raw x 0.005 %RH, CO2 1 ppm, voltage x0.1 V.",
  "Set points, set point min/max, display values and offsets are listed raw (scale 1) because their scale depends on the unit chosen in each value's configuration register (addresses 256-351); apply the manual's scaling table for that unit (e.g. °C x0.1, l/s x0.1, inWC x0.001).",
  "Only set_point_0..3, display_value_0..3 and offset_value_0 are listed; the full blocks are set_point 384-399, max 416-431, min 448-463, display values 64-79, offsets 480-488.",
  "Left out: system_time (112-113), Modbus statistics (128+) and firmware/bootloader dates, because the manual does not say which of the two 16-bit halves is the high word; CPU temperature/voltage (55-56), whose scaling is not given.",
  "Configuration and device-setting registers are stored in flash with limited write cycles; do not write them cyclically."
 ],
 "registers": [
  {
   "table": "holding_register",
   "address": 0,
   "documented": "0 (0x0000)",
   "name": "present_state",
   "description": "Live button and occupancy state (updated in DISPLAY and DIRECT_ACCESS modes).",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": {
    "0": "Touch button TB0",
    "1": "Touch button TB1",
    "2": "Touch button TB2",
    "3": "Touch button TB3",
    "4": "Touch button TB4",
    "5": "Touch button TB5",
    "6": "Touch button TB6",
    "7": "Touch button TB7",
    "8": "External button EB0",
    "9": "External button EB1",
    "10": "External button EB2",
    "11": "External button EB3",
    "12": "Occu - occupancy detected (801/802 models)"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 1,
   "documented": "1 (0x0001)",
   "name": "short_pressed",
   "description": "Latched short presses and flags; write 1 to a bit to clear it.",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": {
    "0": "Touch button TB0",
    "1": "Touch button TB1",
    "2": "Touch button TB2",
    "3": "Touch button TB3",
    "4": "Touch button TB4",
    "5": "Touch button TB5",
    "6": "Touch button TB6",
    "7": "Touch button TB7",
    "8": "External button EB0",
    "9": "External button EB1",
    "10": "External button EB2",
    "11": "External button EB3",
    "12": "Occu - occupancy detected",
    "13": "ENO - EnOcean frame received",
    "14": "NFC - NFC field detected",
    "15": "IRC - IR remote command received"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 2,
   "documented": "2 (0x0002)",
   "name": "long_pressed",
   "description": "Latched long presses and status flags; write 1 to clear.",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": {
    "0": "Touch button TB0",
    "1": "Touch button TB1",
    "2": "Touch button TB2",
    "3": "Touch button TB3",
    "4": "Touch button TB4",
    "5": "Touch button TB5",
    "6": "Touch button TB6",
    "7": "Touch button TB7",
    "8": "External button EB0",
    "9": "External button EB1",
    "10": "External button EB2",
    "11": "External button EB3",
    "12": "SPC - a set point was changed locally",
    "13": "DOC - device setting or offset changed locally",
    "14": "ERR - internal error",
    "15": "FD - booted with factory defaults"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 3,
   "documented": "3 (0x0003)",
   "name": "change_flags_set_points",
   "description": "Bit n set = set_point_n changed on the panel; write 1 to clear.",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": {
    "0": "set_point_0 changed",
    "1": "set_point_1 changed",
    "2": "set_point_2 changed",
    "3": "set_point_3 changed",
    "4": "set_point_4 changed",
    "5": "set_point_5 changed",
    "6": "set_point_6 changed",
    "7": "set_point_7 changed",
    "8": "set_point_8 changed",
    "9": "set_point_9 changed",
    "10": "set_point_10 changed",
    "11": "set_point_11 changed",
    "12": "set_point_12 changed",
    "13": "set_point_13 changed",
    "14": "set_point_14 changed",
    "15": "set_point_15 changed"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 4,
   "documented": "4 (0x0004)",
   "name": "change_flags_device_settings",
   "description": "Device setting changed locally; write 1 to clear.",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": {
    "0": "modbus_parameter (176)",
    "1": "pincode_system_administrator (177)",
    "2": "pincode_end_user (178)",
    "3": "lcd_color_red (179)",
    "4": "lcd_color_green (180)",
    "5": "lcd_color_blue (181)",
    "6": "lcd_brightness_contrast (182)",
    "7": "user_interface_settings (183)",
    "8": "display_unit (192)"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 5,
   "documented": "5 (0x0005)",
   "name": "change_flags_offset_values",
   "description": "Bit n set = offset_value_n changed; write 1 to clear.",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": {
    "0": "offset_value_0 changed",
    "1": "offset_value_1 changed",
    "2": "offset_value_2 changed",
    "3": "offset_value_3 changed",
    "4": "offset_value_4 changed",
    "5": "offset_value_5 changed",
    "6": "offset_value_6 changed",
    "7": "offset_value_7 changed",
    "8": "offset_value_8 changed"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 6,
   "documented": "6 (0x0006)",
   "name": "manual_occupancy",
   "description": "0 = unoccupied, any other value = occupied (external occupancy input).",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": {
    "0": "Unoccupied"
   },
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 32,
   "documented": "32 (0x0020)",
   "name": "ir_remote_control_command",
   "description": "High byte button code, low byte remote id of the last IR command.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 48,
   "documented": "48 (0x0030)",
   "name": "sensor_value_0 internal temperature",
   "description": "Assumes the default Modbus unit system °C (config_flags MU = 1).",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 0.1,
   "units": "°C",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 49,
   "documented": "49 (0x0031)",
   "name": "sensor_value_1 external temperature",
   "description": "Sensor wired to EB3 and GND; default MU = °C assumed.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 0.1,
   "units": "°C",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 50,
   "documented": "50 (0x0032)",
   "name": "sensor_value_2 relative humidity",
   "description": "Raw x 5 x 10^-3.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 0.005,
   "units": "%RH",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 51,
   "documented": "51 (0x0033)",
   "name": "sensor_value_3 dew point",
   "description": "Default MU = °C assumed.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 0.1,
   "units": "°C",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 53,
   "documented": "53 (0x0035)",
   "name": "sensor_value_5 amount CO2",
   "description": "LSTAT-802 models only.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "ppm",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 54,
   "documented": "54 (0x0036)",
   "name": "sensor_value_6 L-STAT supply voltage",
   "description": "",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 0.1,
   "units": "V",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 64,
   "documented": "64 (0x0040)",
   "name": "display_value_0",
   "description": "Value written by the master for display; scaling per its configuration (256+).",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 65,
   "documented": "65 (0x0041)",
   "name": "display_value_1",
   "description": "As display_value_0.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 66,
   "documented": "66 (0x0042)",
   "name": "display_value_2",
   "description": "As display_value_0.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 67,
   "documented": "67 (0x0043)",
   "name": "display_value_3",
   "description": "As display_value_0.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 176,
   "documented": "176 (0x00B0)",
   "name": "modbus_parameter",
   "description": "Bits 13-12 parity, 11-8 baud code, 7-0 slave address. Takes effect after reboot.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 192,
   "documented": "192 (0x00C0)",
   "name": "config_flags",
   "description": "Bits 9-8 MU Modbus unit (0 K, 1 °C, 2 °F); 11-10 display unit; bit 0 reboot.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 384,
   "documented": "384 (0x0180)",
   "name": "set_point_0",
   "description": "Signed; scaling follows the unit set in set point config (320+). Default 220.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 385,
   "documented": "385 (0x0181)",
   "name": "set_point_1",
   "description": "Signed; scaling follows its set point configuration.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 386,
   "documented": "386 (0x0182)",
   "name": "set_point_2",
   "description": "Signed; scaling follows its set point configuration.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 387,
   "documented": "387 (0x0183)",
   "name": "set_point_3",
   "description": "Signed; scaling follows its set point configuration.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 480,
   "documented": "480 (0x01E0)",
   "name": "offset_value_0",
   "description": "Offset added to its sensor value; same scaling as that sensor.",
   "data_type": "INT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 560,
   "documented": "560-569 (0x0230-0x0239)",
   "name": "product_code_string",
   "description": "Model / product code text.",
   "data_type": "STRING",
   "length": 10,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 576,
   "documented": "576-585 (0x0240-0x0249)",
   "name": "serial_number_string",
   "description": "",
   "data_type": "STRING",
   "length": 10,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 592,
   "documented": "592-595 (0x0250-0x0253)",
   "name": "firmware_version_string",
   "description": "",
   "data_type": "STRING",
   "length": 4,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  }
 ],
 "integration": {
  "summary": "Read the sensor block 48-54 with FC03 and the button/flag words 0-5; write display values (64+) and read back set points (384+) that the user adjusts. Clear latched flags by writing 1 to the bit.",
  "minimum_registers": [
   {
    "table": "holding_register",
    "address": 48,
    "why": "Room temperature"
   },
   {
    "table": "holding_register",
    "address": 50,
    "why": "Relative humidity"
   },
   {
    "table": "holding_register",
    "address": 53,
    "why": "CO2 (802 only)"
   },
   {
    "table": "holding_register",
    "address": 384,
    "why": "Main set point"
   },
   {
    "table": "holding_register",
    "address": 3,
    "why": "Which set points the user changed"
   },
   {
    "table": "holding_register",
    "address": 1,
    "why": "Button presses / occupancy"
   }
  ],
  "enable": "No enable step; the panel answers as a slave at address 1 out of the box. Change address/baud/parity in EDIT mode on the panel or in modbus_parameter (176), then reboot.",
  "watchdog": null,
  "quirks": [
   "Only FC03 and FC06: no FC16 multi-register writes.",
   "Temperatures follow the Modbus unit flag (K, °C or °F) in config_flags, not the display unit.",
   "Latched press and change flags stay set until the master writes 1 to them."
  ],
  "setup": [
   "Factory default: address 1, 57600 baud, no parity, 2 stop bits.",
   "Built-in 120 ohm terminator: switch it on only at the last device on the bus.",
   "Up to 16 L-STATs per LOYTEC controller; each needs a unique address."
  ],
  "gotchas": [
   "The device has no clock battery: the master must set system time after every reboot.",
   "Display range is -999..9999; larger values are shown shifted."
  ]
 },
 "page": "https://easymodbus.com/modbus-register-maps/loytec/l-stat",
 "address_note": "address = 0-based Modbus wire (PDU) address; documented = as printed in the source.",
 "note": "Re-typed from the manufacturer's public documentation (see source) and verified against it. Registers vary by firmware and options; verify against the live device before writing."
}
