Skip to content

API Reference

faanskit edited this page Mar 23, 2023 · 20 revisions

Legend

  • * - reqiured
  • ? - unknown or unsure
  • x-precision - How many digits after the radix are appended to the value; divide int by 10^x to get the correct float (eg. single-precision 309 is 30.9, double-precision 4993 is 49.93)

Available scripts

  • GET /wlanget.cgi - get WLAN details

    Query strings:

    • info*

      Values:

      • 1 - AP mode details for configuration

        JSON keys:

        • mode - mode for which details are given ("mode": "AP")
        • sid - SSID
        • psw - Wi-Fi password (should be the same as registration key)
        • ip - ip of the stick
      • 2 - STATION (router) mode details for local access

        JSON keys:

        • mode - mode for which details are given ("mode": "STATION")
        • sid - SSID
        • shr - Signal strength (zero-precision, dBm)
        • ip - ip of the stick
        • gtw - gateway
        • msk - network mask
      • 3 - STATION (router) mode cut-down details for local access

        JSON keys:

        • mode - mode for which details are given ("mode": "STATION")
        • ip - ip of the stick
        • gtw - gateway
        • msk - network mask
      • 4 - Wi-Fi networks scan

        JSON keys:

        • num - number of available Wi-Fi networks

        • wif - list of available networks

          JSON keys:

          • sid - SSID
          • shr - Signal strength (zero-precision, dBm)

  • GET /getdev.cgi - get device details

    Query strings:

    • device

      Values:

      • 0 (default) - the Wi-Fi stick

        JSON keys:

        • psn - Part serial number
        • key - Registration code
        • typ - type of sth?
        • nam - Name of the device
        • mod - Part number
        • muf - Manufacturer
        • brd - board manufacturer?
        • hw - Hardware version
        • sw - Software version
        • wsw - Wireless software version? (value is the pn of the mcu, the alternative being diff mcu or the 4g chip?)
        • tim - Current timestamp
        • pdk - ?
        • ser - serial?
        • protocol - Protocol revision
        • host - Remote host prefix? (Assuming it's a subdomain of the Aiswei's cloud domnain)
        • port - Remote port
        • status - Connection status?
      • 1 - ?; request timeouts

      • 2 - Inverter information

        JSON keys:

        • num - Number of inverters?

        • inv - List of inverters attached to the dongle

          JSON keys:

          • isn - Serial number of inverter. Required for /getdevdata.cgi
          • add - Modbus address of the inverter
          • safety - ?
          • rate - ?
          • msw - Master Software Version
          • ssw - Slave Software Version
          • tsw - Security Software Version
          • pac - Current real power of AC output (double-precision?, W)
          • eto - Energy produced total (single-precision, kWh)
          • etd - Energy produced today (single-precision, kWh)
          • err - Errors thrown by the inverter
          • cmv - cm version?
          • mty - ?
      • 3 - System information

        JSON keys:

        • mod - ?
        • enb - enabled?
        • exp_m - ?
        • regulate - ?
        • target_PF - target power factor the inverter will try to match (single-precision?, unitless)
        • abs - ?
        • abs_offset - ?
        • total_pac - Current total real power of AC output? (double-precision?, W)
        • total_fac - Current total frequency AC? (double-precision?, Hz)
        • meter_pac - ?
      • 4 - ?

      • 5 and bigger - the Wi-Fi stick (same as 0)


  • GET /getdevdata.cgi - get data served by device

    Query strings:

    • sn*

      Values:

      • Value picked from /getdev.cgi?device=2 isn parameter
  • device*

    Values:

    • 2 - inverters

      JSON keys:

      • flg - flag?
      • tim - Time and date, (e.g. 20230316115346 is 2023-03-01 11:53:46)
      • tmp - Temperature (single-precision, °C?)
      • fac - Frequency AC (double-precision, Hz)
      • pac - Current real power of AC output (double-precision, W)
      • sac - Apparent Power of AC output (double-precision, VA)
      • qac - Reactive/Complex Power AC (double-precision, VAR)
      • eto - Energy produced total (single-precision, kWh)
      • etd - Energy produced today (single-precision, kWh)
      • hto - Total Running time (zero-precision, h)
      • pf - Power Factor (single-precision?, unitless)
      • wan - ?
      • err - Errors thrown by the inverter
      • vac - List of AC voltage, 3-phases
        • [0] - AC voltage phase 1 (single-precision, V RMS)
        • [1] - AC voltage phase 2 (single-precision, V RMS)
        • [2] - AC voltage phase 3 (single-precision, V RMS)
      • iac - List of AC current, 3-phases
        • [0] - AC current phase 1 (single-precision, A RMS)
        • [1] - AC current phase 2 (single-precision, A RMS)
        • [2] - AC current phase 3 (single-precision, A RMS)
      • vpv - List of DC PV Voltage
        • [0] - VC Voltage PV1 string (single-precision, V)
        • [1] - VC Voltage PV2 string (single-precision, V)
      • ipv - List of DC PV Current
        • [0] - VC Current PV1 string (double-precision, A)
        • [1] - VC Current PV2 string (double-precision, A)
    • 3 - ??

      JSON keys:

      • flg - flag?
      • tim - Time and date, (e.g. 20230316115346 is 2023-03-01 11:53:46)
      • pac - Current real power of AC output (double-precision, W)
      • itd - input td (today perhaps)?
      • otd - output td (today perhaps)?
      • iet - input et (enery total perhaps)?
      • oet - output et (enery total perhaps)?
      • mod - ?
      • enb - ?
    • 4 - ??

      JSON keys:

      • flg - flag?
      • ppv - power pv?
      • etdpv - energy today pv?
      • etopv - energy total pv?
      • cst - ?
      • bst - ?
      • eb1 - ?
      • wb1 - ?
      • vb - voltage b?
      • cb - capacitance b?
      • pb - power b?
      • tb - time b?
      • soc - ?
      • soh - ?
      • cli - cl input?
      • clo - cl output?
      • ebi - eb input?
      • ebo - eb output?
      • eaci - e AC input?
      • eaco - e AC output?
      • vesp - voltage esp?
      • cesp - capacitance esp?
      • fesp - frequency esp?
      • pesp - power esp?
      • rpesp - rp esp?
      • etdesp - energy today esp?
      • etoesp - energy total esp?

  • POST /fdbg.cgi - Very likely Modbus read/write bridge

    Content?

    JSON keys:

    • data - Modbus registers