Skip to content

smartmeter datacollector configurator

Sascha Montellese edited this page Sep 14, 2021 · 3 revisions

Introduction

To simplify the process of generating a valid initial configuration for smartmeter-datacollector the smartmeter-datacollector-configurator web interface can be used. It supports

  • a graphical approach to manage the configuration
  • input validation to avoid invalid configurations
  • loading / saving / discarding a configuration
  • restarting smartmeter-datacollector (only if installed as a Debian package)

Requirements

If you use our custom Raspberry Pi Image the configurator tool comes preinstalled.

We also provide a Debian package and Python wheel. Please consult the README file.

How to Use

The web interface is accessible with the URL at http://<Raspberry Pi IP|Hostname>:8000/. Open the website in your favorite browser.

Authentication

Whenever you interact, i.e. load or deploy configuration or restart the services, you need to authenticate yourself with a password. As long as you keep the website open and do not refresh the page the password is stored in the background and you do not have to enter it again.

The default password is smartmeter, however we recommend changing it to an individual password as soon as possible.

Change the Password

  1. You can change the password by clicking the Change Password button.
  2. If not already authenticated you first need to enter the current password.
  3. Enter a new password (8 or more characters) and repeat it in the next field.
  4. Submit by pressing Change Password.

A notification at the top of the page indicates whether the process was successful. If you encounter an Authentication failed message the old password entered before was not valid.

Configurator

The page consists of controls at the top of the page to interact with the configuration backend and of a configuration panel to view and modify the settings.

General Settings

  • Application Logger Level: Defines the logging level the smartmeter-datacollector writes logs. (Default: WARNING)

Smart Meter Settings

Here you can add, modify or remove smart meters that are attached to the device. By clicking on the green + Smart Meter button a new smart meter configuration box appears. By clicking on the red trash bin symbol the corresponding box is removed again.

  • Type: Select one of the supported meter types which matches the connected smart meter model.
  • TTY USB Devices: If a USB dongle of the attached smart meter is found it is listed here. Select one device from the list if available. By pressing the refresh button on the right side the list can be updated.
    If however no devices are found but you know the device name enable option Enter custom port and enter the device name port in the above field.
  • Decryption Key (optional): If the data pushed from the smart meter is encrypted the application needs to decrypt the messages first. With this option a key in the form of 000102030405060708090A0B0C0D0E0F can be applied. If this field is left empty the application assumes that the received data is unencrypted.

Data Sink Settings

In the Data Sinks section the targets where the measurements are forwarded to are configured. Each sink type can be enabled once by clicking on the green + button or disabled by removing it with the red trash bin symbol.

Logger Sink

All measurements are printed to the console. If smartmeter-datacollector is run as a systemd service the log is written to the system journal (systemd-journald).

The name of the logger is DataLogger.

MQTT Sink

All measurements are sent to an MQTT broker (server). An MQTT topic is in the form of smartmeter/<smart meter ID>/<data point type>. The easiest way to get the topic names is to subscribe to the MQTT broker and receive updates to all topics. If you use the demo you can also find the data point types using Grafana and explore the data source (InfluxDB).

The available settings are:

  • Host (IP/Hostname): Host / IP address of the MQTT broker.
  • Port: Port number of the MQTT broker.
  • Use TLS protected connection: Whether to use TLS (Transport Layer Security). The following settings are only used if TLS is enabled.
    • CA Certificate (optional): PEM formatted CA certificate used to validate the MQTT broker's certificate
  • Use Authentication: Required if authentication is enabled in MQTT broker. For now, only username/password method supported in configurator.
    • MQTT Username: Username for authentication at the MQTT broker.
    • MQTT Password: Password for authentication at the MQTT broker.

Controls

Load Configuration

By clicking the Load Configuration button the current configuration is loaded and displayed on the screen.

Deploy Configuration

The Deploy Configuration button uploads the visible settings to the backend. If this process and the validation are successful the old configuration file is overwritten and the smartmeter-datacollector service is automatically restarted.

Restart Data Collector

This button restarts the smartmeter-datacollector service without applying a new configuration.

Restart Demo

If the demo is installed, i.e. using the Raspberry Pi Image, you can restart all services of the demo by pressing the Restart Demo button.

Discard Configuration

This control allows you to discard the visible configuration. Important: This only affects the local visible configuration in the browser. No modification on the backend / target device is made. Therefore, no authentication is required.