Web service that provides a REST API layer over the My Autarco site/API to get statistical data of your solar panels.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
Paul van Tilburg 28342751a2
Archive this project
3 weeks ago
src Use fairing to read the My Autarco config (closes: #3) 3 weeks ago
.dockerignore Remove autarco.toml from documentation and Docker files 3 weeks ago
.gitignore Use fairing to read the My Autarco config (closes: #3) 3 weeks ago
Cargo.lock Cargo update 3 months ago
Cargo.toml Cargo update 3 months ago
Dockerfile Remove autarco.toml from documentation and Docker files 3 weeks ago
LICENSE Add README.md, Rocket.toml.example and LICENSE file 5 months ago
README.md Archive this project 3 weeks ago
Rocket.toml.example Use fairing to read the My Autarco config (closes: #3) 3 weeks ago
docker-compose.yml Remove autarco.toml from documentation and Docker files 3 weeks ago

README.md

Autarco Scaper

Autarco Scraper is a web service that provides a REST API layer over the My Autarco site/API to get statistical data of your solar panels.

Archived! This project has been archived in favor of Solar Grabber that provides the same functionality but also supports more solar cloud services/sites.

Building & running

First, you need to provide your My Autarco credentials in the file Rocket.toml by setting the username, password and site ID. You can copy and modify Rocket.toml.example for this:

[default]
# ...

# Put your My Autarco credentials below and uncomment them
username = "foo@domain.tld"
password = "secret"
site_id = "abc123de"

You can also change this configuration to use a different address and/or port. (Note that Rocket listens on 127.0.0.1:8000 by default for debug builds, i.e. builds when you don't add --release.)

[default]
address = "0.0.0.0"
port = 8080

# ...

This will work independent of the type of build. For more about Rocket's configuration, see: https://rocket.rs/v0.5-rc/guide/configuration/.

Finally, using Cargo, it is easy to build and run Autarco Scraper, just run:

$ cargo run --release
...
   Compiling autarco-scraper v0.1.1 (/path/to/autarco-scraper)
    Finished release [optimized] target(s) in 9m 26s
     Running `/path/to/autarco-scraper/target/release/autarco-scraper`

API endpoint

The / API endpoint provides the current statistical data of your solar panels once it has successfully logged into the My Autarco website using your credentials. There is no path and no query parameters, just:

GET /

Response

A response uses the JSON format and typically looks like this:

{"current_w":23,"total_kwh":6159,"last_updated":1661194620}

This contains the current production power (current_w) in Watt, the total of produced energy since installation (total_kwh) in kilowatt-hour and the (UNIX) timestamp that indicates when the information was last updated.

License

Autarco Scraper is licensed under the MIT license (see the LICENSE file or http://opensource.org/licenses/MIT).