Skip to content

Commit

Permalink
Update default url to openapi.growatt.com (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcovtwout authored Feb 14, 2024
1 parent 9ae4856 commit 2bfebf7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ Any methods that may be useful.

Some variables you may want to set.

`api.server_url` The growatt server URL, default: 'https://server-api.growatt.com/'
`api.server_url` The growatt server URL, default: 'https://openapi.growatt.com/'

You may need a different URL depending on where your account is registered:

'https://openapi-cn.growatt.com/' (Chinese server)
'https://openapi-us.growatt.com/' (North American server)
'https://openapi.growatt.com/' (Other regional server: e.g. Europe)

## Note

Expand Down
2 changes: 1 addition & 1 deletion growattServer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Timespan(IntEnum):
month = 2

class GrowattApi:
server_url = 'https://server-api.growatt.com/'
server_url = 'https://openapi.growatt.com/'
agent_identifier = "Dalvik/2.1.0 (Linux; U; Android 12; https://github.com/indykoning/PyPi_GrowattServer)"

def __init__(self, add_random_user_id=False, agent_identifier=None):
Expand Down

0 comments on commit 2bfebf7

Please sign in to comment.