MODBUS

This wiki page describes the MODBUS plugin.
See also M-Bus.

There is basic MODBUS support available. Currently only MODBUS RTU over serial cable is supported, either directly connected or using a TCP to serial stream created by ser2net. Read Holding Registers function 03 is used to read values of different lengths, these are selected by using the appropriate devicetype. MODBUS devices need to be polled for values.

Requirements

MODBUS support has the following requirements:
  • DomotiGa 1.0.023 or higher

Installation

To use MODBUS RTU with DomotiGa you can use an USB to RS485 FTDI Interface.
Configure the MODBUS devices with the wanted slave addresses and lookup the registers addresses you want to read.

Address format is <slave address>:<register>, slave adress is specific in hexadecimal notation, ranging from 1-247, the register address is expected in hexadecimal notation like 3B12

Some device manuals show the register in decimal value and then this value needs to be converted to hexadecimal and normally you need to substract the value with 1. So if your manual shows register value of '3110' this is 'C26' in hexadecimal, but you need to configure 'C25' (C26 minus 1) as register value. The address in the device will be then '1:C25'.


Example

Ado64 borrowed me a Carlo Gavazzi EM21-72D meter to test, see attached documentation for it's specs/protocol.
You can read a lot of values from it, a few of them are:

Value Register (hex) Label
Mains Freq 33 Hz
Mains Voltage L1 0 Volt*10
Mains Watt L1 12 Watt*10

Resources

    Updated by: Alexie, Updated 3 months ago
    Access count: 30565 since 2011-11-13

    Attached Files

    Modbus_Application_Protocol_V1_1b.pdf (321 KB) rdnzl, 05/13/2016 10:27 PM

    EM21 Modbus.pdf (145 KB) rdnzl, 05/13/2016 10:35 PM

    EM21.jpg (18.7 KB) rdnzl, 05/13/2016 10:46 PM

    Modbus-Logo.png (5.63 KB) rdnzl, 05/13/2016 10:49 PM

    Modbus_Application_Protocol_V1_1b3.pdf (795 KB) Alexie, 05/31/2016 02:21 PM

    Also available in: PDF HTML TXT