Skip to content

Node-red TCP modbus request node for Sofar solar LSW-3 data logger

License

Notifications You must be signed in to change notification settings

serek4/node-red-sofar-ktl-x-request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node-red TCP modbus request node for Sofar solar LSW-3 data logger

tested on LSW-3 with serial number 17xxxxxxxx and firmware LSW3_14_FFFF_1.0.34
connected to sofar 4.4 KTL-X inverter.

modbus communication based on MichaluxPL/Sofar_LSW3 python script.

requirements

setup

  • import node-red subflow to node-red, you will get sofar KTL-X request node in subflow category.
  • input your logger IP address and serial number in node properties
    subflow properties
  • setup inject node to inject once after 1s and than repeat at interval you want to get data from inverter
    subflow example
  • decoded data from inverter will be on first output.
{
  "inverterStatus": "normal",
  "errors": [
    "ID02 - GridUVP(grid under voltage protection)",
    "ID04 - GridUFP(grid under frequency protection)"
  ],
  "PV": {
      "string1": {
          "voltage": 455.1,
          "current": 2.74,
          "power": 1240
      },
      "string2": {
          "voltage": 79.1,
          "current": 0,
          "power": 0
      }
  },
  "grid": {
      "activePower": 1180,
      "reactivePower": -0.63,
      "frequency": 49.99,
      "L1_V": 233,
      "L1_A": 1.97,
      "L2_V": 228.6,
      "L2_A": 1.97,
      "L3_V": 227.6,
      "L3_A": 1.96
  },
  "production": {
      "TotalEnergy": 6333,
      "TotalTime": 5856,
      "TodayEnergy": 9.67,
      "TodayTime": 576
  },
  "info": {
      "loggerTemp": 33,
      "inverterTemp": 47,
      "Vbus": 634.2,
      "PV1VCPU": 455.2,
      "PV1ACPU": 8.07,
      "countdownTime": 60,
      "inverterAlarmInfo": 0,
      "inputMode": "independent",
      "inverterInnerInfo": 0,
      "PV1insulationResistance": 1212,
      "PV2insulationResistance": 2263,
      "cathode_groundInsulationImpedance": 1856,
      "country": "Poland"
  },
  "loggerInfo": {
      "frameType": 2,
      "dataType": 1,
      "totalWorkingTime": 29545856,
      "powerOnTime": 674,
      "offsetTime": 1638195252,
      "totalOperationTime": 29545182
  },
  "timestamp": 1667741108
}
  • there is msg.debug property with additional frame info.
  • on second output are raw buffers sent to/from inverter.

data frame diagram

data frame diagram