{
  "spec_version": 1,
  "slug": "smartfox-pro-em2",
  "manufacturer": "SMARTFOX",
  "model": "SMARTFOX Pro / SMARTFOX Pro 2 energy manager (register list EM2)",
  "category": "Energy manager",
  "supplier_url": "https://smartfox.at/en/downloads/anleitungen/",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 1,
    "addressing": "one_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst"
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 40010,
      "count": 2,
      "name": "SW-Version",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Software version."
    },
    {
      "address": 40012,
      "count": 2,
      "name": "Wi-Fi module software version",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40017,
      "count": 1,
      "name": "Modbus protocol version",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40401,
      "count": 1,
      "name": "Analog output U control setpoint",
      "data_type": "UInt16",
      "units": "%",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "RW",
      "description": "Writable; raw 0-1000 = 0-100.0 %. Control must first be enabled in register 40400 (uint8, not representable here)."
    },
    {
      "address": 40402,
      "count": 1,
      "name": "Analog output I control setpoint",
      "data_type": "UInt16",
      "units": "%",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "RW",
      "description": "Writable; raw 0-1000 = 0-100.0 %."
    },
    {
      "address": 41012,
      "count": 2,
      "name": "Energy drawn from grid, current day",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41014,
      "count": 2,
      "name": "Energy fed into grid, current day",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41016,
      "count": 2,
      "name": "Energy produced, current day",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SMARTFOX's own PV production counter for the current day."
    },
    {
      "address": 41018,
      "count": 2,
      "name": "Power, total (grid connection point)",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Positive = drawing from the grid, negative = feeding in."
    },
    {
      "address": 41020,
      "count": 2,
      "name": "Power L1",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41022,
      "count": 2,
      "name": "Power L2",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41024,
      "count": 2,
      "name": "Power L3",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41026,
      "count": 1,
      "name": "Voltage L1",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41027,
      "count": 1,
      "name": "Voltage L2",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41028,
      "count": 1,
      "name": "Voltage L3",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41029,
      "count": 2,
      "name": "Current L1",
      "data_type": "UInt32",
      "units": "mA",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "The device reports mA."
    },
    {
      "address": 41031,
      "count": 2,
      "name": "Current L2",
      "data_type": "UInt32",
      "units": "mA",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "The device reports mA."
    },
    {
      "address": 41033,
      "count": 2,
      "name": "Current L3",
      "data_type": "UInt32",
      "units": "mA",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "The device reports mA."
    },
    {
      "address": 41035,
      "count": 1,
      "name": "Power factor L1",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41036,
      "count": 1,
      "name": "Power factor L2",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41037,
      "count": 1,
      "name": "Power factor L3",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41038,
      "count": 1,
      "name": "Grid frequency",
      "data_type": "UInt16",
      "units": "Hz",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "The register list prints the scale 0.01 but names no unit for this row; Hz is the unit of a grid frequency."
    },
    {
      "address": 41039,
      "count": 1,
      "name": "PT1000 temperature",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Sensor input for a PT1000 probe."
    },
    {
      "address": 41040,
      "count": 2,
      "name": "S0 pulse input counter",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "S0 input counter (unit not stated in the register list)."
    },
    {
      "address": 41042,
      "count": 2,
      "name": "Power, own production",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SMARTFOX's own PV production."
    },
    {
      "address": 41044,
      "count": 1,
      "name": "24 V control voltage",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41400,
      "count": 2,
      "name": "Frequency converter 1 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "PV inverter 1."
    },
    {
      "address": 41406,
      "count": 2,
      "name": "Frequency converter 2 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "PV inverter 2."
    },
    {
      "address": 41412,
      "count": 2,
      "name": "Frequency converter 3 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "PV inverter 3."
    },
    {
      "address": 41418,
      "count": 2,
      "name": "Frequency converter 4 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "PV inverter 4."
    },
    {
      "address": 41424,
      "count": 2,
      "name": "Frequency converter 5 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "PV inverter 5."
    },
    {
      "address": 41430,
      "count": 1,
      "name": "Battery 1 state of charge",
      "data_type": "Int16",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41431,
      "count": 2,
      "name": "Battery 1 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41440,
      "count": 1,
      "name": "Battery 2 state of charge",
      "data_type": "Int16",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41450,
      "count": 1,
      "name": "Battery 3 state of charge",
      "data_type": "Int16",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41451,
      "count": 2,
      "name": "Battery 3 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41500,
      "count": 2,
      "name": "Heat pump 1 power",
      "data_type": "Float32",
      "units": "kW",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41502,
      "count": 2,
      "name": "Heat pump 1 energy",
      "data_type": "Float32",
      "units": "kWh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41504,
      "count": 2,
      "name": "Heat pump 1 thermal power",
      "data_type": "Float32",
      "units": "kW",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41508,
      "count": 2,
      "name": "Heat pump 1 buffer temperature, hot side",
      "data_type": "Float32",
      "units": "°C",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41510,
      "count": 2,
      "name": "Heat pump 1 buffer temperature, cold side",
      "data_type": "Float32",
      "units": "°C",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41512,
      "count": 2,
      "name": "Heat pump 1 domestic hot water temperature",
      "data_type": "Float32",
      "units": "°C",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41514,
      "count": 2,
      "name": "Heat pump 1 outdoor temperature",
      "data_type": "Float32",
      "units": "°C",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41604,
      "count": 2,
      "name": "EV charge point 1 session energy",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41606,
      "count": 2,
      "name": "EV charge point 1 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41614,
      "count": 2,
      "name": "EV charge point 2 session energy",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41616,
      "count": 2,
      "name": "EV charge point 2 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41624,
      "count": 2,
      "name": "EV charge point 3 session energy",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41626,
      "count": 2,
      "name": "EV charge point 3 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41634,
      "count": 2,
      "name": "EV charge point 4 session energy",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41636,
      "count": 2,
      "name": "EV charge point 4 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41644,
      "count": 2,
      "name": "EV charge point 5 session energy",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41646,
      "count": 2,
      "name": "EV charge point 5 power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41700,
      "count": 2,
      "name": "External meter 1 S0 counter",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41702,
      "count": 2,
      "name": "External meter 2 S0 counter",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41704,
      "count": 2,
      "name": "External meter 3 S0 counter",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41706,
      "count": 2,
      "name": "External meter 4 S0 counter",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41708,
      "count": 2,
      "name": "External meter 5 S0 counter",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41710,
      "count": 2,
      "name": "External meter 1 power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Writable: the meter value can be fed in over Modbus."
    },
    {
      "address": 41716,
      "count": 2,
      "name": "External meter 2 power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Writable."
    },
    {
      "address": 41722,
      "count": 2,
      "name": "External meter 3 power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Writable."
    },
    {
      "address": 41728,
      "count": 2,
      "name": "External meter 4 power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Writable."
    },
    {
      "address": 41734,
      "count": 2,
      "name": "External meter 5 power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Writable."
    }
  ],
  "combined_registers": [],
  "notes": "Source: SMARTFOX GmbH \"Modbus-Register SMARTFOX Pro / SMARTFOX Pro 2\", register list v22e (00.01.03.10), vendor-hosted spreadsheet https://smartfox.at/wp-content/uploads/2022/12/Modbus-Register-SMARTFOX-Pro-SMARTFOX-Pro-2-v22e-00.01.03.10.xlsx, sheet \"Register EM2 00.01.03.10\" (Start/End/Size/RW/Function codes/Name/Type/Units/Scale Factor). The workbook's \"Config\" tab gives the factory settings: Modbus TCP on port 502 to the LAN address, and on RS-485 unit 1, 9600 bps, parity none, 1 stop bit (LAN path used here, so no serial block; 1 is the address on both paths). The sheet's Start numbers are 4xxxx register numbers and the workbook's own 'Config' tab gives the device's address offset as -1, so Start number N is read at wire address N-1 (Start 40010 at 40009, Start 41038 at 41037); they are the vendor's own register numbers, not Modicon 4x references counted from 40001. They are stored as printed with addressing one_based, so a client's subtract-one step lands exactly on that wire address. Omitted because the app has no matching type: all 64-bit counters (41000-41011, 41402-41427, 41600-41643, 41712-41759), the uint8 control surface (40400-40406, 41608/41609, 42207/42208, 42250-42340, 42561/42562), MAC blocks 40014/40018, int8 RSSI 41046 and 41048 (declared uint16, spans two registers). Battery 2 power is omitted deliberately: the sheet prints 41150, but the community smartfox-modbus library (github.com/sim-san/smartfox-modbus, README \"Known datasheet corrections\") says reading 41150 desynchronises the link and the value is at 41441; battery 2 state of charge (41440) is kept. Heat pump thermal energy 41506 is omitted: the sheet says \"double\" but only two registers fit before 41508 and the same library reports a float32. WLAN polling is not supported - use the LAN interface."
}
