Senertec energy system gen2 interface.
Project description
py-senertec
Description
The py-senertec library provides a way to communicate with senertec dachsportal2 to monitor your energy unit.
Requirements
- Python 3.6+
- productGroups.json from repo
- Account for Senertec Dachsportal2/Remeha KWK
Supported devices
For now, these devices are supported:
- Senertec Dachs 0.8
- Remeha eLecta 300 (technically same as Senertec Dachs)
Support for other devices
This library uses Dachsportal2 to get information from your energy system. If you have a device which can be accessed from Dachsportal2 adding support should be pretty easy. You can open an feature request in the issues section and provide more information there.
Installation
$ pip install py-senertec
Usage
Login and initialization
from senertec.client import senertec
from senertec.canipValue import canipValue
import json
import os
# holds the datapoints which are fixed values parsed from Dachsportal
file = open(os.getcwd() + "\\productGroups.json")
supportedItems = json.load(file)
file.close()
senertec = senertec(supportedItems, "username", "password")
#set your callback function for messages
senertec.messagecallback = self.output
senertec.login()
senertec.init()
Requesting data
units = senertec.getUnits()
senertec.connectUnit(units[0].serial)
# request all available data from all boards
for points in senertec.boards:
ids = points.getFullDataPointIds()
# result will be received through callback function which was set above
senertec.request(ids)
senertec.logout()
Using callback function
Once the websocket has been started, data will be transmitted through the websocket. In order for your to be alerted of such a change, you need to add a callback which was done above. The callback function could look like this:
def output(self, value: canipValue):
print(value.friendlyDataName + ": " +
value.dataValue.__str__() + value.dataUnit)
Errors of energy unit
Errors can also be read out with a simple function. The errors are read out on the connect function and only will be refreshed on a reconnect.
# values are returned directly from function
k = senertec.getErrors()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py-senertec-0.1.0.tar.gz
.
File metadata
- Download URL: py-senertec-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eed2b362de48d2a200aa59d40fb252a2e78c1c782f7ac238305542123ca0879b |
|
MD5 | 0092e48c765c7f0d3abe95bb07e508a5 |
|
BLAKE2b-256 | 3036c7c46b38f2f5aa24a009b7e688c3ca0e7d4c6a03f1b6e5153c1c21d351e8 |
File details
Details for the file py_senertec-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: py_senertec-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac3bf9fbb4df516c48216a935de2c9740820da3133cfe98debfb59c201f8b169 |
|
MD5 | b69baab5d6f428f5e48b6d8abc941a9c |
|
BLAKE2b-256 | d8e0cec85a90e6db53dfcd995c07dd8d89a6931aa6d0df0c2f2e23c2c4e0fec3 |