Pi-900S/T Startup Config Documentation

1 User starting points

Startup Config can handle a various range of user setups. Either the user uploads a meterlist to the 900-unit or initiates a search for meters via the web interface. Any of PiiGAB 900-units S/T, SW/TW are supported and if the user works on a unit without internal wireless card, the user has to connect a wireless node to receive wireless meters. The wireless nodes supported so far are PiiGAB 900SW/TW and Elvaco CMi5110.

It’s possible to upload a meterlist with only ID numbers where the user must then verify the meters. Verification happens by a REQ_UD2 request, reading meters from wireless nodes, or from the internal wireless card.

All verified meters can be viewed in real-time and their data can be sent to overriding system. Startup config handles wired and wireless M-Bus meters, Modbus and Han-meters meters converted to M-Bus, and wireless nodes.

The template file created in Startup Config can be used in other facilities with the same setup and same composition of meters meaning it’s possible to make one template file for multiple identical facilities.

3 WebPage: Overview

Status Description
The meter has enough information for the configuration file and last reading by the user was successful. Wireless meter has a duration lower then one day (1440 minutes)
The meter has enough information for the configuration file but the last attempt by user to perform a read failed. Wireless meters has a duration higher then one day (1440 minutes)
The meter is not online and have not provided enough data for the configuration file

3.1 Button: Download meterlist

Download the list of all configured meters. The filename will be meterlist.csv. We recommend editing the meterlist in notepad++.

3.2 Button: Upload meterlist

Upload an existing meterlist from a PC. This may be a list with only ID-numbers or a full list. If you are unsure of the format, download the meterlist template by using the button “Download meterlist template”. If you do not have any wireless nodes in your system, then you must press the button “Verify meterlist” after uploading your meterlist. If you have wireless nodes in your system, that are not fully defined, you must first upload your meterlist, then search for the wireless nodes. This will verify your meterlist automatically. To see the format of the meterlist see: Meterlist format

By fully defined for a wireless node we mean have all the neccessary information. See below:

ID Manufacturer Version Medium Metertype

If the Node is defined as Node in the field Metertype and have the Status “Green” then it is fully defined.

3.3 Button: Download template

Download a template that explains the format for the meterlist.

3.4 Button: Auto-Create myconfig files

This button creates the main configuration file masterport_Mbus2Modbus.csv and myconfig.csv. The modbus file slaveport_Mbus2Modbus.csv are also created. Afterwards it restarts MBushub with masterport_Mbus2Modbus.csv and Quickpost with myconfig.csv as configuration file. Before the configuration files are created, the file template.csv will also be created.

3.5 Button: Remove meterlist

The meterlist can be removed to start from scratch. The wired meters and wireless nodes found through the search function in the Pi-900S/T will still be saved in separate files.

3.6 Button: Test unverified meters

Testing unverified meters involves the Pi-900S/T validating all fields which are necessary to create a meter template. This is a requirement for Quickpost to function correctly in both reading and sending meter data. Verification does not perform a check if the meters in the meterlist answer to a REQ_UD2 if the meter information is complete as shown in tbl. 1.

Table 1: Complete template
Id Manufacturer Version Medium Metertype Fabrication number (only required for wireless meters)
8 digit BCD 4 byte hex 1 byte hex 1 byte hex (W/N/R) 8 digit BCD

If the meterlist have been uploaded with only Id-numbers and the setup contains wireless nodes, it is strongly recommended that the user starts with “Search for wireless nodes”.

3.7 Button: Read all meters

This button checks if all the meters in your meterlist can answer to a REQ_UD2 request. The wired meters and wireless nodes in your meterlist will recieve up to three REQ_UD2 request.

The wireless meters will be read out from the internal wireless card, if unit has one and from wireless nodes, if wireless nodes are connected to the M-Bus loop and present in meterlist.

If a wireless meters duration is below one day then it get the status “Green”. If the duration is higher it gets the status “Yellow”. The time consumed during this operation depends on how many wired meters and wireless nodes you have in your meterlist.

3.8 Button: Add Wireless Meters

When you press this button all wireless meters from your internal wireless card (if 900-unit has one) and all wireless meters from wireless nodes (if wireless nodes are connected, present in the meterlist and verified as nodes) will be added to your meterlist. Meters with duration higher then 1440 minutes (one day) will recieve the status “Yellow” while meters with lower duration will receieve the status “Green”.

3.9 Button: Add Wired meters

When you press this button the wired meters and wireless nodes you have found through a Secondary Search or a Primary Search will be added to your meterlist. Warning: If the unit have been restarted or have lost power no meters will be added.

3.10 Button: Id number button

When you press the Id-number button for a individual meter you can see the real-time values from the meter. This will have no effect on the status for the meter. To change the status you have to use the buttons “Verify meterlist” or “Read meters”.

The timestamp in the header information for the wired meters will be accurate. To see the correct timestamp for the wireless meter you have to look at the timestamp object in the telegram or the duration object.

Since the system doesn’t update the meterlist automatically we cannot guarantee there are only wireless meters with duration lower than 1440 minutes (one day) in the list. The status will not change when pressing this button even if the duration for the meter is higher than 1440. To change the status you have to use the button “Verify meterlist” or “Read meters”. “Verify meterlist” will only change status on wireless meters while “Read meters” will change status on both wired and wireless meters.

The Pi-900 ask a REQ_UD2 question to the M-Bus physical masterport and all applications connected to the masterports 20000, 20001 and 20002.

3.11 Button: Add single meter

Fill in the meters ID-number. 8 digits. Only digits are allowed. If you fill in less then 8 digits there will be zeros prepended so the number will consist of 8 digits. The description field can not contain any white-space characters.

Table 2: Add single meter
ID-number Manufacturer Version Medium Wireless-key Description
8 digit BCD 4 digit hex 2 digit hex 2 digit hex 32 digits/alpha value 50 characters no white-spaces allowed
Mandatory Optional Optional Optional Optional Optional

3.12 Button: Edit meter

Here you can edit the meters in your meterlist in the following fields:

Table 3: Add single meter
ID-number Manufacturer Version Medium Wireless-key Description
8 digit BCD 4 digit hex 2 digit hex 2 digit hex 32 digits/alpha value 50 ASCII only characters no white-spaces allowed
Mandatory Optional Optional Optional Optional Optional

The description field will takes maximum 50 characters. No white spaces are allowed. Commonly used latin-1 characters will be converted to similar ascii-characters. Characters which we do not support will be converted to ‘?’. E.g Latin-1 table hex A0 - to BF will be converted ‘?’. All characters in the latin-1 table from hex C0 to hex FF will be converted to similar characters. See Latin-1 table

Table 4: ASCII conversion example
Latin-1 Converted to ASCII
å,ä a
ö,ø o
æ ae

3.13 Button: Upload encryption keys

Upload a file with the following structure:

ID-number Wireless-key
8 digit BCD 32 hexadecimal value

id;wireless-key

The file format must be either .txt or .csv. The values must be separated with a ‘;’. A file, <wireless_include_startup_config.csv> will be created. The meter you upload must be present in the meterlist to be added to this file. The wireless module will be restarted with <wireless_include_startup_config.csv> set as include file. If the wireless key are not 32 characters long or not in hexadecimal, the wireless key will not be added to the include file.

3.14 Button: Download encryption keys

Here you can download the encryption keys which are present in the meterlist. The same format as most wireless meter manufacturer use when they deliver the wireless-keys. The format is as follows:

ID-number Wireless-key
8 digit BCD 32 hexadecimal value

id;wireless-key

3.15 Button: Create PDF

Here you can export a PDF version of the meterlist. Make sure you have made a recent Read of the meters in the meterlist to get a as recent timestamp as possible. If you have set a name for the gateway this will be shown on top of the PDF.

4 WebPage: Templates

4.1 template.csv

This is a file containing all the different meter types in the facility. Each meter will get a template name. For example a Lansen meter with secondary address: 00015642.3033.02.2A will get the following template name: LAS_02_2A. It is a composition of each individual meters columns in the following way: LAS is manufacturer in text column[4] 02 is Medium column[2] 2A is Version column[3]

The template name is an important part of the template file. It’s the template name which connects each individual meter to the correct template in myconfig.csv. If this connection can’t be done then the meter cannot be read out in Quickpost.

4.2 Template Parameters

Table 5: Template parameters
Field Description
Format The format Quickpost will use to send the meter data.
Time format Default yyyy-mm-ddTHH:MM:SS (24).
Tag type Default Record (8)
Time stamp For wired meters “Quickpost”. For wireless meters “Telegram”.
Time record no For wireless meters recieved through a PiiGAB unit this value can be set to 4.
Read period Default empty.
Read offset Default empty.

For further information see documentation for Quickpost.

4.3 Auto-create Template

This function DO NOT work for facilities with wireless meters received through units which are not PiiGAB. In those facilities you have to manually add each metertype to the template.csv file. All metertypes in your meterlist will be added automatically.

4.4 Add metertype

To add a metertype to the template.csv press the meters Id-number in the list. Choose which Mbus-objects you want to report by pressing the ON/OFF field for each Mbus-object. If you only want one object it is faster to first uncheck the box “Report All” and check the box for the Mbus-object you want to report.

If you want to edit the Vif/Tag name for the object you can do this by pressing the Edit button for the object in the Edit column. A pop-up modal will appear where you can type in the new name. Characters that are not allowed are the following:

Not allowed Vif/Tag characters
# , ; < >

Press the button “Add metertype” to add the metertype template to template.csv.

4.5 Button: Remove Template

This button will remove the template.csv file. When you press this button all meters which id-number buttons are greyed out, will be available to add to the template file again. You can use this button when you want to start all over creating a template.csv file.

5 WebPage: My Meters

5.1 Button: Edit slaveport file

Here you can edit the mapped modbus registers created in slaveport_Mbus2Modbus.csv. Make sure you don’t have any duplicates of the modbus registers. Then the readout will fail.

5.2 myconfig.csv

This is the configuration file to use when reading out meter data in Quickpost. When creating the configuration file Quickpost will be restarted with this file as configuration file.

5.3 masterport_Mbus2Modbus.csv

MBusHub will restart with this file in the masterport when creating myconfig.csv and when Auto-create myconfig.csv. This file make it possible to both read out MBus objects in Quickpost and to convert MBus objects to Modbus registers through a MBusHub slaveport.

5.4 slaveport_Mbus2Modbus.csv

If you read out MBus meters over Modbus you need to place this file in the MBusHub slaveport which are making the readout. This file will map the modbus registers to the correct MBus objects.

5.5 Device name

The default device name format is <ID><MFCT><VER><MED>. This should be used if there are no other specific demands on the output file.

5.6 Device name: Description

If you use <Description> as device name it is important you do not use åäö in the description. You have to use ASCII letters only. If you readout the device and send with Quickpost the device name will be converted from UTF-8 to ASCII. This means the device name will change if you do not only use ASCII letters. All meter with a description in the decription field will get this as device name. The meters without description will get PiiGAB default device name <ID><MFCT><VER><MED>.

5.7 Channel name

Default channel name in the “myconfig.csv” file is the 900-units serial number. Channel name used in the template.csv file is ‘channel’.

5.8 Create myconfig.csv

This will create the configuration files which is used in the MBusHub masterport and in Quickpost to enable sending meter data with Quickpost.

5.9 Create myconfig.csv without shifting modbus registers

If you are NOT using Mbus2Modbus conversion you do not need to care about this button. Just use the regular create myconfig.csv button instead.

Here the meters which are not present in an earlier version of masterport_Mbus2Modbus.csv will be appended in the end of the masterport_Mbus2Modbus.csv file. The previously added modbus registers will not be affected by new meters.

6 Status description

The status will only change if the user press any of the buttons “Verify meterlist” or “Read meters”. When the user press the meters ID-number to read out the real-time values, the status will not change.

The functions mbus_secondary_search and mbus_primary_search set the status to “Green” if a response is received from a REQ_UD2 request to the wired meter and the wireless node.

The make_node_meterlist set the status “Yellow” to wireless meters if the meters id-number is found in /tmp/meterlist_wireless.txt and the duration is higher then one day. If the duration is lower the meter gets the status “Green”.

For wired meters the function verify_meterlist give the status “Green” if the meter recieve a respons from a REQ_UD2 request. The REQ_UD2 request will only be asked to a meter with either not enough information in the meter fields or the parameter verifyMeter is set to “True”.

Table 6: Meter status
Status Value Description
Red 0 No response or not enough information to add the meter to the template thus not all of the required fields have been filled.
Yellow 10 There’s enough information to construct a template (wireless meters must have a fabrication number). If a wired meter have the status “Green”, and recieves a REQ_UD2 but give no response, when user press “Read meters”, the status will go from “Green” to “Yellow”.
Green 20 For wired meters all required fields are present and can answer a REQ_UD2 request. For wireless meters all fields are present, can answer to a REQ_UD2 request, and have a duration lower then one day. If a meter in meterlist_wireless.txt to not contain all the fields. Id,Mfct,Ver,Med,Fabrication,Metertype, then it is an error.

7 File descriptions

Type Description
integer A non-negative whole number of the range
hexadecimal A non-negative number in base 16 consisting of 0-9 and a-f representing ranges 0-9 and 10-15 respectively.
text Ascii is preferable, ISO-8859-1 is ok. All ISO-8859 should work ok. UTF-8 needs more testing.
verification set Integers: Red not verified, Yellow enough info for template, Green REQ_UD2 response


Table 7: meterlist.csv (colon or semiclon separated)
Field Type
ID Identification number in BCD form (see 1, pp. 34-35)
Manufacturer Hexadecimal
Version Hexadecimal
Medium Hexadecimal (see 1, pp. 76 for the list of possible values)
Manufacturer (text) Three character text string representing the manufacturer
Fabrication number Integer
Primary address Integer between 0 and 250 inclusive
Status Integers: Red,Yellow,Green
Meter type set of types as a string
Wireless key 32 byte long alpha/numeric value
Description Max 50 characters long ASCII string. No whitespaces allowed. Commonly used Latin-1 characters will be converted to ASCII.
Timestamp Timestamp from when the meter was last readout. To update the timestamp you need to press the button “Read all meters”.


Table 8: Meter type
Meter type Description
R Wireless
W Wired
N Wireless Node
H Hanbus meter
M Modbus meter