https://github.com/maexled/mystrom-status-saver
Requests data from MyStrom switch and stores in sql database.
https://github.com/maexled/mystrom-status-saver
mystrom mystrom-switch python sqlalchemy
Last synced: 4 months ago
JSON representation
Requests data from MyStrom switch and stores in sql database.
- Host: GitHub
- URL: https://github.com/maexled/mystrom-status-saver
- Owner: maexled
- License: mit
- Created: 2022-05-27T13:59:43.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-17T12:43:32.000Z (over 2 years ago)
- Last Synced: 2024-12-29T01:58:15.625Z (6 months ago)
- Topics: mystrom, mystrom-switch, python, sqlalchemy
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MyStrom - Python
Requests data from MyStrom switch and stores in sql database.## Environment Variables
`SQL_URL` - the URL for database, e.g. `mysql+pymysql://user:password@host:3306/database`## Run
### With python
#### MySQL
```sh
export SQL_URL=mysql+pymysql://user:password@host:3306/database
python -m main
```#### PostgreSQL
```sh
export SQL_URL=postgresql+psycopg2://user:password@host:5432/database
python -m main
```### With Docker Container
#### MySQL
```sh
docker run \
--name mystrom-python \
-e "SQL_URL=mysql+pymysql://user:password@host:3306/database" \
ghcr.io/maexled/mystrom-python:master
```#### PostgreSQL
```sh
docker run \
--name mystrom-python \
-e "SQL_URL=postgresql+psycopg2://user:password@host:5432/database" \
ghcr.io/maexled/mystrom-python:master
```