Metadata-Version: 2.5
Name: alfen-cli
Version: 0.1.0
Summary: CLI for the local HTTPS API of Alfen Eve / NG9xx EV chargers: properties, logs, transactions, reboot, signed meter values
Author: LoveKapibarasan
License-Expression: MIT
License-File: LICENSE
Keywords: alfen,charger,ev,eve,ng910,ocpp
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: requests>=2.28
Provides-Extra: signed
Requires-Dist: cryptography>=41; extra == 'signed'
Description-Content-Type: text/markdown

# alfen-cli

Command line client for the local HTTPS API of Alfen Eve / NG9xx EV chargers
(the API that ACE Service Installer and the charger's web UI use).

```bash
pip install alfen-cli            # add [signed] for `alfen verify`
export ALFEN_HOST=192.168.1.20 ALFEN_USERNAME=admin ALFEN_PASSWORD=...

alfen info                       # identity / model / firmware, no login
alfen categories
alfen get -c ocpp                # all properties in a category
alfen get 2126_0 OD_commBackOfficeURL_serverDomainAndPort
alfen set 20F2_3=ws://csms.example:8081 --string
alfen logs -n 100                # event log, plain text (unlike OCPP GetLog, which is encrypted)
alfen logs -f                    # follow
alfen transactions
alfen whitelist
alfen reboot --yes
alfen verify <meterPublicKey> <signedMeterData>   # Alfen/DZG signed meter value
```

`--json` gives machine-readable output.

## Notes

- The charger accepts **one API session at a time**. Logging in ends an open ACE Service
  Installer / web session and vice versa. `alfen` logs out when each command finishes.
- The charger uses a self-signed certificate and old TLS ciphers; certificate checks are off.
- Repeated wrong passwords can lock the account. Check credentials before scripting.
- `set` writes raw property ids. Some changes only apply after `reboot`.

## Credits

Property id → name mapping and the API flow are based on
[alfeneve](https://gitlab.com/LordGaav/alfen-eve) (MIT, Nick Douma).
