SGrPythonSamples provides sample projects that demonstrate the use of the Communication Handler Library provided in SGrPython.
The samples show different use cases of communicating with products, e.g. electricity meters, heat pumps, charging stations or PV inverters,
with the help of external interface descriptions.
- Python interpreter >= 3.9
Clone this repository to a new directory: https://github.com/SmartGridready/SGrPythonSamples.git
The sample project uses virtual environments and pip to manage dependencies.
Create and/or activate virtual environment in your project directory:
python -m venv .venv
# On Linux call this:
source ./.venv/bin/activate
# On Windows call this:
.\.venv\Scripts\Activate.ps1While the virtual environment is active, packages will be installed inside the virtual environment, keeping your system and user directory clean.
Install the required dependencies from requirements.txt:
python -m pip install --upgrade pip
pip install -r requirements.txtAfter all dependencies have been installed, you may launch any of the samples:
python sample_xxx.pyOpenCEM is a simple implementation of an EMS developed at FHNW, demonstrating the use of the Communication Handler Library.
The OpenCEM project has been removed from the sample repository and moved to its own repository.
You can find the source code at OpenCEM.
