https://github.com/kantmn/anker-solix-api
A docker container for anker-solix-api, inject your script.py to use it
https://github.com/kantmn/anker-solix-api
anker container docker python3
Last synced: 3 months ago
JSON representation
A docker container for anker-solix-api, inject your script.py to use it
- Host: GitHub
- URL: https://github.com/kantmn/anker-solix-api
- Owner: kantmn
- Created: 2025-02-11T12:14:26.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2026-01-28T02:37:33.000Z (6 months ago)
- Last Synced: 2026-01-28T18:14:02.799Z (6 months ago)
- Topics: anker, container, docker, python3
- Language: Python
- Homepage:
- Size: 308 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
[](https://github.com/kantmn/anker-solix-api/actions/workflows/codacy.yml)
[](https://github.com/kantmn/anker-solix-api/actions/workflows/github-code-scanning/codeql)
[](https://github.com/kantmn/anker-solix-api/actions/workflows/dependabot/dependabot-updates)
[](https://github.com/kantmn/anker-solix-api/actions/workflows/release.yml)
# anker-solix-api docker image
Provides a docker container to run a python 3.13 script with dependencies for
This docker provides an http service under port http://ip:5000/metrics
# docker container setup
pull the container as needed, there are two plattforms (amd64/arm64) available.
``
docker pull ghcr.io/kantmn/anker-solix-api:latest
``
if you want to use fixed version use
``
docker pull ghcr.io/kantmn/anker-solix-api:yyyy.mm
``
Map path from container
> /logs
This will locate the log metrics only
Add and fille the following Docker Env variables as needed
```
ANKERUSER=YOUR_ANKER_LOGIN_EMAIL
ANKERPASSWORD=YOU_ANKER_PASSWORD
ANKERCOUNTRY=YOUR_REGION (e.g. DE=Germany)
ANKER_SOLIX_DUID=YOUR_ANKER_GUID (this removes the APCGQ80E12344567_ from the requests)
WEATHER_API_URL=YOUR_OPENWEATHERMAP_API_URL
(contains coords and api key, key is free of charge and can be obtainted https://home.openweathermap.org/users/sign_up> example for api URL )
```
The Script is running in a loop, with sleep time, so only ending when container is stopped, should recover from crash
# prometheus connection
The metrics is compatible for a prometheus crawling job ()
for example open
`
/etc/prometheus.yml
`
and add
````
- job_name: "anker-solix-api"
scrape_interval: 5s
static_configs:
- targets: ["ip:5000"]
````
# grafana dashboard
afterwards those metrics can be used e.g. in grafana to display graphs etc
see an examples here