Open API Get Device History Data
Posted: Wed Apr 10, 2024 6:28 pm
Hi,
I'm using the Open API to access information about the power generated by my inverter.
The documentation found on https://www.foxesscloud.com/public/i18n ... ument.html helped me on my way with most API calls.
I'm able to get the devicelist and realtime data from the API with no problems.
However, there is one method call that I can't get to return any results other than errorno 40257. The "Get device history data" call (path = /op/v0/device/history/query).
The response is always the same, whatever I do:
It doesn't tell me which parameter does not meet the expecations. Nor what the expectations are.
This is one of my many requests I've tried:
(I have replaced my real serial number for security reasons)
I've tried this with different variables, with and without "begin" and "end" timestamps. Different timestamps and periods, from a few hours to a few days ect. Nothing seems to work.
I'm hoping someone can point me in the right direction here because I would really love to use the history endpoint too.
Thanks in advance!
I'm using the Open API to access information about the power generated by my inverter.
The documentation found on https://www.foxesscloud.com/public/i18n ... ument.html helped me on my way with most API calls.
I'm able to get the devicelist and realtime data from the API with no problems.
However, there is one method call that I can't get to return any results other than errorno 40257. The "Get device history data" call (path = /op/v0/device/history/query).
The response is always the same, whatever I do:
Code: Select all
{
"errno": 40257,
"msg": "Parameter does not meet expectations",
"result": null
}
This is one of my many requests I've tried:
Code: Select all
{
"sn": "***************",
"variables": ["pvPower"],
"begin": 1712354400,
"end": 1712440800
}
I've tried this with different variables, with and without "begin" and "end" timestamps. Different timestamps and periods, from a few hours to a few days ect. Nothing seems to work.
I'm hoping someone can point me in the right direction here because I would really love to use the history endpoint too.
Thanks in advance!