Sjoerd Langkemper
Sjoerd Langkemper
Hmm, I am not sure what is going on in that case.
Do you perhaps have an account [on another server](https://github.com/Sjord/growatt_api_client/issues/20)? Where do you normally log in?
I found the URLs by reverse engineering the Android app, and intercepting traffic between the Android app and the server. Is there particular data you are looking for? I recently...
Did you provide the plantId and language parameters? Try this: def get_user_center_energy_data_by_plant_id(self, plant_id): response = self.session.post( self.get_url("newTwoPlantAPI.do"), params={"op": "getUserCenterEnertyDataByPlantid"}, data={"plantId": plant_id, "language": 1}, ) return response.json()
No, I don't think so. You first need to login and then you can use the session to retrieve information.
These need some more testing and at least some documentation before I am going to merge this. If you use these, please let me know which functions work best for...
[This other project](https://github.com/indykoning/PyPi_GrowattServer) also has some storage functions.
Thanks @wynandmyriota. I have created a separate issue for this problem: Storage API returns 504 error #16
These methods need better names or namespaces. `get_energy_overview_data` currently calls `newStorageAPI.do?op=getEnergyOverviewData`, but this is very similar to `newSpaApi.do?op=getEnergyOverview`, and I expect the same to exist for other device types.
I moved the storage and spa calls to their own class. It now works like this: ``` with GrowattApi() as api: api.login(username, password) s = api.storage(plant_id, storage_sn) print(s.get_system_status_data()) ``` So...