Skip to content

Requests data from MyStrom switch and stores in sql database.

License

Notifications You must be signed in to change notification settings

maexled/mystrom-status-saver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

export SQL_URL=mysql+pymysql://user:password@host:3306/database
python -m main

PostgreSQL

export SQL_URL=postgresql+psycopg2://user:password@host:5432/database
python -m main

With Docker Container

MySQL

docker run \
    --name mystrom-python \
    -e "SQL_URL=mysql+pymysql://user:password@host:3306/database" \
    ghcr.io/maexled/mystrom-python:master

PostgreSQL

docker run \
    --name mystrom-python \
    -e "SQL_URL=postgresql+psycopg2://user:password@host:5432/database" \
    ghcr.io/maexled/mystrom-python:master