Skip to main content

API Client for Alfen Eve EV charging units.

Project description

API Client for Alfen Eve EV charging units.

Installation

As a CLI tool:

$ pip install alfeneve[cli]

As a library:

$ pip install alfeneve

Configuration

The CLI tool uses omniconf . This allows you to provide any CLI argument using a file or through the environment (or a combination).

Directly as arguments:

$ alfen-eve --alfen-ipaddress 192.168.1.23 --alfen-username admin --alfen-password foo

Using a YAML file (make sure to install PyYAML, or use omniconf[yaml]):

$ cat settings.yaml
alfen:
  ipaddress: 192.168.1.23
  username: admin
  password: foo

 $ alfen-eve --yaml-filename settings.yaml

Using environment variables:

$ ALFEN_IPADDRESS=192.168.1.23 ALFEN_USERNAME=admin ALFEN_PASSWORD=foo alfen-eve

Examples

Use as a CLI tool:

$ alfen-eve --mode categories
category
----------
generic
generic2
accelero
temp
states
meter1
meter4
leds
ocpp
display
comm
MbusTCP

$ alfen-eve --mode properties --properties-category meter4
name                                   value  id       cat
-----------------------------  -------------  -------  ------
OD_sensOptionalEnergyMeter4      5            5217_0   meter4
OD_sensEnergyMeterType4          1            5218_0   meter4
meter4_voltageL1N              225.1          5221_3   meter4
meter4_voltageL2N              225.7          5221_4   meter4
meter4_voltageL3N              228.6          5221_5   meter4
...

Use as a library:

from alfeneve.alfen import Alfen
from pprint import pprint

eve = Alfen("http://192.168.1.23", ("admin", "foo"))

cats = eve.categories()
pprint(cats)
# ['generic',
#  'generic2',
#  'accelero',
#  'temp',
#  'states',
#  'meter1',
#  'meter4',
#  'leds',
#  'ocpp',
#  'display',
#  'comm',
#  'MbusTCP']

pprint(a.properties(category=cat[0]))
# [<AlfenProperty(name=OD_manufacturerDeviceName, value=NG910, id=1008_0, cat=generic)>,
#  <AlfenProperty(name=OD_manufacturerHardwareVersion, value=G0, id=1009_0, cat=generic)>,
#  <AlfenProperty(name=OD_manufacturerSoftwareVersion, value=4.8.0-3168, id=100A_0, cat=generic)>,
#  ... ]

License

MIT

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

alfeneve-0.5.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

alfeneve-0.5.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file alfeneve-0.5.0.tar.gz.

File metadata

  • Download URL: alfeneve-0.5.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for alfeneve-0.5.0.tar.gz
Algorithm Hash digest
SHA256 791900fee13eaa0c27640a346ac731d1589a9d08918ee54095a4b6c0cd09d71f
MD5 37b1bb9b728f9aad5cd411eb8deb56aa
BLAKE2b-256 098c17a6d0e4057b8e54382f06a5e8423edac41aade0fe22761835d4bcc94998

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: alfeneve-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for alfeneve-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcced34288696ecde21b478a2b3ac7a599a505ab0cf3541f2e3504162f63907a
MD5 399f2368f442a0d6030343a05df30f00
BLAKE2b-256 188e88bad92700a9f40fad7b986bc9ae44ca417167ba1fa1f2081be95a7d22d6

See more details on using hashes here.

Provenance

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