Manual version 2019-12-13.
This manual is correct but incomplete.
MBusHub is an MBus splitter and an MBus to Modbus/MBusAscii converter. Its functionality is in part derived from the PiiGAB M-Bus OPC server.
It has a few masterports and slaveports. The masterports can be connected to the wired M-Bus meters or Wireless to wired nodes.
One masterport is configurable and can be connected to any serial/ethernet port except for the "M-Bus Slave" ports.
There are three hard coded internal master ports that can be connected to internal processes with M-Bus slave inputs like the wireless program, Modbus2MBus and Han2MBus.
The program is sold with either two or four slaveports. The slaveports can be connected to any serial/ethernet port except for the "M-Bus Master" port.
The slaveport can be configured with three different protocols. M-Bus, MBusAscci and Modbus.
M-Bus: | The connection is transparent. The client is responsible for reading out the M-Bus telegrams. The telegrams are not cached in the Pi-900. |
---|---|
Modbus: | This requires an MBus2Modbus license and two CSV configuration files. One for the masterport and one for the Modbus slaveport. The configuration must be done in the PiiGAB M-Bus Explorer program. |
MBusAscii: | This is an internal protocol designed at PiiGAB. It may be used for any purpose but is used as an intermediate between MBusHub and Quickpost in the Pi-900. A single CSV configuration file is needed for this protocol. It can be created inside Pi-900 version >=2019-11-01 or in the PiiGAB MBus Explorer. |
There may be up to 4 clients sending requests simultaneously. The requests will land in a queue and will be answered as soon as an answer arrives. MBusAscii and Modbus requests will make a telegram cache which will speed up communication within the cache expiry time.
The masterport has a timeout that must be set as the longest time it may take to transfer a single telegram from the meter to the Pi-900, 261 byte.
The slaveport timeout is more difficult. A request may land behind a few earlier requests on other slaveports and these may take time. The user must estimate the time it takes to make a full readout on all slaveports.
Important
Restart for every update: | |
---|---|
If one of the CSV files are changed, MBusHub must be restarted. MBusHub is restarted every time a port configuration is changed. |
There are two main types of port configurations. Ethernet and serial ports that will be repeated through the whole configuration.
Type: |
---|
Ethernet ports. Possible values, UDP/TCP.*
If the port is a slaveport, the local port can be set.
Default values for Slaveport 1 to 4 is 10001 to 10004 respectively
If the port is a masterport, the remote IP-number and remote port can be set.
Serial Ports
Com port: | If the port is a slaveport, possible values are: RS-232, M-Bus Slave, RS-485 (rare for M-Bus). If the port is a masterport, possible values are: M-Bus Master, RS-232, (RS-485 rare for M-Bus). |
---|---|
Baud rate: | Default 2400. Possible values 300, 600, 1200, 2400, 4800, 9600, 19200, 38400 baud/second. |
Bit number: | Default 8. Possible values are 5, 6, 7, 8. For the M-Bus protocol it is hardcoded to 8. |
Parity: | Default "Even Parity". Possible values are Even, Odd, No, Mark and Space. For the M-Bus protocol parity is hardcoded to Even. |
Stop bit: | Default 1. Possible values 1, 2. For the M-Bus protocol stop-bit is hardcoded to 1. |
Warning: | Be careful about overlapping ports. The same port cannot be used by two applications at once and there is no mechanism to check whether two or more ports overlap. |
For version >= 2.03.03 there are three unconfigurable masterports that can connect to localhost via UDP.
UDP localhost port 20000. Default for the Wireless application.
UDP localhost port 20001. Default for the Modbus2MBus application.
UDP localhost port 20002. Default for the Han2MBus application.
The Pi-900 applications with M-Bus slaveports are by default configured to listen to these extra masterports.
Type: | See description above. |
---|---|
Timeout (ms): | Timeout measured from the last byte in a request sent to a meter until a full telegram has been received from the meter. Default 2000 ms. |
Reconnect (s): | Only needed for TCP connections. If a TCP connection is lost for more than reconnect time a new connection is made. |
Protocol: | Hard coded to M-Bus. |
Configuration file: | |
CSV configuration file. Used for converting M-Bus datarecords and other data to Modbus and MBusAscii. Not needed for transparent M-Bus communication. If you are using the new web interface, this file will be named myconfig.csv. Notice that MBusHub needs to be restarted every time the CSV file is changed (saving of config files restarts MBusHub). |
The M-Bus standard allows meter manufactures to define their own VIB tables. MBusHub supports some of them and if your meter is not supported, please contact PiiGAB.
The following meters are supported:
ABB 02 02 ABB 03 02 ABB 04 02 ABB 05 02 ABB 06 02 ABB 07 02 ABB 08 02 ABB 10 02 ABB 11 02 ABB 20 02 (Fully tested) GAV 2D 02 GAV 2F 02 GAV 39 02 GAV 40 02 GAV 31 02 GAV 32 02 GAV 46 02 GAV 5A 02 KAM One table for all Kamstrup meters.