Format change in xmq drivers. Fields must be inside a fields block and use must be inside a library block. Backwards incompatible change!

pull/1387/head
Fredrik Öhrström 2024-09-29 09:52:26 +02:00
rodzic 1571e2b52f
commit 6537d1b1e6
22 zmienionych plików z 2090 dodań i 2015 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ MQTT, curled to a REST api, inserted into a database or stored in a log file.
[FAQ/WIKI/MANUAL pages](https://github.com/wmbusmeters/wmbusmeters)
- Supported architectures
- Supported architectures
- ARMv7 32-bit (`armv7`)
- ARMv8 64-bit (`arm64`)
- Linux x86-64 (`amd64`)
@ -22,7 +22,7 @@ docker run -d --privileged \
-v /etc/localtime:/etc/localtime:ro \
-v /opt/wmbusmeters:/wmbusmeters_data \
-v /dev/:/dev/ \
wmbusmeters/wmbusmeters
wmbusmeters/wmbusmeters
```
### Command line Options
@ -55,14 +55,6 @@ Then, `docker-compose pull` can be used to pull the latest wmbusmeters/wmbusmete
If security is of concern - it is also possible to run docker container without privileged mode with non-RTLSDR dongles. For RTLSDR symlink passing to docker image is not working due to the fact that rtl_ binaries are looking for a full usb bus path in the system to identify device.
Before running the command that creates the wmbusmeters docker container, udev rules must be added to create usb device symlink in order to have persistent link to device across host restarts and reconnects of usb device:
```
cat <<EOF > /etc/udev/rules.d/99-wmbus-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="im871a", MODE="0660", GROUP="docker"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="amb8465", MODE="0660", GROUP="docker"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2047", ATTRS{idProduct}=="0863", SYMLINK+="rfmrx2", MODE="0660", GROUP="docker"
EOF
```
### Command line for container download and run
@ -72,8 +64,8 @@ docker run -d \
--restart=always \
-v /etc/localtime:/etc/localtime:ro \
-v /opt/wmbusmeters:/wmbusmeters_data \
--device=/dev/im871a \
wmbusmeters/wmbusmeters
--device=/dev/ttyUSB0 \
wmbusmeters/wmbusmeters
```
### Command line Options

Wyświetl plik

@ -14,7 +14,7 @@ web:
tests:
@echo -n "// Generated " > build/generated_tests.xmq
@date +%Y-%m-%d_%H:%M >> build/generated_tests.xmq
@for i in $(wildcard src/*) ; do xmq $$i select /driver/test to-xmq >> build/generated_tests.xmq; done
@for i in $(wildcard src/*) ; do xmq $$i select /driver/tests/test to-xmq >> build/generated_tests.xmq; done
install: database tests
@grep -v "// Generated " < build/generated_database.cc > build/a
@ -26,6 +26,9 @@ install: database tests
@if ! diff build/a build/b ; then \
cp build/generated_tests.xmq ../tests/generated_tests.xmq ; echo "Installed tests." ; else echo "No changes test." ; fi
pretty:
@for i in $(wildcard src/*.xmq) ; do xmq $$i > tmp ; mv tmp $$i ; done
test:
@for i in $(wildcard src/*) ; do ./test.sh $(PROG) $$i ; done

Wyświetl plik

@ -33,7 +33,7 @@ for i in src/*.xmq
do
NAME=$(basename $i)
NAME="${NAME%.*}"
CONTENT="$(xmq $i delete /driver/test delete "//comment()" to-xmq --compact | sed 's/"/\\"/g')"
CONTENT="$(xmq $i delete /driver/tests/test delete "//comment()" to-xmq --compact | sed 's/"/\\"/g')"
cat >>$OUT <<EOF
{ "$NAME", "$CONTENT", false },
EOF

Wyświetl plik

@ -6,71 +6,77 @@ driver {
detect {
mvt = IMT,01,07
}
use = total_m3,meter_datetime,target_m3,target_date
field {
name = status
quantity = Text
info = status_and_error_flags
attributes = INCLUDE_TPL_STATUS
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
library {
use = total_m3,meter_datetime,target_m3,target_date
}
fields {
field {
name = status
quantity = Text
info = status_and_error_flags
attributes = INCLUDE_TPL_STATUS
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
}
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xffff
default_message = OK
map {
name = LOW_BATTERY
info = 'Low Battery – 18 months before end of life'
value = 0x04
test = Set
}
map {
name = TEMPORARY_ALARM
info = 'Temporary alarm - Manipulation/module removed'
value = 0x10
test = Set
}
map {
name = LEAKAGE
info = Leakage
value = 0x20
test = Set
}
map {
name = BURST
info = Burst
value = 0x30
test = Set
}
}
}
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xffff
default_message = OK
map {
name = LOW_BATTERY
info = 'Low Battery – 18 months before end of life'
value = 0x04
test = Set
field {
name = total_tariff1
quantity = Volume
match {
measurement_type = Instantaneous
vif_range = Volume
tariff_nr = 1
}
map {
name = TEMPORARY_ALARM
info = 'Temporary alarm - Manipulation/module removed'
value = 0x10
test = Set
}
map {
name = LEAKAGE
info = 'Leakage'
value = 0x20
test = Set
}
map {
name = BURST
info = 'Burst'
value = 0x30
test = Set
}
field {
name = battery
quantity = Time
display_unit = y
// Divide by 365
force_scale = 0.0027397260273972603
match {
measurement_type = Instantaneous
difvifkey = 02FD74
}
}
}
field {
name = total_tariff1
quantity = Volume
match {
measurement_type = Instantaneous
vif_range = Volume
tariff_nr = 1
tests {
test {
args = 'AqWater aquastream 05933237 NOKEY'
telegram = 4644B42557920410050E7237329305B42501075B0030252F2F_04130342000084101300000000046D0D30F62B441349180000426CFF2A02FD17000002FD74DB152F2F2F2F2F2F2F
json = '{"id": "05933237","media": "water","meter": "aquastream","meter_datetime": "2023-11-22 16:13","name": "AqWater","status": "OK","target_date": "2023-10-31","target_m3": 6.217,"timestamp": "1111-11-11T11:11:11Z","total_m3": 16.899,"total_tariff1_m3": 0,"battery_y": 15.328767}'
fields = 'AqWater;05933237;16.899;1111-11-11 11:11.11'
}
}
field {
name = battery
quantity = Time
display_unit = y
// Divide by 365
force_scale = 0.0027397260273972603
match {
measurement_type = Instantaneous
difvifkey = 02FD74
}
}
test {
args = 'AqWater aquastream 05933237 NOKEY'
telegram = 4644B42557920410050E7237329305B42501075B0030252F2F_04130342000084101300000000046D0D30F62B441349180000426CFF2A02FD17000002FD74DB152F2F2F2F2F2F2F
json = '{"id": "05933237","media": "water","meter": "aquastream","meter_datetime": "2023-11-22 16:13","name": "AqWater","status": "OK","target_date": "2023-10-31","target_m3": 6.217,"timestamp": "1111-11-11T11:11:11Z","total_m3": 16.899,"total_tariff1_m3": 0,"battery_y": 15.328767}'
fields = 'AqWater;05933237;16.899;1111-11-11 11:11.11'
}
}

Wyświetl plik

@ -6,194 +6,200 @@ driver {
detect {
mvt = APA,42,04
}
use = fabrication_no
use = on_time_h
use = on_time_at_error_h
field {
name = meter
quantity = PointInTime
info = 'Meter date when telegram was sent.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
}
library {
use = fabrication_no
use = on_time_h
use = on_time_at_error_h
}
field {
name = t2_temperature
quantity = Temperature
info = 'Temperature of returned water.'
match {
measurement_type = Instantaneous
vif_range = ReturnTemperature
fields {
field {
name = meter
quantity = PointInTime
info = 'Meter date when telegram was sent.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
}
}
}
field {
name = t1_temperature
quantity = Temperature
info = 'Temperature of incoming water.'
match {
measurement_type = Instantaneous
vif_range = FlowTemperature
field {
name = t2_temperature
quantity = Temperature
info = 'Temperature of returned water.'
match {
measurement_type = Instantaneous
vif_range = ReturnTemperature
}
}
}
field {
name = current_power
quantity = Power
info = 'Instantaneous power consumed.'
match {
measurement_type = Instantaneous
vif_range = AnyPowerVIF
field {
name = t1_temperature
quantity = Temperature
info = 'Temperature of incoming water.'
match {
measurement_type = Instantaneous
vif_range = FlowTemperature
}
}
}
field {
name = current_volume_flow
quantity = Flow
info = 'Instantaneous water flow.'
match {
measurement_type = Instantaneous
vif_range = VolumeFlow
field {
name = current_power
quantity = Power
info = 'Instantaneous power consumed.'
match {
measurement_type = Instantaneous
vif_range = AnyPowerVIF
}
}
}
field {
name = total_volume
quantity = Volume
info = 'Total volume of water used.'
match {
measurement_type = Instantaneous
vif_range = AnyVolumeVIF
field {
name = current_volume_flow
quantity = Flow
info = 'Instantaneous water flow.'
match {
measurement_type = Instantaneous
vif_range = VolumeFlow
}
}
}
field {
name = total_energy
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
field {
name = total_volume
quantity = Volume
info = 'Total volume of water used.'
match {
measurement_type = Instantaneous
vif_range = AnyVolumeVIF
}
}
}
field {
name = status
quantity = Text
info = 'Status and error flags.'
attributes = INCLUDE_TPL_STATUS
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
field {
name = total_energy
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
}
}
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xffff
default_message = OK
map {
name = MINIMUM_FLOW
info = 'Average minute flow is below the minimum flow and higher than the starting flow.'
value = 0x01
test = Set
field {
name = status
quantity = Text
info = 'Status and error flags.'
attributes = INCLUDE_TPL_STATUS
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
}
map {
name = FLOW_METER_FAILURE
info = 'No flow detected and temperature diff is higher than threshold.'
value = 0x02
test = Set
}
map {
name = RETURN_TEMPERATURE_ERROR
info = 'Temperature is out of measurement range or the sensor is broken.'
value = 0x04
test = Set
}
map {
name = SUPPLY_TEMPERATURE_ERROR
info = 'Temperature is out of measurement range or the sensor is broken.'
value = 0x08
test = Set
}
map {
name = DIFFERENTIAL_TEMPERATURE_ERROR
info = 'The temperature differences (eg supply-return) exceeds a threshold.'
value = 0x10
test = Set
}
map {
name = MAXIMUM_FLOW
info = 'Average minute flow Qs is higher than Qp and equal to or lower than 2Qp (Qp < Qs ≤ 2 * Qp).'
value = 0x20
test = Set
}
map {
name = MEMORY_FAILURE
info = 'Critical internal error.'
value = 0x40
test = Set
}
map {
name = LOW_BATTERY_VOLTAGE
info = 'Low battery voltage.'
value = 0x80
test = Set
}
map {
name = DAILY_ABNORMAL_NOMINAL_FLOW
info = 'Nominal flow is detected at Q > Qp for 1 h per day (24 h)
where one day is measured from the moment the overrun is detected.'
value = 0x100
test = Set
}
map {
name = ANNUAL_ABNORMAL_NOMINAL_FLOW
info = 'Nominal flow is detected at Q > Qp for 200 h in 1 year
where one year is calculated from the start of billing period n to
the start of billing period n+1 (which is when the annual data is saved to the archive).'
value = 0x200
test = Set
}
map {
name = DIFFERENTIAL_TEMPERATURE_TOO_LOW
info = 'The volume count is incremented in 3 consecutive integration cycles while
the differential temperature is below the configured differential temperature
insensitivity threshold.'
value = 0x400
test = Set
}
map {
name = CRC_ERROR
info = 'Critical internal error in firmware vs saved model.'
value = 0x800
test = Set
}
map {
name = FLASH_ERROR
info = 'Critical internal error when reading non-volatile flash memory.'
value = 0x1000
test = Set
}
map {
name = CRITICAL_BATTERY_VOLTAGE
info = 'Critical low battery voltage.'
value = 0x2000
test = Set
}
map {
name = CPU_OVERTEMPERATURE
info = 'CPU is overheating.'
value = 0x4000
test = Set
}
map {
name = UART_LIMIT_OVERRUN
info = 'Sent and received bytes exceeds the byte count limit.'
value = 0x8000
test = Set
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xffff
default_message = OK
map {
name = MINIMUM_FLOW
info = 'Average minute flow is below the minimum flow and higher than the starting flow.'
value = 0x01
test = Set
}
map {
name = FLOW_METER_FAILURE
info = 'No flow detected and temperature diff is higher than threshold.'
value = 0x02
test = Set
}
map {
name = RETURN_TEMPERATURE_ERROR
info = 'Temperature is out of measurement range or the sensor is broken.'
value = 0x04
test = Set
}
map {
name = SUPPLY_TEMPERATURE_ERROR
info = 'Temperature is out of measurement range or the sensor is broken.'
value = 0x08
test = Set
}
map {
name = DIFFERENTIAL_TEMPERATURE_ERROR
info = 'The temperature differences (eg supply-return) exceeds a threshold.'
value = 0x10
test = Set
}
map {
name = MAXIMUM_FLOW
info = 'Average minute flow Qs is higher than Qp and equal to or lower than 2Qp (Qp < Qs ≤ 2 * Qp).'
value = 0x20
test = Set
}
map {
name = MEMORY_FAILURE
info = 'Critical internal error.'
value = 0x40
test = Set
}
map {
name = LOW_BATTERY_VOLTAGE
info = 'Low battery voltage.'
value = 0x80
test = Set
}
map {
name = DAILY_ABNORMAL_NOMINAL_FLOW
info = 'Nominal flow is detected at Q > Qp for 1 h per day (24 h)
where one day is measured from the moment the overrun is detected.'
value = 0x100
test = Set
}
map {
name = ANNUAL_ABNORMAL_NOMINAL_FLOW
info = 'Nominal flow is detected at Q > Qp for 200 h in 1 year
where one year is calculated from the start of billing period n to
the start of billing period n+1 (which is when the annual data is saved to the archive).'
value = 0x200
test = Set
}
map {
name = DIFFERENTIAL_TEMPERATURE_TOO_LOW
info = 'The volume count is incremented in 3 consecutive integration cycles while
the differential temperature is below the configured differential temperature
insensitivity threshold.'
value = 0x400
test = Set
}
map {
name = CRC_ERROR
info = 'Critical internal error in firmware vs saved model.'
value = 0x800
test = Set
}
map {
name = FLASH_ERROR
info = 'Critical internal error when reading non-volatile flash memory.'
value = 0x1000
test = Set
}
map {
name = CRITICAL_BATTERY_VOLTAGE
info = 'Critical low battery voltage.'
value = 0x2000
test = Set
}
map {
name = CPU_OVERTEMPERATURE
info = 'CPU is overheating.'
value = 0x4000
test = Set
}
map {
name = UART_LIMIT_OVERRUN
info = 'Sent and received bytes exceeds the byte count limit.'
value = 0x8000
test = Set
}
}
}
}
test {
args = 'Heato elf2 23170428 NOKEY'
telegram = 684E4E68080172280417230106420455000000_0C7828041723026C103902FD1700000E0A6342693401000C13634630000A3B00000A2D00000A5A49020A5E44020C22762101003C2215000000047E17090000_4116
json = '{"current_power_kw": 0,"current_volume_flow_m3h": 0,"fabrication_no": "23170428","id": "23170428","media": "heat","meter": "elf2","meter_date": "2024-09-16","name": "Heato","on_time_at_error_h": 15,"on_time_h": 12176,"status": "OK","t1_temperature_c": 24.9,"t2_temperature_c": 24.4,"timestamp": "1111-11-11T11:11:11Z","total_energy_kwh": 3741.507306,"total_volume_m3": 304.663}'
fields = 'Heato;23170428;OK;3741.507306;1111-11-11 11:11.11'
tests {
test {
args = 'Heato elf2 23170428 NOKEY'
telegram = 684E4E68080172280417230106420455000000_0C7828041723026C103902FD1700000E0A6342693401000C13634630000A3B00000A2D00000A5A49020A5E44020C22762101003C2215000000047E17090000_4116
json = '{"current_power_kw": 0,"current_volume_flow_m3h": 0,"fabrication_no": "23170428","id": "23170428","media": "heat","meter": "elf2","meter_date": "2024-09-16","name": "Heato","on_time_at_error_h": 15,"on_time_h": 12176,"status": "OK","t1_temperature_c": 24.9,"t2_temperature_c": 24.4,"timestamp": "1111-11-11T11:11:11Z","total_energy_kwh": 3741.507306,"total_volume_m3": 304.663}'
fields = 'Heato;23170428;OK;3741.507306;1111-11-11 11:11.11'
}
}
}

Wyświetl plik

@ -1,25 +1,31 @@
// Copyright (C) 2024 Fredrik Öhrström (gpl-3.0-or-later)
driver {
name = elster
meter_type = GasMeter
default_fields = name,id,total_m3,timestamp
name = elster
meter_type = GasMeter
default_fields = name,id,total_m3,timestamp
detect {
mvt = ELS,81,03
}
use = actuality_duration_s
field {
name = total
quantity = Volume
info = 'The total water consumption.'
match {
measurement_type = Instantaneous
vif_range = Volume
library {
use = actuality_duration_s
}
fields {
field {
name = total
quantity = Volume
info = 'The total water consumption.'
match {
measurement_type = Instantaneous
vif_range = Volume
}
}
}
test {
args = 'Gas elster 05105025 NOKEY'
telegram = 3644A511640010253837722550100593158103E70020052F2F_0374E602000C137034220302FD74EE0F2F2F2F2F2F2F2F2F2F2F2F2F2F2F
json = '{"media":"gas","meter":"elster","name":"Gas","id":"05105025","actuality_duration_s":742,"total_m3":3223.47,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Gas;05105025;3223.47;1111-11-11 11:11.11'
tests {
test {
args = 'Gas elster 05105025 NOKEY'
telegram = 3644A511640010253837722550100593158103E70020052F2F_0374E602000C137034220302FD74EE0F2F2F2F2F2F2F2F2F2F2F2F2F2F2F
json = '{"media":"gas","meter":"elster","name":"Gas","id":"05105025","actuality_duration_s":742,"total_m3":3223.47,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Gas;05105025;3223.47;1111-11-11 11:11.11'
}
}
}

Wyświetl plik

@ -6,271 +6,275 @@ driver {
detect {
mvt = ELT,01,02
}
field {
name = status
quantity = Text
info = status_and_error_flags
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
}
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xff
default_message = OK
map {
name = BUSY
info = 'System is busy'
value = 0x01
test = Set
fields {
field {
name = status
quantity = Text
info = status_and_error_flags
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
}
map {
name = GENERIC_APP_ERROR
info = 'Generic application error'
value = 0x02
test = Set
}
map {
name = CURRENT_LOW
info = 'Current too low'
value = 0x04
test = Set
}
map {
name = PERMANENT_ERROR
info = 'permanent error'
value = 0x08
test = Set
}
map {
name = TEMPORARY_ERROR
info = 'temporary error'
value = 0x10
test = Set
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xff
default_message = OK
map {
name = BUSY
info = 'System is busy'
value = 0x01
test = Set
}
map {
name = GENERIC_APP_ERROR
info = 'Generic application error'
value = 0x02
test = Set
}
map {
name = CURRENT_LOW
info = 'Current too low'
value = 0x04
test = Set
}
map {
name = PERMANENT_ERROR
info = 'permanent error'
value = 0x08
test = Set
}
map {
name = TEMPORARY_ERROR
info = 'temporary error'
value = 0x10
test = Set
}
}
}
}
field {
name = 'total_tariff_1'
quantity = Energy
info = 'Total cumulative active energy per tariff.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyEnergyVIF
tariff_nr = 1
field {
name = total_tariff_1
quantity = Energy
info = 'Total cumulative active energy per tariff.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyEnergyVIF
tariff_nr = 1
}
}
field {
name = total_tariff_2
quantity = Energy
info = 'Total cumulative active energy per tariff.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyEnergyVIF
tariff_nr = 2
}
}
field {
name = 'total_reactive_tariff_{tariff_counter}'
quantity = Energy
info = 'Total cumulative reactive energy per tariff.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyEnergyVIF
storage_nr = 2
tariff_nr = 1,10
}
}
field {
name = voltage_l1_n
quantity = Voltage
info = 'Instantaneous voltage between L1 and neutral.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Voltage
add_combinable = Mfct01
}
}
field {
name = current_l1
quantity = Amperage
info = 'Instantaneous current in the L1 phase.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Amperage
add_combinable = Mfct01
}
}
field {
name = power_l1
quantity = Power
info = 'active Power in L1 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
add_combinable = Mfct01
}
}
field {
name = reactive_power_l1
quantity = Power
info = 'reactive Power in L1 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
subunit_nr = 1
add_combinable = Mfct01
}
}
field {
name = voltage_l2_n
quantity = Voltage
info = 'Instantaneous voltage between L2 and neutral.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Voltage
add_combinable = Mfct02
}
}
field {
name = current_l2
quantity = Amperage
info = 'Instantaneous current in the L2 phase.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Amperage
add_combinable = Mfct02
}
}
field {
name = power_l2
quantity = Power
info = 'active Power in L2 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
add_combinable = Mfct02
}
}
field {
name = reactive_power_l2
quantity = Power
info = 'reactive Power in L2 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
subunit_nr = 1
add_combinable = Mfct02
}
}
field {
name = voltage_l3_n
quantity = Voltage
info = 'Instantaneous voltage between L3 and neutral.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Voltage
add_combinable = Mfct03
}
}
field {
name = current_l3
quantity = Amperage
info = 'Instantaneous current in the L3 phase.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Amperage
add_combinable = Mfct03
}
}
field {
name = power_l3
quantity = Power
info = 'active Power in L3 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
add_combinable = Mfct03
}
}
field {
name = reactive_power_l3
quantity = Power
info = 'reactive Power in L3 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
subunit_nr = 1
add_combinable = Mfct03
}
}
field {
name = ct_numerator
info = 'Current transformer ratio (numerator)'
quantity = Dimensionless
vif_scaling = None
match {
difvifkey = 02FF68
}
}
field {
name = active_power_overall
quantity = Power
info = 'active Power overall'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
add_combinable = Mfct00
}
}
field {
name = reactive_power_overall
quantity = Power
info = 'reactive Power overall'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
subunit_nr = 1
add_combinable = Mfct00
}
}
field {
name = active_tariff
info = 'active tariff'
quantity = Dimensionless
vif_scaling = None
match {
difvifkey = 01FF13
}
}
field {
name = total
quantity = Energy
info = 'Total active energy over all tariffs.'
calculate = total_tariff_1_kwh+total_tariff_2_kwh
}
}
field {
name = 'total_tariff_2'
quantity = Energy
info = 'Total cumulative active energy per tariff.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyEnergyVIF
tariff_nr = 2
tests {
test {
args = 'Eltako eltako 23451236 NOKEY'
telegram = 689292680800723612452394150102cd0000008c1004688902008c1104688902008c2004000000008c21040000000002fdc9ff01ee0002fddBff01100002acff0120008240acff010a0002fdc9ff02ef0002fddBff02110002acff0224008240acff02070002fdc9ff03ee0002fddBff030e0002acff031c008240acff03060002ff68010002acff0062008240acff00190001ff1300f416
json = '{"active_power_overall_kw": 0.98,"active_tariff_counter": 0,"ct_numerator_counter": 1,"current_l1_a": 1.6,"current_l2_a": 1.7,"current_l3_a": 1.4,"id": "23451236","media": "electricity","meter": "eltako","name": "Eltako","power_l1_kw": 0.32,"power_l2_kw": 0.36,"power_l3_kw": 0.28,"reactive_power_l1_kw": 0.1,"reactive_power_l2_kw": 0.07,"reactive_power_l3_kw": 0.06,"reactive_power_overall_kw": 0.25,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 289.68,"total_reactive_tariff_1_kwh": 289.68,"total_reactive_tariff_2_kwh": 0,"total_tariff_1_kwh": 289.68,"total_tariff_2_kwh": 0,"voltage_l1_n_v": 238,"voltage_l2_n_v": 239,"voltage_l3_n_v": 238}'
fields = 'Eltako;23451236;289.68;1111-11-11 11:11.11'
}
}
field {
name = 'total_reactive_tariff_{tariff_counter}'
quantity = Energy
info = 'Total cumulative reactive energy per tariff.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyEnergyVIF
storage_nr = 2
tariff_nr = 1,10
}
}
field {
name = voltage_l1_n
quantity = Voltage
info = 'Instantaneous voltage between L1 and neutral.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Voltage
add_combinable = Mfct01
}
}
field {
name = current_l1
quantity = Amperage
info = 'Instantaneous current in the L1 phase.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Amperage
add_combinable = Mfct01
}
}
field {
name = power_l1
quantity = Power
info = 'active Power in L1 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
add_combinable = Mfct01
}
}
field {
name = reactive_power_l1
quantity = Power
info = 'reactive Power in L1 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
subunit_nr = 1
add_combinable = Mfct01
}
}
field {
name = voltage_l2_n
quantity = Voltage
info = 'Instantaneous voltage between L2 and neutral.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Voltage
add_combinable = Mfct02
}
}
field {
name = current_l2
quantity = Amperage
info = 'Instantaneous current in the L2 phase.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Amperage
add_combinable = Mfct02
}
}
field {
name = power_l2
quantity = Power
info = 'active Power in L2 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
add_combinable = Mfct02
}
}
field {
name = reactive_power_l2
quantity = Power
info = 'reactive Power in L2 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
subunit_nr = 1
add_combinable = Mfct02
}
}
field {
name = voltage_l3_n
quantity = Voltage
info = 'Instantaneous voltage between L3 and neutral.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Voltage
add_combinable = Mfct03
}
}
field {
name = current_l3
quantity = Amperage
info = 'Instantaneous current in the L3 phase.'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = Amperage
add_combinable = Mfct03
}
}
field {
name = power_l3
quantity = Power
info = 'active Power in L3 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
add_combinable = Mfct03
}
}
field {
name = reactive_power_l3
quantity = Power
info = 'reactive Power in L3 phase'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
subunit_nr = 1
add_combinable = Mfct03
}
}
field {
name = ct_numerator
info = 'Current transformer ratio (numerator)'
quantity = Dimensionless
vif_scaling = None
match {
difvifkey = 02FF68
}
}
field {
name = active_power_overall
quantity = Power
info = 'active Power overall'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
add_combinable = Mfct00
}
}
field {
name = reactive_power_overall
quantity = Power
info = 'reactive Power overall'
match {
measurement_type = Instantaneous
vif_scaling = Auto
vif_range = AnyPowerVIF
subunit_nr = 1
add_combinable = Mfct00
}
}
field {
name = active_tariff
info = 'active tariff'
quantity = Dimensionless
vif_scaling = None
match {
difvifkey = 01FF13
}
}
field {
name = 'total'
quantity = Energy
info = 'Total active energy over all tariffs.'
calculate = total_tariff_1_kwh+total_tariff_2_kwh
}
test {
args = 'Eltako eltako 23451236 NOKEY'
telegram = 689292680800723612452394150102cd0000008c1004688902008c1104688902008c2004000000008c21040000000002fdc9ff01ee0002fddBff01100002acff0120008240acff010a0002fdc9ff02ef0002fddBff02110002acff0224008240acff02070002fdc9ff03ee0002fddBff030e0002acff031c008240acff03060002ff68010002acff0062008240acff00190001ff1300f416
json = '{"active_power_overall_kw": 0.98,"active_tariff_counter": 0,"ct_numerator_counter": 1,"current_l1_a": 1.6,"current_l2_a": 1.7,"current_l3_a": 1.4,"id": "23451236","media": "electricity","meter": "eltako","name": "Eltako","power_l1_kw": 0.32,"power_l2_kw": 0.36,"power_l3_kw": 0.28,"reactive_power_l1_kw": 0.1,"reactive_power_l2_kw": 0.07,"reactive_power_l3_kw": 0.06,"reactive_power_overall_kw": 0.25,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 289.68,"total_reactive_tariff_1_kwh": 289.68,"total_reactive_tariff_2_kwh": 0,"total_tariff_1_kwh": 289.68,"total_tariff_2_kwh": 0,"voltage_l1_n_v": 238,"voltage_l2_n_v": 239,"voltage_l3_n_v": 238}'
fields = 'Eltako;23451236;289.68;1111-11-11 11:11.11'
}
}

Plik diff jest za duży Load Diff

Wyświetl plik

@ -8,36 +8,40 @@ driver {
mvt = SEN,68,07
mvt = SEN,7c,07
}
field {
name = total
quantity = Volume
info = 'The total water consumption.'
match {
measurement_type = Instantaneous
vif_range = Volume
fields {
field {
name = total
quantity = Volume
info = 'The total water consumption.'
match {
measurement_type = Instantaneous
vif_range = Volume
}
}
field {
name = max_flow
quantity = Flow
info = 'The maximum water flow recorded during previous period.'
match {
measurement_type = Instantaneous
vif_range = VolumeFlow
}
}
}
field {
name = max_flow
quantity = Flow
info = 'The maximum water flow recorded during previous period.'
match {
measurement_type = Instantaneous
vif_range = VolumeFlow
tests {
test {
args = 'MoreWater iperl 12345699 NOKEY'
comment = 'Test iPerl T1 telegram, that after decryption, has 2f2f markers.'
telegram = 1E44AE4C9956341268077A36001000_2F2F0413181E0000023B00002F2F2F2F
json = '{"media":"water","meter":"iperl","name":"MoreWater","id":"12345699","total_m3":7.704,"max_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'MoreWater;12345699;7.704;0;1111-11-11 11:11.11'
}
test {
args = 'WaterWater iperl 33225544 NOKEY'
comment = 'Test iPerl T1 telegram not encrypted, which has no 2f2f markers.'
telegram = 1844AE4C4455223368077A55000000_041389E20100023B0000
json = '{"media":"water","meter":"iperl","name":"WaterWater","id":"33225544","total_m3":123.529,"max_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'WaterWater;33225544;123.529;0;1111-11-11 11:11.11'
}
}
test {
args = 'MoreWater iperl 12345699 NOKEY'
comment = 'Test iPerl T1 telegram, that after decryption, has 2f2f markers.'
telegram = 1E44AE4C9956341268077A36001000_2F2F0413181E0000023B00002F2F2F2F
json = '{"media":"water","meter":"iperl","name":"MoreWater","id":"12345699","total_m3":7.704,"max_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'MoreWater;12345699;7.704;0;1111-11-11 11:11.11'
}
test {
args = 'WaterWater iperl 33225544 NOKEY'
comment = 'Test iPerl T1 telegram not encrypted, which has no 2f2f markers.'
telegram = 1844AE4C4455223368077A55000000_041389E20100023B0000
json = '{"media":"water","meter":"iperl","name":"WaterWater","id":"33225544","total_m3":123.529,"max_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'WaterWater;33225544;123.529;0;1111-11-11 11:11.11'
}
}

Wyświetl plik

@ -18,83 +18,87 @@ driver {
detect {
mvt = IST,a9,04
}
field {
name = status
quantity = Text
info = 'Meter status from tpl field.'
attributes = INCLUDE_TPL_STATUS
}
field {
name = total
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
fields {
field {
name = status
quantity = Text
info = 'Meter status from tpl field.'
attributes = INCLUDE_TPL_STATUS
}
field {
name = total
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
}
}
field {
name = target
quantity = PointInTime
info = 'Last day of previous billing month.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 2
}
}
field {
name = target
quantity = Energy
info = 'The total heat energy for the previous month period.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 2
}
}
field {
name = target
quantity = Volume
info = 'The total heating media volume recorded by this meter at the end of last month.'
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 2
}
}
field {
name = last_year
quantity = PointInTime
info = 'Last day of previous billing year.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 1
}
}
field {
name = last_year
quantity = Energy
info = 'The total heat energy for the previous year period.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
}
}
}
field {
name = target
quantity = PointInTime
info = 'Last day of previous billing month.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 2
tests {
test {
args = 'HeatItUp istaheat 33503169 NOKEY'
telegram = 5344742669315033A9048C2070900F002C25961200009D6949E80EB1E2707A96003007102F2F_0C0500000000426C00004C050000000082016CFE298C0105000000008C0115000000002F2F2F2F2F2F2F2F2F2F2F
json = '{"id": "33503169","last_year_date": "1999-11-30","last_year_kwh": 0,"media": "heat","meter": "istaheat","name": "HeatItUp","status": "OK","target_date": "2023-09-30","target_kwh": 0,"target_m3": 0,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 0}'
fields = 'HeatItUp;33503169;OK;0;0;1111-11-11 11:11.11'
}
}
field {
name = target
quantity = Energy
info = 'The total heat energy for the previous month period.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 2
test {
args = 'FeelTheHeat istaheat 44503169 NOKEY'
telegram = 5344742669315044A9048C2017900F002C253DCD0000CE827C98B4346AB67A3D003007102F2F_0C0514980400426CFF2C4C052061020082016C1F318C0105581604008C0115142800002F2F2F2F2F2F2F2F2F2F2F
json = '{"status":"OK","media":"heat","meter":"istaheat","name":"FeelTheHeat","id":"44503169","last_year_kwh":2612,"last_year_date":"2023-12-31","target_kwh":4165.8,"target_date":"2024-01-31","target_m3":281.4,"total_kwh":4981.4,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'FeelTheHeat;44503169;OK;4981.4;4165.8;1111-11-11 11:11.11'
}
}
field {
name = target
quantity = Volume
info = 'The total heating media volume recorded by this meter at the end of last month.'
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 2
}
}
field {
name = last_year
quantity = PointInTime
info = 'Last day of previous billing year.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 1
}
}
field {
name = last_year
quantity = Energy
info = 'The total heat energy for the previous year period.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
}
}
test {
args = 'HeatItUp istaheat 33503169 NOKEY'
telegram = 5344742669315033A9048C2070900F002C25961200009D6949E80EB1E2707A96003007102F2F_0C0500000000426C00004C050000000082016CFE298C0105000000008C0115000000002F2F2F2F2F2F2F2F2F2F2F
json = '{"id": "33503169","last_year_date": "1999-11-30","last_year_kwh": 0,"media": "heat","meter": "istaheat","name": "HeatItUp","status": "OK","target_date": "2023-09-30","target_kwh": 0,"target_m3": 0,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 0}'
fields = 'HeatItUp;33503169;OK;0;0;1111-11-11 11:11.11'
}
test {
args = 'FeelTheHeat istaheat 44503169 NOKEY'
telegram = 5344742669315044A9048C2017900F002C253DCD0000CE827C98B4346AB67A3D003007102F2F_0C0514980400426CFF2C4C052061020082016C1F318C0105581604008C0115142800002F2F2F2F2F2F2F2F2F2F2F
json = '{"status":"OK","media":"heat","meter":"istaheat","name":"FeelTheHeat","id":"44503169","last_year_kwh":2612,"last_year_date":"2023-12-31","target_kwh":4165.8,"target_date":"2024-01-31","target_m3":281.4,"total_kwh":4981.4,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'FeelTheHeat;44503169;OK;4981.4;4165.8;1111-11-11 11:11.11'
}
}

Wyświetl plik

@ -7,64 +7,70 @@ driver {
detect {
mvt = ITW,00,04
}
use = meter_datetime
field {
name = status
quantity = Text
info = 'Meter status from tpl field.'
attributes = INCLUDE_TPL_STATUS
library {
use = meter_datetime
}
field {
name = total
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
fields {
field {
name = status
quantity = Text
info = 'Meter status from tpl field.'
attributes = INCLUDE_TPL_STATUS
}
field {
name = total
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
}
}
field {
name = total
quantity = Volume
info = 'The total volume of heating media recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = Volume
}
}
field {
name = last_year
quantity = PointInTime
info = 'Last day of previous billing year.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 1
}
}
field {
name = last_year
quantity = Energy
info = 'The total heat energy for the previous year period.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
}
}
}
field {
name = total
quantity = Volume
info = 'The total volume of heating media recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = Volume
tests {
test {
args = 'Heat itronheat 23340485 NOKEY'
comment = 'Allmess UltraMaXX with ITRON EquaScan hMIU RF Module'
telegram = 444497268504342300047AD00030A52F2F_04062C0100000C1429270000066D2D130AE12B007406FEFEFEFE426C1F010D7FEB0E00000006040C995500372F2F0C7951622223
json = '{"id": "23340485","last_year_date": "2000-01-31","media": "heat","meter": "itronheat","meter_datetime": "2023-11-01 10:19:45","name": "Heat","status": "OK","timestamp": "1111-11-11T11:11:11Z","total_kwh": 300,"total_m3": 27.29}'
fields = 'Heat;23340485;OK;300;1111-11-11 11:11.11'
}
}
field {
name = last_year
quantity = PointInTime
info = 'Last day of previous billing year.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 1
test {
args = 'Heat_lower_case itronheat 11755757 NOKEY'
comment = 'Itron Heatmeter with strange MFCT iTW instead of ITW'
telegram = 404497A65757751100047A040000A00406494C0000041348318000066D2B0ED7EE2A0044069A360000426CDF2C0D7FEB0700000006040C5C7E034E0C7942502321
json = '{"id": "11755757","last_year_date": "2022-12-31","last_year_kwh": 13978,"media": "heat","meter": "itronheat","meter_datetime": "2023-10-14 23:14:43","name": "Heat_lower_case","status": "OK","timestamp": "1111-11-11T11:11:11Z","total_kwh": 19529,"total_m3": 8401.224}'
fields = 'Heat_lower_case;11755757;OK;19529;1111-11-11 11:11.11'
}
}
field {
name = last_year
quantity = Energy
info = 'The total heat energy for the previous year period.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
}
}
test {
args = 'Heat itronheat 23340485 NOKEY'
comment = 'Allmess UltraMaXX with ITRON EquaScan hMIU RF Module'
telegram = 444497268504342300047AD00030A52F2F_04062C0100000C1429270000066D2D130AE12B007406FEFEFEFE426C1F010D7FEB0E00000006040C995500372F2F0C7951622223
json = '{"id": "23340485","last_year_date": "2000-01-31","media": "heat","meter": "itronheat","meter_datetime": "2023-11-01 10:19:45","name": "Heat","status": "OK","timestamp": "1111-11-11T11:11:11Z","total_kwh": 300,"total_m3": 27.29}'
fields = 'Heat;23340485;OK;300;1111-11-11 11:11.11'
}
test {
args = 'Heat_lower_case itronheat 11755757 NOKEY'
comment = 'Itron Heatmeter with strange MFCT iTW instead of ITW'
telegram = 404497A65757751100047A040000A00406494C0000041348318000066D2B0ED7EE2A0044069A360000426CDF2C0D7FEB0700000006040C5C7E034E0C7942502321
json = '{"id": "11755757","last_year_date": "2022-12-31","last_year_kwh": 13978,"media": "heat","meter": "itronheat","meter_datetime": "2023-10-14 23:14:43","name": "Heat_lower_case","status": "OK","timestamp": "1111-11-11T11:11:11Z","total_kwh": 19529,"total_m3": 8401.224}'
fields = 'Heat_lower_case;11755757;OK;19529;1111-11-11 11:11.11'
}
}

Wyświetl plik

@ -6,124 +6,124 @@ driver {
detect {
mvt = KAM,01,18
}
field {
name = status
quantity = Text
info = status_and_error_flags
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
fields {
field {
name = status
quantity = Text
info = status_and_error_flags
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
}
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xffff
default_message = OK
map {
name = DROP
info = 'Unexpected drop in pressure in relation to average pressure.'
value = 0x01
test = Set
}
map {
name = SURGE
info = 'Unexpected increase in pressure in relation to average pressure.'
value = 0x02
test = Set
}
map {
name = HIGH
info = 'Average pressure has reached configurable limit. Default 15 bar.'
value = 0x04
test = Set
}
map {
name = LOW
info = 'Average pressure has reached configurable limit. Default 1.5 bar.'
value = 0x08
test = Set
}
map {
name = TRANSIENT
info = 'Pressure changes quickly over short timeperiods. Average is fluctuating.'
value = 0x10
test = Set
}
map {
name = COMM_ERROR
info = 'Cannot measure properly or bad internal communication.'
value = 0x20
test = Set
}
}
}
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xffff
default_message = OK
map {
name = DROP
info = 'Unexpected drop in pressure in relation to average pressure.'
value = 0x01
test = Set
field {
name = pressure
quantity = Pressure
info = 'The measured pressure.'
match {
measurement_type = Instantaneous
vif_range = Pressure
}
map {
name = SURGE
info = 'Unexpected increase in pressure in relation to average pressure.'
value = 0x02
test = Set
}
field {
name = max_pressure
quantity = Pressure
info = 'The maximum pressure measured during ?'
match {
measurement_type = Maximum
vif_range = Pressure
}
map {
name = HIGH
info = 'Average pressure has reached configurable limit. Default 15 bar.'
value = 0x04
test = Set
}
field {
name = min_pressure
quantity = Pressure
info = 'The minimum pressure measured during ?'
match {
measurement_type = Minimum
vif_range = Pressure
}
map {
name = LOW
info = 'Average pressure has reached configurable limit. Default 1.5 bar.'
value = 0x08
test = Set
}
field {
name = alfa
info = 'We do not know what this is.'
quantity = Dimensionless
vif_scaling = None
match {
difvifkey = 05FF09
}
map {
name = TRANSIENT
info = 'Pressure changes quickly over short timeperiods. Average is fluctuating.'
value = 0x10
test = Set
}
map {
name = COMM_ERROR
info = 'Cannot measure properly or bad internal communication.'
value = 0x20
test = Set
}
field {
name = beta
info = 'We do not know what this is.'
quantity = Dimensionless
vif_scaling = None
match {
difvifkey = 05FF0A
}
}
}
field {
name = pressure
quantity = Pressure
info = 'The measured pressure.'
match {
measurement_type = Instantaneous
vif_range = Pressure
tests {
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = 32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.03,"min_pressure_bar":1.02,"alfa_counter":0.001246,"beta_counter":0.000997,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.03;1.02;1111-11-11 11:11.11'
}
}
field {
name = max_pressure
quantity = Pressure
info = 'The maximum pressure measured during ?'
match {
measurement_type = Maximum
vif_range = Pressure
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = '32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
27442D2C1703007701188D280194E393226EC679DE735657_660067006600962B913A21B9423A0800'
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.03,"min_pressure_bar":1.02,"alfa_counter":0.001108,"beta_counter":0.000743,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.03;1.02;1111-11-11 11:11.11'
}
}
field {
name = min_pressure
quantity = Pressure
info = 'The minimum pressure measured during ?'
match {
measurement_type = Minimum
vif_range = Pressure
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = '32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
27442D2C1703007701188D289554F295224ED579DE73188A_650066006600E80EA43A6B97A3BA0800'
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.02,"min_pressure_bar":1.01,"alfa_counter":0.001252,"beta_counter":-0.001248,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.02;1.01;1111-11-11 11:11.11'
}
}
field {
name = alfa
info = 'We do not know what this is.'
quantity = Dimensionless
vif_scaling = None
match {
difvifkey = 05FF09
}
}
field {
name = beta
info = 'We do not know what this is.'
quantity = Dimensionless
vif_scaling = None
match {
difvifkey = 05FF0A
}
}
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = 32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.03,"min_pressure_bar":1.02,"alfa_counter":0.001246,"beta_counter":0.000997,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.03;1.02;1111-11-11 11:11.11'
}
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = '32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
27442D2C1703007701188D280194E393226EC679DE735657_660067006600962B913A21B9423A0800'
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.03,"min_pressure_bar":1.02,"alfa_counter":0.001108,"beta_counter":0.000743,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.03;1.02;1111-11-11 11:11.11'
}
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = '32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
27442D2C1703007701188D289554F295224ED579DE73188A_650066006600E80EA43A6B97A3BA0800'
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.02,"min_pressure_bar":1.01,"alfa_counter":0.001252,"beta_counter":-0.001248,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.02;1.01;1111-11-11 11:11.11'
}
}

Wyświetl plik

@ -6,27 +6,32 @@ driver {
detect {
mvt = REL,41,00
}
use = consumption_hca
use = target_hca
use = meter_datetime
use = target_date
field {
name = next_target
quantity = PointInTime
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
add_combinable = FutureValue
storage_nr = 1
library {
use = consumption_hca
use = target_hca
use = meter_datetime
use = target_date
}
fields {
field {
name = next_target
quantity = PointInTime
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
add_combinable = FutureValue
storage_nr = 1
}
}
}
test {
args = 'MyRelHCA relhca 00000104 NOKEY'
comment = 'Telegram 1'
telegram = 682f2f6808687204010000ac484100b30000000c6e41648401046d9c021732426cff2c4c6e4164840142ec7e1f3c0fc101010c6d16
json = '{"consumption_hca": 1846441,"id": "00000104","media": "other","meter": "relhca","meter_datetime": "2024-02-23 02:28","target_hca": 1846441,"name": "MyRelHCA","next_target_date": "2024-12-31","target_date": "2023-12-31","timestamp": "1111-11-11T11:11:11Z"}'
fields = 'MyRelHCA;00000104;1846441;1111-11-11 11:11.11'
tests {
test {
args = 'MyRelHCA relhca 00000104 NOKEY'
comment = 'Telegram 1'
telegram = 682f2f6808687204010000ac484100b30000000c6e41648401046d9c021732426cff2c4c6e4164840142ec7e1f3c0fc101010c6d16
json = '{"consumption_hca": 1846441,"id": "00000104","media": "other","meter": "relhca","meter_datetime": "2024-02-23 02:28","target_hca": 1846441,"name": "MyRelHCA","next_target_date": "2024-12-31","target_date": "2023-12-31","timestamp": "1111-11-11T11:11:11Z"}'
fields = 'MyRelHCA;00000104;1846441;1111-11-11 11:11.11'
}
}
}

Wyświetl plik

@ -7,253 +7,259 @@ driver {
detect {
mvt = EFE,00,04
}
use = meter_datetime,fabrication_no,model_version,on_time_h,parameter_set
field {
name = status
quantity = Text
info = 'Meter status from tpl field.'
attributes = INCLUDE_TPL_STATUS
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
library {
use = meter_datetime,fabrication_no,model_version,on_time_h,parameter_set
}
fields {
field {
name = status
quantity = Text
info = 'Meter status from tpl field.'
attributes = INCLUDE_TPL_STATUS
match {
measurement_type = Instantaneous
vif_range = ErrorFlags
}
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xff
default_message = OK
map {
name = ERROR_TEMP_SENSOR_1_CABLE_BREAK
value = 0x01
test = Set
}
map {
name = ERROR_TEMP_SENSOR_1_SHORT_CIRCUIT
value = 0x02
test = Set
}
map {
name = ERROR_TEMP_SENSOR_2_CABLE_BREAK
value = 0x04
test = Set
}
map {
name = ERROR_TEMP_SENSOR_2_SHORT_CIRCUIT
value = 0x08
test = Set
}
map {
name = ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR
value = 0x10
test = Set
}
map {
name = ERROR_ELECTRONICS_DEFECT
value = 0x20
test = Set
}
map {
name = OK_INSTRUMENT_RESET
value = 0x40
test = Set
}
map {
name = OK_BATTERY_LOW
value = 0x80
test = Set
}
}
}
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xff
default_message = OK
map {
name = ERROR_TEMP_SENSOR_1_CABLE_BREAK
value = 0x01
test = Set
field {
name = total
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
}
map {
name = ERROR_TEMP_SENSOR_1_SHORT_CIRCUIT
value = 0x02
test = Set
}
field {
name = 'total_tariff{tariff_counter}'
quantity = Energy
info = 'The total heat energy consumption recorded by this meter on tariff 2-3.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
tariff_nr = 2,3
}
map {
name = ERROR_TEMP_SENSOR_2_CABLE_BREAK
value = 0x04
test = Set
}
field {
name = 'total_subunit{subunit_counter}'
quantity = Volume
info = 'The total volume consumption recorded by this meter on subunit 1-3.'
match {
measurement_type = Instantaneous
vif_range = Volume
subunit_nr = 1,3
}
map {
name = ERROR_TEMP_SENSOR_2_SHORT_CIRCUIT
value = 0x08
test = Set
}
field {
name = total_water
quantity = Volume
info = 'The total volume of heating media recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = Volume
}
map {
name = ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR
value = 0x10
test = Set
}
field {
name = total_water_tariff2
quantity = Volume
info = 'The total volume of heating media recorded by this meter on tariff2.'
match {
measurement_type = Instantaneous
vif_range = Volume
tariff_nr = 2
}
map {
name = ERROR_ELECTRONICS_DEFECT
value = 0x20
test = Set
}
field {
name = target_water
quantity = Volume
info = 'The total volume of heating media as recorded at the end of the billing period.'
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 1
}
map {
name = OK_INSTRUMENT_RESET
value = 0x40
test = Set
}
field {
name = power
quantity = Power
info = 'Power consumption.'
match {
measurement_type = Instantaneous
vif_range = AnyPowerVIF
}
map {
name = OK_BATTERY_LOW
value = 0x80
test = Set
}
field {
name = power_max
quantity = Power
info = 'Power consumption.'
match {
measurement_type = Maximum
vif_range = AnyPowerVIF
}
}
field {
name = flow_water
quantity = Flow
info = 'Flow of water.'
match {
measurement_type = Instantaneous
vif_range = VolumeFlow
}
}
field {
name = flow_water_max
quantity = Flow
info = 'Flow of water maximum.'
match {
measurement_type = Maximum
vif_range = VolumeFlow
}
}
field {
name = forward
quantity = Temperature
info = 'Forward temperature of water.'
match {
measurement_type = Instantaneous
vif_range = FlowTemperature
}
}
field {
name = return
quantity = Temperature
info = 'Return temperature of water.'
match {
measurement_type = Instantaneous
vif_range = ReturnTemperature
}
}
field {
name = difference
quantity = Temperature
info = 'Difference forward - return temperature.'
match {
measurement_type = Instantaneous
vif_range = TemperatureDifference
}
}
field {
name = target
quantity = PointInTime
info = 'The reporting date of the last billing period.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 1
}
}
field {
name = target
quantity = Energy
info = 'The energy consumption at the last billing period date.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
}
}
field {
name = 'target_tariff{tariff_counter}'
quantity = Energy
info = 'The energy consumption at the last billing period date on tariff 2-3.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
tariff_nr = 2,3
}
}
field {
name = 'target_subunit{subunit_counter}'
quantity = Volume
info = 'The volume consumption at the last billing period date on subunit 1-3.'
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 1
subunit_nr = 1,3
}
}
field {
name = 'target_{storage_counter}'
quantity = Energy
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 2,32
}
}
}
field {
name = total
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
tests {
test {
args = 'Heat sensostar 20480057 NOKEY'
telegram = 68B3B36808007257004820c51400046c100000047839803801040600000000041300000000042B00000000142B00000000043B00000000143B00000000025B1400025f15000261daff02235c00046d2c2ddc24440600000000441300000000426c000001fd171003fd0c05000084200600000000c420060000000084300600000000c430060000000084401300000000c44013000000008480401300000000c48040130000000084c0401300000000c4c0401300000000a216
json = '{"difference_c": -0.38,"fabrication_no": "01388039","flow_water_m3h": 0,"flow_water_max_m3h": 0,"forward_c": 20,"id": "20480057","media": "heat","meter": "sensostar","meter_datetime": "2022-04-28 13:44","model_version": "000005","name": "Heat","on_time_h": 2208,"power_kw": 0,"power_max_kw": 0,"return_c": 21,"status": "ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR TEMPORARY_ERROR","target_date": "1999-11-30","target_kwh": 0,"target_subunit1_m3": 0,"target_subunit2_m3": 0,"target_subunit3_m3": 0,"target_tariff2_kwh": 0,"target_tariff3_kwh": 0,"target_water_m3": 0,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 0,"total_subunit1_m3": 0,"total_subunit2_m3": 0,"total_subunit3_m3": 0,"total_tariff2_kwh": 0,"total_tariff3_kwh": 0,"total_water_m3": 0}'
fields = 'Heat;20480057;ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR TEMPORARY_ERROR;0;0;1999-11-30;0;1111-11-11 11:11.11'
}
}
field {
name = 'total_tariff{tariff_counter}'
quantity = Energy
info = 'The total heat energy consumption recorded by this meter on tariff 2-3.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
tariff_nr = 2,3
test {
args = 'WMZ sensostar 02752560 NOKEY'
comment = 'from "Sensostar U"'
telegram = a444c5146025750200047ac20000202f2f046d2e26c62a040643160000041310f0050001fd1700426cbf2c4406570e00008401061f160000840206f6150000840306f5150000840406f3150000840506ea150000840606bf1500008407065214000084080692120000840906c5100000840a06570e0000840b06ca0b0000840c06da090000840d06ca080000840e06c8080000840f06c608000003fd0c05010002fd0b2111
json = '{"id": "02752560","media": "heat","meter": "sensostar","meter_datetime": "2022-10-06 06:46","model_version": "000105","name": "WMZ","parameter_set": "1121","status": "OK","target_10_kwh": 5610,"target_12_kwh": 5567,"target_14_kwh": 5202,"target_16_kwh": 4754,"target_18_kwh": 4293,"target_20_kwh": 3671,"target_22_kwh": 3018,"target_24_kwh": 2522,"target_26_kwh": 2250,"target_28_kwh": 2248,"target_2_kwh": 5663,"target_30_kwh": 2246,"target_4_kwh": 5622,"target_6_kwh": 5621,"target_8_kwh": 5619,"target_date": "2021-12-31","target_kwh": 3671,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 5699,"total_water_m3": 389.136}'
fields = 'WMZ;02752560;OK;5699;389.136;2021-12-31;3671;1111-11-11 11:11.11'
}
}
field {
name = 'total_subunit{subunit_counter}'
quantity = Volume
info = 'The total volume consumption recorded by this meter on subunit 1-3.'
match {
measurement_type = Instantaneous
vif_range = Volume
subunit_nr = 1,3
test {
args = 'XYZ sensostar 21750444 NOKEY'
telegram = 4944C5144404752100047AC10000202F2F046D142D073404068847000001FD170004138E8A4000043BF7FFFFFF042B00000000025B3E00025F360002612F0303FD0C05010002FD0B2011
json = '{"difference_c": 8.15,"flow_water_m3h": -0.009,"forward_c": 62,"id": "21750444","media": "heat","meter": "sensostar","meter_datetime": "2024-04-07 13:20","model_version": "000105","name": "XYZ","parameter_set": "1120","power_kw": 0,"return_c": 54,"status": "OK","timestamp": "1111-11-11T11:11:11Z","total_kwh": 18312,"total_water_m3": 4229.774}'
fields = 'XYZ;21750444;OK;18312;4229.774;null;null;1111-11-11 11:11.11'
}
}
field {
name = total_water
quantity = Volume
info = 'The total volume of heating media recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = Volume
}
}
field {
name = total_water_tariff2
quantity = Volume
info = 'The total volume of heating media recorded by this meter on tariff2.'
match {
measurement_type = Instantaneous
vif_range = Volume
tariff_nr = 2
}
}
field {
name = target_water
quantity = Volume
info = 'The total volume of heating media as recorded at the end of the billing period.'
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 1
}
}
field {
name = power
quantity = Power
info = 'Power consumption.'
match {
measurement_type = Instantaneous
vif_range = AnyPowerVIF
}
}
field {
name = power_max
quantity = Power
info = 'Power consumption.'
match {
measurement_type = Maximum
vif_range = AnyPowerVIF
}
}
field {
name = flow_water
quantity = Flow
info = 'Flow of water.'
match {
measurement_type = Instantaneous
vif_range = VolumeFlow
}
}
field {
name = flow_water_max
quantity = Flow
info = 'Flow of water maximum.'
match {
measurement_type = Maximum
vif_range = VolumeFlow
}
}
field {
name = forward
quantity = Temperature
info = 'Forward temperature of water.'
match {
measurement_type = Instantaneous
vif_range = FlowTemperature
}
}
field {
name = return
quantity = Temperature
info = 'Return temperature of water.'
match {
measurement_type = Instantaneous
vif_range = ReturnTemperature
}
}
field {
name = difference
quantity = Temperature
info = 'Difference forward - return temperature.'
match {
measurement_type = Instantaneous
vif_range = TemperatureDifference
}
}
field {
name = target
quantity = PointInTime
info = 'The reporting date of the last billing period.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 1
}
}
field {
name = target
quantity = Energy
info = 'The energy consumption at the last billing period date.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
}
}
field {
name = 'target_tariff{tariff_counter}'
quantity = Energy
info = 'The energy consumption at the last billing period date on tariff 2-3.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
tariff_nr = 2,3
}
}
field {
name = 'target_subunit{subunit_counter}'
quantity = Volume
info = 'The volume consumption at the last billing period date on subunit 1-3.'
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 1
subunit_nr = 1,3
}
}
field {
name = 'target_{storage_counter}'
quantity = Energy
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 2,32
}
}
test {
args = 'Heat sensostar 20480057 NOKEY'
telegram = 68B3B36808007257004820c51400046c100000047839803801040600000000041300000000042B00000000142B00000000043B00000000143B00000000025B1400025f15000261daff02235c00046d2c2ddc24440600000000441300000000426c000001fd171003fd0c05000084200600000000c420060000000084300600000000c430060000000084401300000000c44013000000008480401300000000c48040130000000084c0401300000000c4c0401300000000a216
json = '{"difference_c": -0.38,"fabrication_no": "01388039","flow_water_m3h": 0,"flow_water_max_m3h": 0,"forward_c": 20,"id": "20480057","media": "heat","meter": "sensostar","meter_datetime": "2022-04-28 13:44","model_version": "000005","name": "Heat","on_time_h": 2208,"power_kw": 0,"power_max_kw": 0,"return_c": 21,"status": "ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR TEMPORARY_ERROR","target_date": "1999-11-30","target_kwh": 0,"target_subunit1_m3": 0,"target_subunit2_m3": 0,"target_subunit3_m3": 0,"target_tariff2_kwh": 0,"target_tariff3_kwh": 0,"target_water_m3": 0,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 0,"total_subunit1_m3": 0,"total_subunit2_m3": 0,"total_subunit3_m3": 0,"total_tariff2_kwh": 0,"total_tariff3_kwh": 0,"total_water_m3": 0}'
fields = 'Heat;20480057;ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR TEMPORARY_ERROR;0;0;1999-11-30;0;1111-11-11 11:11.11'
}
test {
args = 'WMZ sensostar 02752560 NOKEY'
comment = 'from "Sensostar U"'
telegram = a444c5146025750200047ac20000202f2f046d2e26c62a040643160000041310f0050001fd1700426cbf2c4406570e00008401061f160000840206f6150000840306f5150000840406f3150000840506ea150000840606bf1500008407065214000084080692120000840906c5100000840a06570e0000840b06ca0b0000840c06da090000840d06ca080000840e06c8080000840f06c608000003fd0c05010002fd0b2111
json = '{"id": "02752560","media": "heat","meter": "sensostar","meter_datetime": "2022-10-06 06:46","model_version": "000105","name": "WMZ","parameter_set": "1121","status": "OK","target_10_kwh": 5610,"target_12_kwh": 5567,"target_14_kwh": 5202,"target_16_kwh": 4754,"target_18_kwh": 4293,"target_20_kwh": 3671,"target_22_kwh": 3018,"target_24_kwh": 2522,"target_26_kwh": 2250,"target_28_kwh": 2248,"target_2_kwh": 5663,"target_30_kwh": 2246,"target_4_kwh": 5622,"target_6_kwh": 5621,"target_8_kwh": 5619,"target_date": "2021-12-31","target_kwh": 3671,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 5699,"total_water_m3": 389.136}'
fields = 'WMZ;02752560;OK;5699;389.136;2021-12-31;3671;1111-11-11 11:11.11'
}
test {
args = 'XYZ sensostar 21750444 NOKEY'
telegram = 4944C5144404752100047AC10000202F2F046D142D073404068847000001FD170004138E8A4000043BF7FFFFFF042B00000000025B3E00025F360002612F0303FD0C05010002FD0B2011
json = '{"difference_c": 8.15,"flow_water_m3h": -0.009,"forward_c": 62,"id": "21750444","media": "heat","meter": "sensostar","meter_datetime": "2024-04-07 13:20","model_version": "000105","name": "XYZ","parameter_set": "1120","power_kw": 0,"return_c": 54,"status": "OK","timestamp": "1111-11-11T11:11:11Z","total_kwh": 18312,"total_water_m3": 4229.774}'
fields = 'XYZ;21750444;OK;18312;4229.774;null;null;1111-11-11 11:11.11'
}
}

Wyświetl plik

@ -6,64 +6,70 @@ driver {
detect {
mvt = SON,1b,04
}
use = meter_datetime,flow_temperature_c,return_temperature_c,volume_flow_m3h
field {
name = total
quantity = Energy
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
library {
use = meter_datetime,flow_temperature_c,return_temperature_c,volume_flow_m3h
}
fields {
field {
name = total
quantity = Energy
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
}
}
field {
name = total
quantity = Volume
match {
measurement_type = Instantaneous
vif_range = Volume
}
}
field {
name = target
quantity = Energy
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 20
}
}
field {
name = target
quantity = Volume
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 20
}
}
field {
name = target
quantity = PointInTime
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 20
}
}
field {
name = power
quantity = Power
match {
measurement_type = Instantaneous
vif_range = AnyPowerVIF
}
}
}
field {
name = total
quantity = Volume
match {
measurement_type = Instantaneous
vif_range = Volume
tests {
test {
args = 'sonsupercal supercal 89508019 NOKEY'
comment = 'Sontex Supercal 739 test case'
telegram = 4444EE4D198050891B047AFB000000_046D3612E423820A6CE1F1040628010000840A060000000004144A110000840A14000000000259E30F025D2A0C023B1D01032C3A0100
json = '{"flow_temperature_c": 40.67,"id": "89508019","media": "heat","meter": "supercal","meter_datetime": "2023-03-04 18:54","name": "sonsupercal","power_kw": 3.14,"return_temperature_c": 31.14,"target_date": "2127-01-01","target_kwh": 0,"target_m3": 0,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 296,"total_m3": 44.26,"volume_flow_m3h": 0.285}'
fields = 'sonsupercal;89508019;296;1111-11-11 11:11.11'
}
}
field {
name = target
quantity = Energy
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 20
}
}
field {
name = target
quantity = Volume
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 20
}
}
field {
name = target
quantity = PointInTime
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 20
}
}
field {
name = power
quantity = Power
match {
measurement_type = Instantaneous
vif_range = AnyPowerVIF
}
}
test {
args = 'sonsupercal supercal 89508019 NOKEY'
comment = 'Sontex Supercal 739 test case'
telegram = 4444EE4D198050891B047AFB000000_046D3612E423820A6CE1F1040628010000840A060000000004144A110000840A14000000000259E30F025D2A0C023B1D01032C3A0100
json = '{"flow_temperature_c": 40.67,"id": "89508019","media": "heat","meter": "supercal","meter_datetime": "2023-03-04 18:54","name": "sonsupercal","power_kw": 3.14,"return_temperature_c": 31.14,"target_date": "2127-01-01","target_kwh": 0,"target_m3": 0,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 296,"total_m3": 44.26,"volume_flow_m3h": 0.285}'
fields = 'sonsupercal;89508019;296;1111-11-11 11:11.11'
}
}

Wyświetl plik

@ -6,20 +6,24 @@ driver {
detect {
mvt = WZG,03,16
}
use = meter_datetime
use = target_date
use = target_m3
use = total_m3
use = fabrication_no
field {
name = next_target
quantity = PointInTime
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
add_combinable = FutureValue
storage_nr = 1
library {
use = meter_datetime
use = target_date
use = target_m3
use = total_m3
use = fabrication_no
}
fields {
field {
name = next_target
quantity = PointInTime
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
add_combinable = FutureValue
storage_nr = 1
}
}
}
}

Wyświetl plik

@ -131,8 +131,8 @@ DriverDynamic::DriverDynamic(MeterInfo &mi, DriverInfo &di) :
di.name().str().c_str(),
fileName().c_str());
xmqForeach(doc, "/driver/use", (XMQNodeCallback)add_use, this);
xmqForeach(doc, "/driver/field", (XMQNodeCallback)add_field, this);
xmqForeach(doc, "/driver/library/use", (XMQNodeCallback)add_use, this);
xmqForeach(doc, "/driver/fields/field", (XMQNodeCallback)add_field, this);
}
catch(...)
{
@ -572,7 +572,7 @@ string check_field_name(const char *name, DriverDynamic *dd)
{
if (!name)
{
warning("(driver) error in %s, cannot find: driver/field/name\n"
warning("(driver) error in %s, cannot find: driver/fields/field/name\n"
"%s\n"
"Remember to add for example: field { name = total ... }\n"
"%s\n",
@ -612,7 +612,7 @@ Quantity check_field_quantity(const char *quantity_s, DriverDynamic *dd)
{
if (!quantity_s)
{
warning("(driver) error in %s, cannot find: driver/field/quantity\n"
warning("(driver) error in %s, cannot find: driver/fields/field/quantity\n"
"%s\n"
"Remember to add for example: field { quantity = Volume ... }\n"
"Available quantities:\n%s\n"
@ -859,7 +859,7 @@ void checked_set_measurement_type(const char *measurement_type_s, FieldMatcher *
{
if (!measurement_type_s)
{
warning("(driver) error in %s, cannot find: driver/field/match/measurement_type\n"
warning("(driver) error in %s, cannot find: driver/fields/field/match/measurement_type\n"
"%s\n"
"Remember to add for example: match { measurement_type = Instantaneous ... }\n"
"Available measurement types:\n"
@ -902,7 +902,7 @@ void checked_set_vif_range(const char *vif_range_s, FieldMatcher *fm, DriverDyna
{
if (!vif_range_s)
{
warning("(driver) error in %s, cannot find: driver/field/match/vif_range\n"
warning("(driver) error in %s, cannot find: driver/fields/field/match/vif_range\n"
"%s\n"
"Remember to add for example: match { ... vif_range = ReturnTemperature ... }\n"
"Available vif ranges:\n"
@ -1057,7 +1057,7 @@ Translate::MapType checked_map_type(const char *map_type_s, DriverDynamic *dd)
{
if (!map_type_s)
{
warning("(driver) error in %s, cannot find: driver/field/lookup/map_type\n"
warning("(driver) error in %s, cannot find: driver/fields/field/lookup/map_type\n"
"%s\n"
"Remember to add for example: lookup { map_type = BitToString ... }\n"
"Available map types:\n"
@ -1097,7 +1097,7 @@ uint64_t checked_mask_bits(const char *mask_bits_s, DriverDynamic *dd)
{
if (!mask_bits_s)
{
warning("(driver) error in %s, cannot find: driver/field/lookup/mask_bitse\n"
warning("(driver) error in %s, cannot find: driver/fields/field/lookup/mask_bitse\n"
"%s\n"
"Remember to add for example: lookup { mask_bits = 0x00ff ... }\n"
"%s\n",
@ -1116,7 +1116,7 @@ uint64_t checked_value(const char *value_s, DriverDynamic *dd)
{
if (!value_s)
{
warning("(driver) error in %s, cannot find: driver/field/lookup/map/value\n"
warning("(driver) error in %s, cannot find: driver/fields/field/lookup/map/value\n"
"%s\n"
"Remember to add for example: lookup { map { ... value = 0x01 ... }}\n"
"%s\n",
@ -1135,7 +1135,7 @@ TestBit checked_test_type(const char *test_s, DriverDynamic *dd)
{
if (!test_s)
{
warning("(driver) error in %s, cannot find: driver/field/lookup/map/test\n"
warning("(driver) error in %s, cannot find: driver/fields/field/lookup/map/test\n"
"%s\n"
"Remember to add for example: lookup { map { test = Set } }\n"
"Available test types:\n"

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -201,12 +201,14 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { namee = total }
fields {
field { namee = total }
}
}
EOF
cat > $TEST/test_expected.txt <<EOF
(driver) error in testoutput/driver.xmq, cannot find: driver/field/name
(driver) error in testoutput/driver.xmq, cannot find: driver/fields/field/name
-------------------------------------------------------------------------------
Remember to add for example: field { name = total ... }
-------------------------------------------------------------------------------
@ -222,7 +224,9 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total_m3 }
fields {
field { name = total_m3 }
}
}
EOF
@ -244,12 +248,14 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total }
fields {
field { name = total }
}
}
EOF
cat > $TEST/test_expected.txt <<EOF
(driver) error in testoutput/driver.xmq, cannot find: driver/field/quantity
(driver) error in testoutput/driver.xmq, cannot find: driver/fields/field/quantity
-------------------------------------------------------------------------------
Remember to add for example: field { quantity = Volume ... }
Available quantities:
@ -290,7 +296,9 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total quantity = gurka }
fields {
field { name = total quantity = gurka }
}
}
EOF
@ -335,7 +343,9 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total quantity = Volume }
fields {
field { name = total quantity = Volume }
}
}
EOF
@ -353,7 +363,9 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total quantity = Volume calculate = '4711.23m3 + 0.9m3' }
fields {
field { name = total quantity = Volume calculate = '4711.23m3 + 0.9m3' }
}
}
EOF
@ -370,12 +382,14 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total quantity = Volume match { } }
fields {
field { name = total quantity = Volume match { } }
}
}
EOF
cat > $TEST/test_expected.txt <<EOF
(driver) error in testoutput/driver.xmq, cannot find: driver/field/match/measurement_type
(driver) error in testoutput/driver.xmq, cannot find: driver/fields/field/match/measurement_type
-------------------------------------------------------------------------------
Remember to add for example: match { measurement_type = Instantaneous ... }
Available measurement types:
@ -397,7 +411,9 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total quantity = Volume match { measurement_type = sdfInstantaneous } }
fields {
field { name = total quantity = Volume match { measurement_type = sdfInstantaneous } }
}
}
EOF
@ -423,12 +439,14 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total quantity = Volume match { measurement_type = Instantaneous } }
fields {
field { name = total quantity = Volume match { measurement_type = Instantaneous } }
}
}
EOF
cat > $TEST/test_expected.txt <<EOF
(driver) error in testoutput/driver.xmq, cannot find: driver/field/match/vif_range
(driver) error in testoutput/driver.xmq, cannot find: driver/fields/field/match/vif_range
-------------------------------------------------------------------------------
Remember to add for example: match { ... vif_range = ReturnTemperature ... }
Available vif ranges:
@ -491,7 +509,9 @@ TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver { name = iffo meter_type = WaterMeter default_fields = name,id,total_m3,timestamp
detect { mvt = SEN,99,07 }
field { name = total quantity = Volume match { measurement_type = Instantaneous vif_range = Volume } }
fields {
field { name = total quantity = Volume match { measurement_type = Instantaneous vif_range = Volume } }
}
}
EOF
@ -507,10 +527,12 @@ TESTNAME="Test lookup of bits"
TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver{name=kampress meter_type=PressureSensor detect{mvt=KAM,01,18} default_fields=name,pressure,status
field{name=status quantity=Text match{measurement_type=Instantaneous vif_range=ErrorFlags}
lookup{name=ERROR_FLAGS map_type=BitToString mask_bits=0xffff default_message=OK
map{name=DROP value=0x01 test=Set}map{name=LOW value=0x08 test=Set}}}
field{name=pressure quantity=Pressure match{measurement_type=Instantaneous vif_range=Pressure}}
fields {
field{name=status quantity=Text match{measurement_type=Instantaneous vif_range=ErrorFlags}
lookup{name=ERROR_FLAGS map_type=BitToString mask_bits=0xffff default_message=OK
map{name=DROP value=0x01 test=Set}map{name=LOW value=0x08 test=Set}}}
field{name=pressure quantity=Pressure match{measurement_type=Instantaneous vif_range=Pressure}}
}
}
EOF

Wyświetl plik

@ -49,57 +49,58 @@ driver {
detect {
mvt = EFE,00,04
}
field {
name = total
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
fields {
field {
name = total
quantity = Energy
info = 'The total heat energy consumption recorded by this meter.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
}
}
}
field {
name = target_water
quantity = Volume
info = 'The total volume of heating media as recorded at the end of the billing period.'
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 1
field {
name = target_water
quantity = Volume
info = 'The total volume of heating media as recorded at the end of the billing period.'
match {
measurement_type = Instantaneous
vif_range = Volume
storage_nr = 1
}
}
}
field {
name = target
quantity = PointInTime
info = 'The reporting date of the last billing period.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 1
field {
name = target
quantity = PointInTime
info = 'The reporting date of the last billing period.'
display_unit = date
match {
measurement_type = Instantaneous
vif_range = Date
storage_nr = 1
}
}
}
field {
name = target
quantity = Energy
info = 'The energy consumption at the last billing period date.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
field {
name = target
quantity = Energy
info = 'The energy consumption at the last billing period date.'
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 1
}
}
}
field {
name = 'target_{storage_counter}_{target_date - (storage_counter * 1month)}'
quantity = Energy
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 2,32
field {
name = 'target_{storage_counter}_{target_date - (storage_counter * 1month)}'
quantity = Energy
match {
measurement_type = Instantaneous
vif_range = AnyEnergyVIF
storage_nr = 2,32
}
}
}
}
EOF
cat > $TEST/test_expected.txt <<EOF

Wyświetl plik

@ -17,51 +17,54 @@ driver {
detect {
mvt = IME,55,08
}
field {
name = alfa
quantity = Energy
vif_scaling = None
dif_signedness = Unsigned
display_unit = kwh
force_scale = 1
match {
difvifkey = 849010FF80843B
fields {
field {
name = alfa
quantity = Energy
vif_scaling = None
dif_signedness = Unsigned
display_unit = kwh
force_scale = 1
match {
difvifkey = 849010FF80843B
}
}
}
field {
name = beta
quantity = Energy
vif_scaling = None
dif_signedness = Unsigned
display_unit = kwh
force_scale = 1/3
match {
difvifkey = 849010FF80843B
field {
name = beta
quantity = Energy
vif_scaling = None
dif_signedness = Unsigned
display_unit = kwh
force_scale = 1/3
match {
difvifkey = 849010FF80843B
}
}
}
field {
name = gamma
quantity = Energy
vif_scaling = None
dif_signedness = Unsigned
display_unit = kwh
force_scale = 1000.0
match {
difvifkey = 849010FF80843B
field {
name = gamma
quantity = Energy
vif_scaling = None
dif_signedness = Unsigned
display_unit = kwh
force_scale = 1000.0
match {
difvifkey = 849010FF80843B
}
}
}
field {
name = delta
quantity = Energy
vif_scaling = None
dif_signedness = Unsigned
display_unit = kwh
force_scale = 3.3/3.3
match {
difvifkey = 849010FF80843B
field {
name = delta
quantity = Energy
vif_scaling = None
dif_signedness = Unsigned
display_unit = kwh
force_scale = 3.3/3.3
match {
difvifkey = 849010FF80843B
}
}
}
}
EOF
$PROG --format=fields \

Wyświetl plik

@ -40,26 +40,28 @@ driver {
detect {
mvt = SEN,99,07
}
field {
name = totalitator
quantity = Volume
match {
measurement_type = Instantaneous
vif_range = Volume
fields {
field {
name = totalitator
quantity = Volume
match {
measurement_type = Instantaneous
vif_range = Volume
}
about {
en = 'The total water consumption recorded by this meter.'
}
}
about {
en = 'The total water consumption recorded by this meter.'
}
}
field {
name = max_flowwor
quantity = Flow
match {
measurement_type = Instantaneous
vif_range = VolumeFlow
}
about {
en = 'The maximum flow recorded during previous period.'
field {
name = max_flowwor
quantity = Flow
match {
measurement_type = Instantaneous
vif_range = VolumeFlow
}
about {
en = 'The maximum flow recorded during previous period.'
}
}
}
}