Page 1 of 1

Battery Query returning no values

Posted: Wed Jan 14, 2026 6:31 am
by rjtvipul333
Hi, could anyone please advise why "Values" are empty for battery/real/query?
I want to query battery capacity, remaining kw, current %, is this the right endpoint?

Code: Select all

https://www.foxesscloud.com/op/v0/device/[b]battery/real/query[/b]?sn=xxxx
Please below the response I get!

Code: Select all

{
    "errno": 0,
    "msg": "Operation successful",
    "result": {
        "data": {
            "remainCapacity": {
                "unit": "Ah",
                "value": "--"
            },
            "batteryDesignCapacity": {
                "unit": "Ah",
                "value": "--"
            },
            "batteryDesignEnergy": {
                "unit": "kWh",
                "value": "--"
            },
            "chargeEnergyToTal": {
                "unit": "kWh",
                "value": "1339"
            },
            "dischargeEnergyToTal": {
                "unit": "kWh",
                "value": "1406.6"
            },
            "batteryRemainEnergy": {
                "unit": "kWh",
                "value": "--"
            },
            "acType": "--",
            "batteryType": "--"
        }
    }
}

Re: Battery Query returning no values

Posted: Wed Jan 14, 2026 12:25 pm
by tony.matthews1
This is a new endpoint and, so far as I can see, doesn't return any data apart from the charge and discharge energy.

To get the battery details, you need to use a number of other queries:

Get Device Detail to get a list of the batteries attached to the inverter and their capacity. Sum the battery capacity values to get the total capacity.

Get Device Real-time data with the relevant variables to get the current battery SoC, voltage, current, temperature, throughput etc.

If you use Python, this get_battery() api wrapper does the work for you: https://github.com/TonyM1958/FoxESS-Clo ... nformation

Re: Battery Query returning no values

Posted: Wed Jan 14, 2026 11:22 pm
by rjtvipul333
Thank you tony.matthews1!

Three more things, if you could help please!
  • The real/query endpoint doesn't seem to return Soc_1 variable when filtered
20260115 103943.png
  • With battery %, the values don't seem to match on API response vs what's shown on the app
20260115 102010.png
  • Few other variables are also not getting filtered!
20260115 105458.png

Re: Battery Query returning no values

Posted: Thu Jan 15, 2026 9:00 am
by Dave Foster
Confusingly on a single battery system the variable name is actually 'SoC' not 'SoC_1', whereas on a multi-battery system you don't have a SoC you have SoC_1 & SoC_2 - change the name to SoC and it will return a value.

The temperature you see in the app is the lowest cell temperature, whereas batTemperature is the temperature at the BMS power junction and is usually 6-10C higher than the lowest cell - sadly despite our continued requests Fox have not added the lowest cell temperature to the OpenApi.

Similarly as for SoC the variable names for a single battery system are 'invBatPower', and 'batTemperature'

Re: Battery Query returning no values

Posted: Thu Jan 15, 2026 12:54 pm
by tony.matthews1
You need to get the variables list that is specific to the model of your inverter before you query for values and then select values from this list.

Look at the API call Get Available Variables to return the list.