Skip to main content

Senertec energy system gen2 interface.

Project description

py-senertec

License: MIT PyPI version

Description

The py-senertec library provides a way to communicate with Senertec Dachsportal2 to monitor your energy unit. This library supports read-only communication. So changing values for your energy unit isn't implemented and not planned.

Requirements

  • Python >=3.10
  • Account for Senertec Dachsportal2/Remeha KWK

Tested with these devices

I could test with these devices but others should also work:

  • Senertec Dachs 0.8
  • Senertec Dachs InnoGen
  • Senertec Dachs Gen2 F5.5
  • Remeha eLecta 300 (technically same as Senertec Dachs 0.8)

Installation

$ pip install py-senertec

Usage

Login and initialization

from senertec.client import senertec
from senertec.canipValue import canipValue
import json

# Initialize class
client = senertec()
# set your callback function for messages
client.messagecallback = self.output
# login
client.login("username", "password")
client.init()

Set the callback function

Once the websocket has been started, data will be transmitted through the websocket. To get the websocket data, 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)

Requesting data

units = client.getUnits()
# connect to first unit in the list
client.connectUnit(units[0].serial)
# request all available datapoints from all boards
# This should only be used for testing, it recommended to use a filter instead
# Take a look in the examples folder for a detailed example.
client.request(None)
# logout when you're finished
client.logout()
# or disconnect if you want to connect to another unit afterwards
# client.disconnectUnit()

Errors of energy unit

Errors can also be read out with a simple function. The errors are read out on the connect function and will only be refreshed on a reconnect.

# values are returned directly from function
errors = client.getErrors()

The full example can be found here

Filtering (recommended)

If you specify a json string in the request() function you can limit what datapoints should be received. This is recommended if you know what data you want from your heating system e.g. power, temperature. By default all datapoints are included which are more than 400 in most cases and receiving them takes some time and sometimes not every value will be received. This json string should look like this. The json string contains the productGroup at the top and below the datapoints which should be included. You get the productGroup name from the getUnits() function.

You can also optionally include the boardname for a datapoint in the json. This is usefull if a datapoint exists in multiple boards but you only want e.g. AM027 from board SCB-04@1.

What are these datapoints?

Take a look at this manual from Remeha (Page 39). There is already a good explanation of how these datapoints are composed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_senertec-1.0.4.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_senertec-1.0.4-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file py_senertec-1.0.4.tar.gz.

File metadata

  • Download URL: py_senertec-1.0.4.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for py_senertec-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f7cdff7d0edd7c49dcdfad891bac2343b0e613589675ff59ae279e9752d4c9d6
MD5 f88451f66e329e6cf00a9bb7202e563c
BLAKE2b-256 d3fb655c9d72a355974310a58a2045e60e37ad26bf1033d0cefc4c7f19a4e0b5

See more details on using hashes here.

File details

Details for the file py_senertec-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: py_senertec-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for py_senertec-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 07157750111a799fa99dc443cd2eeff0bcb08d0e8dba2ad1f819ab5d4f58295b
MD5 a324e8e42143505b723caad45c624b5b
BLAKE2b-256 4316484564cc3b9b91dda1985b655b9f9aa86cbf7bc1cb1beb6b2a62c2349c01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page