Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inverter_data() function #46

Open
tyrail311 opened this issue Dec 21, 2022 · 3 comments
Open

inverter_data() function #46

tyrail311 opened this issue Dec 21, 2022 · 3 comments

Comments

@tyrail311
Copy link

tyrail311 commented Dec 21, 2022

Hello there,

I am trying to make a call to the inverter_data function with the following:
pprint(gw.inverter_data(inverter_sns[0], date=datetime.datetime(2022, 12, 20).date()))

gw is the api object and the inverter_sns is a list of the serial numbers for each inverter. I tried to call the date with a string
pprint(gw.inverter_data(inverter_sns[1], date='2022-12-20'))and received the following error:

    AttributeError: 'str' object has no attribute 'strftime' 

when I tried call above with the datetime object, and got the following response:

{'msg': '501', 'success': False}

Is the format of my request wrong with the date, or is there an underlying issue with the api?

I tried to copy the code and run it locally, it seems like there is something wrong with the code when I run it locally with the JSON decoder at the following function call:
https://github.com/indykoning/PyPi_GrowattServer/blob/master/growattServer/__init__.py#:~:text=def%20inverter_data(self%2C%20inverter_id%2C%20date%3DNone)%3A
Error:
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 2)

@CoenHordijk
Copy link

I have exactly the same issue

@martinqs85
Copy link

i have the same issue, did you manage to solve it?

@CoenHordijk
Copy link

i have the same issue, did you manage to solve it?

Hi, because of the issues that kept popping up with growattServer I set up a RS485 interface with my Growatt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants