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 yet.

Requirements

  • Python 3.9+
  • Account for Senertec Dachsportal2/Remeha KWK

Tested with this devices

I could test with this 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
import os

#this example uses no filtering, read below how to use a filter instead of None as first parameter.
senertec = senertec(None)
#set your callback function for messages
senertec.messagecallback = self.output
senertec.login("username", "password")
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. 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)

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 = senertec.getErrors()

A full example can be found here

Filtering (recommended)

If you specify a json string in the senertec contructor you can limit what datapoints should be received. This is pretty usefull 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. 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 from the getUnits() function.

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-0.5.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

py_senertec-0.5.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file py-senertec-0.5.0.tar.gz.

File metadata

  • Download URL: py-senertec-0.5.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for py-senertec-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f082e544c7e5d639348da07010c8c97fbbda0756b2ff76c494b95d11c3014c8a
MD5 815ce97df4559f72f0d9a0d27ee8a443
BLAKE2b-256 68082182c390869e40b79f2b5ca9558009bc439d0253f9f1553ee99c6fb15834

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_senertec-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for py_senertec-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 339300dda4016bb092709b0eed1bd14a028b41c0ad15f6000fd67063cdeb8a28
MD5 6695280c372277ce55463aff5873b673
BLAKE2b-256 a47f2906373eecb77a0e24e658ec2fc6d3bf8108456c54f971fb136d48572f2d

See more details on using hashes here.

Supported by

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