Skip to main content

"SonnenCharger access via ModBus"

Project description

SonnenCharger

Purpose

Read status information from a SonnenCharger type wallbox

Installation

Using pip

pip3 install sonnencharger

Manual installation

Download the archive from pypi.org and unpack where needed ;)

Usage

from sonnencharger import sonnencharger

sc_host = '192.168.1.2'
sc_port = 502  # optional, default=502

# Init class, establish connection
sc = sonnencharger(sc_host, sc_port)

print(sc.get_sysinfo())	    # retrieve general wallbox information
print(sc.get_connectors())  # retrieve status of the connectors

Results (examples)

System information

{
  'connectors': 1,
  'hwrevision': '1.23',
  'model': 'YOUR-MODEL-ID',
  'serial': '1234567890',
  'swrevision': '1.23.45'
 }

Connector Info

{
   0: {
   	'active_session_duration': 77127,
   	'active_session_imported_energy': 4.667,
   	'ev_max_phase_current': 14.784,
   	'ev_max_power': 0.0,
   	'ev_required_energy': 0.0,
   	'l1_active_power': 0.0,
   	'l1_current': 0.0,
   	'l1_ln_voltage': 234.4,
   	'l1_phase': 1,
   	'l2_active_power': 0.0,
   	'l2_current': 0.0,
   	'l2_ln_voltage': 233.96,
   	'l2_phase': 2,
   	'l3_active_power': 0.0,
   	'l3_current': 0.0,
   	'l3_ln_voltage': 235.34,
   	'l3_phase': 3,
   	'max_current': 16.0,
   	'net_frequency': 49.99,
   	'num_phases': 3,
   	'power_factor': 0.0,
   	'session_departure_time': 1673110800,
   	'session_id': 0,
   	'state': 'Vehicle has paused charging',
   	'state_numeric': 5,
   	'target_current': 16.0,
   	'total_active_power': 0.0,
   	'type': 'CableType2',
   	'type_numeric': 2,
   	'vehicle_connected_phases': 'Three phases',
   	'vehicle_connected_phases_code': 0,
   	'vehicle_connected_phases_numeric': 3
   }
}

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

sonnencharger-0.2.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

sonnencharger-0.2.1-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file sonnencharger-0.2.1.tar.gz.

File metadata

  • Download URL: sonnencharger-0.2.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for sonnencharger-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4b0fcc3dd9c013a572979ddadf5d8730bddba3dffcc341559c23eed4657914a1
MD5 c4b28f6ad5a4a50507cd00a1101f4f81
BLAKE2b-256 c92d15bd5353631b7f69e96d25f53f771411682cac75f2a60618e40a0afe1a30

See more details on using hashes here.

File details

Details for the file sonnencharger-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: sonnencharger-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for sonnencharger-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26cdfca751ee88f9aa9cf7da27146c1c52c9c533fb931354b256cb05b67fb9db
MD5 bae15625ef0a854443be6099c339cbc7
BLAKE2b-256 db8737c6ec0176fb8a3254f728a48db6799a6190b5f9e4212b62595bbc447cbf

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