Skip to content

Latest commit

 

History

History
91 lines (70 loc) · 4.14 KB

README.md

File metadata and controls

91 lines (70 loc) · 4.14 KB

Bauer BSM-WS36A-H01-1311-0000 Examples

Overview

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.

Modbus Interface

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.

Display Interface

The user manuals document the different screens shown by the meter. Baud Rate and Device Address describes how these values are actually displayed.

Examples

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:

Use the Source, Luke

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's ClientDevice
  • SunSpecBsmClientDevice which provides models and their data points directly as object attributes/properties as pySunSpec's SunSpecClientDevice 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.