growatt_api_client
growatt_api_client copied to clipboard
How can I read the individual inversers?
I have 2 inverters. How can I read the individual inverter values?
Thanks, @Peterpc58. This is kind of hard to test for me, since my environment only has one inverter. Could you try out the new get_all_device_list
function?
Do I call it like this: all_device_list = api.get_all_device_list() It gives me this error: AttributeError: 'GrowattApi' object has no attribute 'get_all_device_list'
I am new to this....
I added the get_all_device_list
on a separate branch. First, you have to switch to that branch, using git.
If you haven't got a git repo yet, clone it like this:
git clone https://github.com/Sjord/growatt_api_client
If you have, update it like this:
git fetch
Then switch to the branch with the new function:
git checkout get-all-device-list
Then, change growatt/__main__.py
or your own script to call get get_all_device_list, and pass it a plant_id:
device_list = api.get_all_device_list(plant_id)
print(device_list)
I would expect that to print information for each inverter.
I get this error: AttributeError: 'GrowattApi' object has no attribute 'get_all_device_list' I also tried replacing plant_id with the pant id number, but same error.
Did it all over again and now it is working! Thanks! I have all the data I need now.
Indy Koning's Growatt script uses newPlantAPI.do?op=getAllDeviceListThree
, while I use newTwoPlantAPI.do?op=getAllDeviceList
. It would be interesting to compare these.
a few days ago my script stpped working.
I think the device_list = api.get_all_device_list(plant_id) gives he problem.
This is returned:
Traceback (most recent call last):
File "testing.py", line 25, in
can you help?
It seems newTwoPlantAPI.do?op=getAllDeviceList now gives an error 500
I may have a fix: https://github.com/Sjord/growatt_api_client/pull/24 Could you test it?
confirmed fixed 👍
I have merged that PR and made a new release.