A command line tool to query the GOODWE SEMS Solar Inverter APIs - written in 100% Go.
- Go v1.23.0 or later needs to be installed to build the code.
- Azure CLI tools 2.50 or later
- Taskfile to run the build chain commands listed below.
The toolchain is driven by using Taskfile and all commands are managed via the file Taskfile.yml
The list of commands is as follows:
* build: Builds the project in preparation for debug.
* clean: Removes the old builds and any debug information from the source tree.
* deps: Fetches any external dependencies and updates.
* destroy: Destroy Azure resources for testing.
* docs: Updates the swagger docs - For APIs.
* generate: update binary build version using gogenerate.
* goreleaser: Builds a cross platform release using goreleaser.
* lint: Lint, format and tidy code.
* release: Builds the project in preparation for (local)release.
* run: Builds and runs the program on the target platform.
* seccheck: Code vulnerability scanner check.
* staticcheck: Runs static code analyzer staticcheck.
* test: Executes unit tests.
* version: Get the Go version.
* vet: Vet examines Go source code and reports suspicious constructs.
* watch: Use air server for hot reloading.
Execute using the taskfile utility:
task <command_from_above_list>
To get started type,
task deps
- to fetch all dependencies and update all dependencies.task build
- to build debug version for your target environment architecture.task release
- Builds a release version for your target environment architecture - outputs to /bin folder.
Determine the Station ID from the GOODWE site as follows. Open the Sems Portal. The Plant Status will reveal the Station ID in the URL. Example:
https://www.semsportal.com/powerstation/powerstatussnmin/11112222-aaaa-bbbb-cccc-ddddeeeeeffff
Then the Station ID is 11112222-aaaa-bbbb-cccc-ddddeeeeeffff
.
From the command line the usage is pretty simple:
The Report Type corresponds to the type of API call and Report that is generated:
- (0)-Detail - Fully detailed report.
- (1)-Summary - Summary Data report (reduced information).
- (2)-Point - Inverter All points data.
- (3)-Plant - Plant Detail By Powerstation Id.
- (4)-PlantChart - Plant Chart data for use in Charts and Graphs.
- (5)-PowerFlow - Powerflow Summary data
##Note the use of single quotes ''
./gogoodwe --account '<[email protected]>' \
--pwd '<password>' \
--powerstationid '<powerstation id>' \
--reporttype '<report type (Optional)>'
# Or
./gogoodwe -a '<[email protected]>' \
-p '<password>' \
-i '<powerstation id>' \
-r '<report type> (Optional)>'
To get the help on using the command line tool, type:
./gogoodwe --help
# Or
./gogoodwe -h
Please feel free to lodge an issue or pull request on GitHub.
- Originally based off the work of Mark Ruys and his gw2pvo software - and James Hodgkinson and his pygoodwe
GOODWE access is based on the undocumented API used by mobile apps. This could break at any time.
- The Powerchart report is returning no/blank values - investigating.