"Please try again in 24 hours." error #142
|
my power agent does this every 5 minutes but I've got an error after a while myapi = api.AnkerSolixApi(
common.user(),
common.password(),
common.country(),
websession,
_LOGGER,
)
await myapi.update_sites()
await myapi.update_site_details()
await myapi.update_device_details()
await myapi.update_device_energy()
# Stuff{"code":100053,"msg":"Please try again in 24 hours.","trace_id":"3ce7fe874145e759411ed598aacc03b5"}what can I do to reduce / cache things ? I mainly need 2 values home_load_power = int(myapi.sites[BACKBATT_SITEID]["home_load_power"])
back_battery_level = float(int(myapi.devices[BACKBATT_SN]["battery_energy"]) / int(myapi.devices[BACKBATT_SN]["battery_capacity"]))after that I do a myapi.set_device_parm(
siteId=FRONTBATT_SITEID,
paramType=SolixParmType.SOLARBANK_SCHEDULE.value,
paramData=param_data
) |
Replies: 7 comments 1 reply
|
You have to use separate accounts for the App and the Api. |
|
yes, I've set up a secondary account but I had to change things a few times so I had to switch to the owner account... 10 times and ban seams to be it... thx |
|
Got it to work with tor socks proxy 😄 and the library import aiohttp
from aiohttp_socks import ProxyConnector
...
# something like socks5://host.docker.internal:9050
TOR_PROXY = os.getenv("TOR_PROXY", "")
if TOR_PROXY != "":
CONSOLE.info(f"Using TOR proxy {TOR_PROXY}")
connector = ProxyConnector.from_url(TOR_PROXY)
websession = aiohttp.ClientSession(connector=connector)
else:
websession = aiohttp.ClientSession()
... |
|
I probably have a similar problem. I tried to query data cyclically: Node-Red with Injection Node, every 10 seconds. I used the account that is registered in the app for this. The Python script that was called connected to my account each time. After about a minute, I stopped receiving data. Since then, I have been unable to connect to the cloud with the API. Even accessing the app with my mobile phone fails when I am connected to my Raspberry's VPN. |
|
I don't know. Typically you get a corresponding message if your IP is banned for 24h. |
|
As of end of July 2025, multiple clients can now use the same account in parallel since active tokens on server are no longer deleted upon login requests. |
|
Ok, thanks for the info. The error only occurred when I queried the data at 10 second intervals using Node Red. The account information is permanently entered in the Python script. The error message there was still: too many failed logins. Account is restricted for 10 minutes. |
You have to use separate accounts for the App and the Api.
Only the system owner can change things, so if you want to change anything via Api, you have to use a shared account for the App. which can only monitor
Every time when another client (App or Api) is connecting to the cloud, the existing token for the account on the cloud server is no longer valid and must be renewed. I think that can be done 10 times a day, then you get an IP ban and have to wait 24h or force your router to reconnect to the internet and hopefully get another IP.
You can use the Api client as often as you want, since it uses the cached token. But as I said, this remains only valid on the server until another Api c…