Update documentation and example

This commit is contained in:
Paul van Tilburg 2023-01-10 15:42:31 +01:00
parent b1dfea651f
commit 0e7d339682
Signed by: paul
GPG Key ID: C6DE073EDA9EEC4D
2 changed files with 19 additions and 5 deletions

View File

@ -3,18 +3,24 @@
Solar Grabber is a web service that provides a REST API layer over various Solar Grabber is a web service that provides a REST API layer over various
cloud sites/services/APIs to get statistical data of your solar panels. cloud sites/services/APIs to get statistical data of your solar panels.
The services that are currently supported are
[Hoymiles](https://global.hoymiles.com) and
[My Autarco](https://my.autarco.com).
## Building & running ## Building & running
First, you need to provide settings in the file `Rocket.toml` by setting the First, you need to provide settings in the file `Rocket.toml` by setting the
username, password and other cloud service-specific settings. username, password and other cloud service-specific settings.
You can copy and modify `Rocket.toml.example` for this. You can copy and modify `Rocket.toml.example` for this and uncomment the part
For example for My Autarco: relevant for the service you want to use.
For example, to configure Solar Grabber to use the My Autarco service:
```toml ```toml
[default] [default]
# ... # ...
# Put your solar cloud service settings below and uncomment them # Put your solar cloud service settings below and uncomment them based on the
# service you want to use.
[default.service] [default.service]
kind = "MyAutarco" kind = "MyAutarco"
username = "foo@domain.tld" username = "foo@domain.tld"
@ -62,7 +68,7 @@ GET /
A response uses the JSON format and typically looks like this: A response uses the JSON format and typically looks like this:
```json ```json
{"current_w":23,"total_kwh":6159,"last_updated":1661194620} {"current_w":23.0,"total_kwh":6159.0,"last_updated":1661194620}
``` ```
This contains the current production power (`current_w`) in Watt, This contains the current production power (`current_w`) in Watt,

View File

@ -2,8 +2,16 @@
address = "0.0.0.0" address = "0.0.0.0"
port = 2356 port = 2356
# Put your solar cloud service settings below and uncomment them # Put your solar cloud service settings below and uncomment them based on the
# service you want to use.
[default.service] [default.service]
# For Hoymiles, use the following settings:
# kind = "Hoymiles"
# username = "username"
# password = "secret"
# sid = 123456
# For My Autarco, use the following settings:
# kind = "MyAutarco" # kind = "MyAutarco"
# username = "foo@domain.tld" # username = "foo@domain.tld"
# password = "secret" # password = "secret"