Documentation

Integrations / Connection guides / Janitza

Janitza

Janitza has a wide range of energy and power monitoring sensors. These sensors help you gain a comprehensive overview of your energy supplies and introduce widely accepted measures and standards (e.g. EN50160 for power quality). For this tutorial we use the Janitza UMG 604-PRO, but this guide will work for many other power analyzers that Janitza provides.

Goal

The goal is to set up a Modbus integration with, in this case the Janitza UMG 604-PRO. This is possible using Modbus TCP and RTU using an ethernet or serial connection and connected to a gateway device which supports Modbus.

Prerequisites

Make sure that you have prepared the following:

  1. A Janitza setup
  2. A gateway device capable of communicating Modbus TCP or Modbus RTU
  3. Either a ethernet cable or cables to hook up serial communication.
Modbus connectivity

In the Modbus handbook of the UMG 604-PRO you can find most information needed to communicate with the Janitza. Setting up Modbus communication for both TCP and RTU depends on the device used to connect to the Janitza. The first thing you need to know is the Device/Slave ID. On the Janitza this can be configured on the device itself.

Modbus TCP

You will need to do the following to set up Modbus TCP

  1. Connect both the Janitza and the device to read out the Janitza to the same network.
  2. Find and configure the Device/Slave ID.
  3. Find and configure the Janitza’s IP address. The IP address is usually obtained by accessing the router connected to the Janitza.
  4. Find and configure the Janitza’s port. In most cases Modbus uses the port 502 by default.
Modbus RTU

You will need to do the following to set up Modbus RTU

  1. Connect the Janitza’s serial interface (RS232 or RS485) to the serial interface of the device you want to connect to it.
  2. Find and configure the Device/Slave ID.
  3. Configure the baud rate, data bits, parity and stop bits for serial communication. These are determined by Janitza and can be found in the handbook.
Requesting data

Both RTU and TCP request data in a similar way. These are the typical configurations needed for a Modbus request.

  1. Find the address of the data you want to request.
  2. Determine the data type of the request.
  3. Determine the length of the request.

For example if we want to request the Voltage L1-N from the Janitza you would need to give a start address of 19000 and a length of 2. The length is 2 because Janitza defined a float to be 32-bit and a Modbus address is 16-bits. If we want to read out Voltage L1-N (19000), Voltage L2-N (19002) and Voltage L3-N (19004) we can give a start address of 19000 and a length of 6. This will give us a list with our three data points.

Important to keep in mind:

Depending on the device you use, the Modbus start address can be different. Some Modbus masters start at 0 and others at 1. Make sure that when you have a Modbus master that starts from 1 (e.g. a Teltonika device) you correct all addresses for this. Janitza's documented addresses start at 0, so for example Voltage L1-N with address 19000 becomes 19001.