File Format: Measurand

Measurand.cnf & Measurand.json

Measurand.cnf (Original Format)

The original file format is based on INI files and looks like this :-

{EnergyTypes}
etElectric|Elec|Electric
etGas|Gas|Gas

{EnergyUnits:etElectric}
eukW|kWh~kilowatt hour~kW~kilowatt|Y|Y
eukVA|kVAh~kVAh~kVA~kVA|Y|Y
eukVAr|kVArh~kVArh~kVAr~kVAr|Y|Y
eukVArl|kVArlh~kVArlh~kVArl~kVArl|Y|Y
euAmps|A~Amps|N|N
euVolts|V~Volts|N|N
euFrequency|Hz~Frequency (Hz)|N|N
euPF|PF~Power Factor|N|N
euPC|%~Percentage|N|N
eukgCO2|kg CO2~kg CO2~kg CO2/h~kg CO2/h|Y|Y
eukgCO2e|kg CO2e~kg CO2e~kg CO2e/h~kg CO2e/h|Y|Y

{EnergyUnits:etGas}
euCM|m³~Cubic Metre~m³/h~Cubic Metre per Hour|Y|Y
euCF|ft³~Cubic foot~ft³/h~Cubic Foot per Hour|Y|Y
euTherms|Thm~Therms~Thm/h~Therms per Hour|Y|Y
eukW|kWh~kilowatt hour~kW~kilowatt|Y|Y
euPC|%~Percentage|N|N
eukgCO2|kg CO2~kg CO2~kg CO2/h~kg CO2/h|Y|Y
eukgCO2e|kg CO2e~kg CO2e~kg CO2e/h~kg CO2e/h|Y|Y

This is only a small part of the original file to explain the rules of the format. The original has many more energy types.

Measurand.json (New format adopted in July 2012)

JSON is a standard cross-platform data exchange format based on Java.  It can be read by many programming languages and is particularly useful for exchanging web data as it is read natively by Javascript.  For more details see this Wikipedia article. The JSON version looks like this :-

{
    "Energy Types":{
        "etElectric":{
            "Internal Name":"etElectric",
            "Short Name":"Elec",
            "Long Name":"Electric",
            "Unit Types":{
                "eukW":{
                    "Internal Name":"eukW",
                    "Short Name":"kWh",
                    "Long Name":"kilowatt hour",
                    "Can Be Demand":true,
                    "Demand Short Name":"kW",
                    "Demand Long Name":"kilowatt",
                    "Can Be Totalled":true
                },
                "eukVA":{
                    "Internal Name":"eukVA",
                    "Short Name":"kVAh",
                    "Long Name":"kVAh",
                    "Can Be Demand":true,
                    "Demand Short Name":"kVA",
                    "Demand Long Name":"kVA",
                    "Can Be Totalled":true
                },
                "eukVAr":{
                    "Internal Name":"eukVAr",
                    "Short Name":"kVArh",
                    "Long Name":"kVArh",
                    "Can Be Demand":true,
                    "Demand Short Name":"kVAr",
                    "Demand Long Name":"kVAr",
                    "Can Be Totalled":true
                },
                "eukVArl":{
                    "Internal Name":"eukVArl",
                    "Short Name":"kVArlh",
                    "Long Name":"kVArlh",
                    "Can Be Demand":true,
                    "Demand Short Name":"kVArl",
                    "Demand Long Name":"kVArl",
                    "Can Be Totalled":true
                },
                "euAmps":{
                    "Internal Name":"euAmps",
                    "Short Name":"A",
                    "Long Name":"Amps",
                    "Can Be Demand":false,
                    "Can Be Totalled":false
                },
                "euVolts":{
                    "Internal Name":"euVolts",
                    "Short Name":"V",
                    "Long Name":"Volts",
                    "Can Be Demand":false,
                    "Can Be Totalled":false
                },
                "euFrequency":{
                    "Internal Name":"euFrequency",
                    "Short Name":"Hz",
                    "Long Name":"Frequency (Hz)",
                    "Can Be Demand":false,
                    "Can Be Totalled":false
                },
                "euPF":{
                    "Internal Name":"euPF",
                    "Short Name":"PF",
                    "Long Name":"Power Factor",
                    "Can Be Demand":false,
                    "Can Be Totalled":false
                },
                "euPC":{
                    "Internal Name":"euPC",
                    "Short Name":"%",
                    "Long Name":"Percentage",
                    "Can Be Demand":false,
                    "Can Be Totalled":false
                },
                "eukgCO2":{
                    "Internal Name":"eukgCO2",
                    "Short Name":"kg CO2",
                    "Long Name":"kg CO2",
                    "Can Be Demand":true,
                    "Demand Short Name":"kg CO2\/h",
                    "Demand Long Name":"kg CO2\/h",
                    "Can Be Totalled":true
                },
                "eukgCO2e":{
                    "Internal Name":"eukgCO2e",
                    "Short Name":"kg CO2e",
                    "Long Name":"kg CO2e",
                    "Can Be Demand":true,
                    "Demand Short Name":"kg CO2e\/h",
                    "Demand Long Name":"kg CO2e\/h",
                    "Can Be Totalled":true
                }
            }
        },
"etGas":{
    "Internal Name":"etGas",
    "Short Name":"Gas",
    "Long Name":"Gas",
    "Unit Types":{
        "euCM":{
            "Internal Name":"euCM",
            "Short Name":"m\u00B3",
            "Long Name":"Cubic Metre",
            "Can Be Demand":true,
            "Demand Short Name":"m\u00B3\/h",
            "Demand Long Name":"Cubic Metre per Hour",
            "Can Be Totalled":true
        },
        "euCF":{
            "Internal Name":"euCF",
            "Short Name":"ft\u00B3",
            "Long Name":"Cubic foot",
            "Can Be Demand":true,
            "Demand Short Name":"ft\u00B3\/h",
            "Demand Long Name":"Cubic Foot per Hour",
            "Can Be Totalled":true
        },
        "euTherms":{
            "Internal Name":"euTherms",
            "Short Name":"Thm",
            "Long Name":"Therms",
            "Can Be Demand":true,
            "Demand Short Name":"Thm\/h",
            "Demand Long Name":"Therms per Hour",
            "Can Be Totalled":true
        },
        "eukW":{
            "Internal Name":"eukW",
            "Short Name":"kWh",
            "Long Name":"kilowatt hour",
            "Can Be Demand":true,
            "Demand Short Name":"kW",
            "Demand Long Name":"kilowatt",
            "Can Be Totalled":true
        },
        "euPC":{
            "Internal Name":"euPC",
            "Short Name":"%",
            "Long Name":"Percentage",
            "Can Be Demand":false,
            "Can Be Totalled":false
        },
        "eukgCO2":{
            "Internal Name":"eukgCO2",
            "Short Name":"kg CO2",
            "Long Name":"kg CO2",
            "Can Be Demand":true,
            "Demand Short Name":"kg CO2\/h",
            "Demand Long Name":"kg CO2\/h",
            "Can Be Totalled":true
        },
        "eukgCO2e":{
            "Internal Name":"eukgCO2e",
            "Short Name":"kg CO2e",
            "Long Name":"kg CO2e",
            "Can Be Demand":true,
            "Demand Short Name":"kg CO2e\/h",
            "Demand Long Name":"kg CO2e\/h",
            "Can Be Totalled":true
        }
    }
}

 

Again, this is only a small sample, but the format is obviously much more verbose!  So why use it?  It is easier to read by a human and is practically self-documenting, whereas the previous format was positively hieroglyphic in places.  It is also an interchangeable standard format and allows the addition of new data without breaking old code – something which should make future changes quicker to implement.

Guide to adding energy types and units to JSON format file