Skip to main content

Allows to access Sonnen Charger (or any other ETREL INCH) using TCP Modbus

Project description

Sonnen Charger Modbus API

Allows to access Sonnen Charger (or any other ETREL INCH) using TCP Modbus

Usage

from sonnen_charger_modbus import Charger, ChargerConnectorStatus
import traceback

charger = Charger('192.168.0.1', 502)

try:
    if charger.readConStatus(0).value >= ChargerConnectorStatus.WaitingForVehicleToRespond.value:
        carConnected = True
        chargingPower = charger.readActivePowerTotal(0) * 1000
        print('chargingPower', chargingPower)
except Exception as e:
    print('Error in Modbus communication:')
    traceback.print_exc()
    print(e)

charger.close()

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

sonnen_charger_modbus-0.1.3.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

sonnen_charger_modbus-0.1.3-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

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