These are examples demonstrating how to use the BSM-WS36A-H01-1311-0000 (short BSM-WS36A) and the tools provided by its Python support.
Notation describes the notation used here. The examples assume a certain hard- and software setup presented in the prerequisites.
Note: This is a pre-release and some things might change for the final product.
This set of examples demonstrates how to interact with the device's Modbus interface. Most use cases could be easily explored using the BSM Tool.
The user manuals document the different screens shown by the meter. Baud Rate and Device Address describes how these values are actually displayed.
The examples assume that you have configured the RS-485 (nowadays officially
named EIA-485) device for communicating with the BSM-WS36A via the environment
variable BSMTOOL_DEVICE
. If not otherwise
stated, default communication
parameters are used,
thus not requiring to explicitly specify them when invoking the BSM Tool.
Let's dive into the actual examples:
- Changing Communication Parameters
- Setting and Updating Time
- Signed Snapshots
- Open Charge Metering Format (OCMF)
- chargeIT mobility Chargy and Custom Formats
- Electric Vehicle Charging Exchange Data
- Electric Vehicle Charging
You could also consult and debug the source code in this repository. The BSM
Python client could be found in
bauer_bsm/bsm/client.py
. Following
pySunSpec, there are two interfaces:
BsmClientDevice
meant for general use which follows the interface from pySunSpec'sClientDevice
SunSpecBsmClientDevice
which provides models and their data points directly as object attributes/properties as pySunSpec'sSunSpecClientDevice
and might come in handy for scripting
To see them in action, you could have a look at the BSM Tool's sources in
bauer_bsm/cli/bsmtool.py
.