nricklin/leafpy

BatteryStatusCheckResultRequest(resultKey=response['resultKey']) raises error

snaptec opened this issue · 2 comments

I'm authenticating with username/password

When executing:
response = leaf.BatteryStatusCheckRequest() time.sleep(10) leaf.BatteryStatusCheckResultRequest(resultKey=response['resultKey'])

This raises in 9 out of 10 times an error.
Two possible error cases:
the response is "none".
The resultKey is not valid.

I changed the Region from NNA to NE. Thats it.

For example:
leaf.BatteryStatusRecordsRequest()

always works. Any Hint?
I can read the (old) SoC, but can't request new one. This mostly does not work.
Is there another URL for Europe?

My first thought is that either the sleep is not long enough or that, yes, you are in Europe & need a different region.

If that is actually raising an error instead of just not returning any information in the response, then that is strange.

Do you have another process somewhere logging in & performing similar operations? I've noticed that logging in elsewhere will invalidate the current session_id.