Skip to content

QR Code

testo 300 QR Code

The testo 300 has two different versions of QR codes, depending on which country version your device is set to.

Testo QR Code (Rest of World)

The testo 300 QR code is a binary QR code containing compressed JSON data. The following python scripts shows the basic workflow of how to handle the QR code. These example files can be used to verify your implementation, as they represent every stage of the process:

  • QR Code:

example.png

  • QR Code:

example2.png

  • QR Code:

example3.png

  • QR Code:

example4.png

Example implementation

There is a demo app available on Github, which shows how the QR Code could be implemented on Android.

Library considerations

Please note: In order to use this your QR code library must support decoding binary QR codes.

  • On iOS the Apple-provided QR Code implementation supports this. See monoqlo/QRCodeReader. for an example on how to use it.
  • On Android ZXing-C++ / Zebra Crossing can be used to decode the QR code, an example implementation can be found as part of BinaryEye.
  • ML Kit also provides the option to decode binary QR codes on both iOS and Android

Simple Python Example

The following is a simple example implementation on how to decode the QR code and uncompress the data

requirements.txt
git+https://github.com/testo/pyzbar.git@master#egg=pyzbar # (1)
Pillow~=9.0.1
  1. Use a patched version of pyzbar, as the current releases do not fully support binary QR codes
decode_qrcode.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from pyzbar.pyzbar import decode, ZBarSymbol
from PIL import Image
import gzip

if __name__ == '__main__':
    # Open QR code
    image = Image.open('example.png')

    # decode qr code with (patched) pyzbar
    qr_code = decode(image, symbols=[ZBarSymbol.QRCODE], binary=True)

    # assume there is only one qr code in the image
    assert len(qr_code) == 1
    compressed_data = qr_code[0].data

    # write binary data to disk, this optional and just for debugging purposes
    with open("example.bin", "wb") as f:
        f.write(compressed_data)

    # read binary data from disk and decompress it
    gzip_file = gzip.open("example.bin", "rb")
    decompressed_data = gzip_file.read()

    # decode binary data to UTF-8 string
    json_string = decompressed_data.decode("UTF-8")
    print(json_string)

    # write json to disk
    with open("example.json", "w") as f:
        f.write(json_string)

ZIV QR Code (DE, AT, CZ, SK)

The QR Code for Germany, Austria, Czech Republic and Slovakia follows the ZIV standard for QR Codes.

example-ziv.png

ZIV QR Code IDs

XML ID Unit QR Code ID Comment
T_Flue UNIT_DEG_C 41 AT
T_Air UNIT_DEG_C 40 VT
T_Dew UNIT_DEG_C 93 Dew Pt
T_Dew UNIT_DEG_C_DEWPOINT 93 Dew Pt
AT_Mean UNIT_DEG_C 212 ATØ
VT_Mean UNIT_DEG_C 211 VTØ
P_Draft UNIT_PA 80 Draught
P_Draft UNIT_HPA 81 Draught
P_Draft UNIT_MBAR 81 Draught
CO_Dil UNIT_PPM 79 CO
CO_Dil UNIT_MG_M3 71 CO
CO_Norm UNIT_PPM 70 uCO
CO_Norm UNIT_MG_M3 72 uCO
CO_Norm UNIT_MG_KWH 73 uCO
NO_Dil UNIT_PPM 57 NO
NO_Dil UNIT_MG_M3 59 NO
NO2 UNIT_PPM 61 NO2
NO2 UNIT_MG_M3 63 NO2
CO2 UNIT_PERCENT 52 CO2
O2 UNIT_PERCENT 50 O2
O2Supply UNIT_PERCENT 240 O2ref.
O2_Ring UNIT_PERCENT 230 O2air
O2_Average UNIT_PERCENT 210 O2Ø
OEM UNIT_PERCENT 242 OEM
NOx UNIT_PPM 200 NOx
NOx UNIT_MG_M3 201 NOx
QAnet UNIT_PERCENT 90 qAnet
QAgr UNIT_PERCENT 90 qAgr.
Efficiency UNIT_PERCENT 91 Effn
Effg UNIT_PERCENT 91 Effg
QAAverage UNIT_PERCENT 213 qAØ
Lambda UNIT_NONE 92 λ
T_Boiler UNIT_DEG_C 42 HCT
Soot_1 UNIT_NONE 82 Smoke 1
OilDeriv UNIT_NONE 84 Oil depos.
Soot_2 UNIT_NONE 82 Smoke 2
Soot_3 UNIT_NONE 82 Smoke 3
SootAvg UNIT_NONE 83 Smoke Ø
Time UNIT_SECOND 241 Act.Test time
MeasDuration UNIT_SECOND 241 Test time
AT_Mean_44B UNIT_DEG_C 212 ATØ
VT_Mean_44B UNIT_DEG_C 211 VTØ
QAAverage_44B UNIT_PERCENT 267 qAØ
Time_44B UNIT_SECOND 241 Act.Test time
MeasDuration_44B UNIT_SECOND 241 Test time
OB_44B UNIT_PERCENT 240 OB
O2_44B UNIT_PERCENT 242 O2
OEM_44B UNIT_PERCENT 242 OEM
Lambda_44B UNIT_NONE 243 λ
CO2_44B UNIT_PERCENT 244 CO2
CO_Dil_44B UNIT_PPM 245 CO
CO_Dil_44B UNIT_MG_M3 246 CO
Eco B_44B UNIT_MG_M3 246 Eco,B
Uco B_44B UNIT_MG_M3 247 Uco,B
UNOx B_44B UNIT_MG_M3 256 UNOx,B
ENOx B_44B UNIT_MG_M3 255 ENOx,B
UNOx B_44B UNIT_PERCENT 256 UNOx,B
P_Draft_44B UNIT_PA 80 Draught
CO_Norm_44B UNIT_PPM 246 uCO
NO_Dil_44B UNIT_PPM 250 NO
Efficiency_44B UNIT_PERCENT 268 Effn
Effg_44B UNIT_PERCENT 268 Effg
Delta_t UNIT_DEG_C 500 ΔT
Delta_t UNIT_DELTA_T 500 ΔT
Delta_t UNIT_DEG_F 501 ΔT
T_Flue UNIT_DEG_F 502 AT
T_Air UNIT_DEG_F 503 VT
T_Dew UNIT_DEG_F 504 Dew Pt
T_Dew UNIT_DEG_F_DEWPOINT 505 Dew Pt
AT_Mean UNIT_DEG_F 506 ATØ
VT_Mean UNIT_DEG_F 507 VTØ
T1 UNIT_DEG_C 508 T1
T2 UNIT_DEG_C 509 T2
GT UNIT_DEG_C 510 Itemp
T_Ambient UNIT_DEG_C 511 Ambient Temp
T1 UNIT_DEG_F 512 T1
T2 UNIT_DEG_F 513 T2
GT UNIT_DEG_F 514 Itemp
T_Ambient UNIT_DEG_F 515 Ambient Temp
PumpFlow UNIT_L_PER_MIN 516 Pump
CO_Dil UNIT_PERCENT 530 CO
CO_Dil UNIT_G_PER_GJ 531 CO
CO_Dil UNIT_MG_KWH 532 CO
CO_Dil UNIT_LBS_PER_MBTU 533 CO
CO_Dil UNIT_G_PER_HORSEPOWER_HOUR 534 CO
CO_Norm UNIT_PERCENT 535 uCO
CO_Norm UNIT_G_PER_GJ 536 uCO
CO_Norm UNIT_LBS_PER_MBTU 537 uCO
CO_Norm UNIT_G_PER_HORSEPOWER_HOUR 538 uCO
NO_Dil UNIT_PERCENT 540 NO
NO_Dil UNIT_G_PER_GJ 541 NO
NO_Dil UNIT_MG_KWH 542 NO
NO_Dil UNIT_LBS_PER_MBTU 543 NO
NO_Dil UNIT_G_PER_HORSEPOWER_HOUR 544 NO
NO2 UNIT_PERCENT 545 NO2
NO2 UNIT_G_PER_GJ 546 NO2
NO2 UNIT_MG_KWH 547 NO2
NO2 UNIT_LBS_PER_MBTU 548 NO2
NO2 UNIT_G_PER_HORSEPOWER_HOUR 549 NO2
NOx UNIT_PERCENT 550 NOx
NOx UNIT_G_PER_GJ 551 NOx
NOx UNIT_MG_KWH 552 NOx
NOx UNIT_LBS_PER_MBTU 553 NOx
NOx UNIT_G_PER_HORSEPOWER_HOUR 554 NOx
ENOx B NIT_PERCENT 570 ENOx,B
ENOx B NIT_PPM 571 ENOx,B
ENOx B NIT_MG_M3 572 ENOx,B
ENOx B NIT_G_PER_GJ 573 ENOx,B
ENOx B NIT_MG_KWH 574 ENOx,B
ENOx B NIT_LBS_PER_MBTU 575 ENOx,B
UA NIT_PERCENT 580 UA
UA_44B NIT_PERCENT 580 UA
UA NIT_PPM 581 UA
UA NIT_MG_M3 582 UA
UA NIT_G_PER_GJ 583 UA
UA NIT_MG_KWH 584 UA
UA NIT_LBS_PER_MBTU 585 UA
Eco B NIT_PERCENT 590 Eco,B
Eco B NIT_PPM 591 Eco,B
Eco B NIT_MG_M3 592 Eco,B
Eco B NIT_G_PER_GJ 593 Eco,B
Eco B NIT_MG_KWH 594 Eco,B
Eco B NIT_LBS_PER_MBTU 595 Eco,B
OEM NIT_PERCENT 600 OEM
OEM NIT_PPM 601 OEM
OEM NIT_MG_M3 602 OEM
OEM NIT_G_PER_GJ 603 OEM
OEM NIT_MG_KWH 604 OEM
OEM NIT_LBS_PER_MBTU 605 OEM
Uco B NIT_PERCENT 610 Uco,B
Uco B NIT_PPM 611 Uco,B
Uco B NIT_MG_M3 612 Uco,B
Uco B NIT_G_PER_GJ 613 Uco,B
Uco B NIT_MG_KWH 614 Uco,B
Uco B NIT_LBS_PER_MBTU 615 Uco,B
UNOx B NIT_PERCENT 620 UNOx,B
UNOx B NIT_PPM 621 UNOx,B
UNOx B NIT_MG_M3 622 UNOx,B
UNOx B NIT_G_PER_GJ 623 UNOx,B
UNOx B NIT_MG_KWH 624 UNOx,B
UNOx B NIT_LBS_PER_MBTU 625 UNOx,B
CO_Amb UNIT_PERCENT 630 AmbCO
CO_Amb UNIT_PPM 631 AmbCO
CO2Amb UNIT_PERCENT 632 AmbCO2
CO2Amb UNIT_PPM 633 AmbCO2
OB NIT_PERCENT 640 OB
OB NIT_PPM 641 OB
OB NIT_MG_M3 642 OB
OB NIT_G_PER_GJ 643 OB
OB NIT_MG_KWH 644 OB
OB NIT_LBS_PER_MBTU 645 OB
Aco B NIT_PERCENT 650 Aco,B
Aco B NIT_MG_M3 651 Aco,B
Aco B NIT_PPM 652 Aco,B
Aco B NIT_G_PER_GJ 653 Aco,B
Aco B NIT_MG_KWH 654 Aco,B
Aco B NIT_LBS_PER_MBTU 655 Aco,B
ANOx B NIT_PERCENT 660 ANOx,B
ANOx B NIT_PPM 661 ANOx,B
ANOx B NIT_MG_M3 662 ANOx,B
ANOx B NIT_G_PER_GJ 663 ANOx,B
ANOx B NIT_MG_KWH 664 ANOx,B
ANOx B NIT_LBS_PER_MBTU 665 ANOx,B
Delta_P UNIT_PA 700 Δp
Delta_P UNIT_MBAR 701 Δp
Delta_P UNIT_PSI 702 Δp
Delta_P UNIT_HPA 703 Δp
Delta_P UNIT_INH2O 704 Δp
Delta_P UNIT_INHG 705 Δp
Delta_P UNIT_MMH2O 706 Δp
DeltaPmin4Pa UNIT_PA 717 Δp min
DeltaPmax4Pa UNIT_PA 718 Δp max
Ext4Pa UNIT_PA 719 Ext-4Pa
PStat UNIT_MBAR 720 ΔP stat
PStat UNIT_PA 721 ΔP stat
PStat UNIT_PSI 722 ΔP stat
PStat UNIT_HPA 723 ΔP stat
PStat UNIT_INH2O 724 ΔP stat
PStat UNIT_INHG 725 ΔP stat
PStat UNIT_MMH2O 726 ΔP stat
PDyn UNIT_MBAR 730 ΔP dyn
PDyn UNIT_PA 731 ΔP dyn
PDyn UNIT_PSI 732 ΔP dyn
PDyn UNIT_HPA 733 ΔP dyn
PDyn UNIT_INH2O 734 ΔP dyn
PDyn UNIT_INHG 735 ΔP dyn
PDyn UNIT_MMH2O 736 ΔP dyn
P1 UNIT_MBAR 740 Press P1
P1 UNIT_PA 741 Press P1
P1 UNIT_PSI 742 Press P1
P1 UNIT_HPA 743 Press P1
P1 UNIT_INH2O 744 Press P1
P1 UNIT_INHG 745 Press P1
P1 UNIT_MMH2O 746 Press P1
P2 UNIT_MBAR 750 Press P2
P2 UNIT_PA 751 Press P2
P2 UNIT_PSI 752 Press P2
P2 UNIT_HPA 753 Press P2
P2 UNIT_INH2O 754 Press P2
P2 UNIT_INHG 755 Press P2
P2 UNIT_MMH2O 756 Press P2
P_Dynamic UNIT_MBAR 780 D P
P_Dynamic UNIT_PA 781 D P
P_Dynamic UNIT_PSI 782 D P
P_Dynamic UNIT_HPA 783 D P
P_Dynamic UNIT_INH2O 784 D P
P_Dynamic UNIT_INHG 785 D P
P_Dynamic UNIT_MMH2O 786 D P
Diff Press UNIT_MBAR 790 Diff-Press
Diff Press UNIT_PA 791 Diff-Press
Diff Press UNIT_PSI 792 Diff-Press
Diff Press UNIT_HPA 793 Diff-Press
Diff Press UNIT_INH2O 794 Diff-Press
Diff Press UNIT_INHG 795 Diff-Press
Diff Press UNIT_MMH2O 796 Diff-Press
HumidityFluegas UNIT_PERCENT 800 AF
HumidityFluegas UNIT_HUMIDITY_ABS 801 AF
QA25 UNIT_PERCENT 802 qA25
QA25gross UNIT_PERCENT 803 qR
QA_ATfix UNIT_PERCENT 804 qA-ATfix
MeasRate UNIT_SECOND 810 Test rate
MeasRate UNIT_MINUTE 811 Test rate
MeasRate UNIT_HOUR 812 Test rate
StabilityTime UNIT_SECOND 813 Stability time
StabilityTime UNIT_MINUTE 814 Stability time
StabilityTime UNIT_HOUR 815 Stability time
Volume UNIT_M3 820 Volume
Gasamount UNIT_M3 821 Gas amount
Volume UNIT_S_LITER 822 Volume
Gasamount UNIT_S_LITER 823 Gas amount
Volume UNIT_FT3 824 Volume
Gasamount UNIT_FT3 825 Gas amount
Volume UNIT_FLOZ 826 Volume
Gasamount UNIT_FLOZ 827 Gas amount
LeakageRate UNIT_L_PER_SEC 830 Leakage rate
LeakageRate UNIT_M3_PER_HOUR 831 Leakage rate
LeakageRate UNIT_L_PER_MIN 832 Leakage rate
LeakageRate UNIT_FOZ_PER_HOUR 833 Leakage rate
LeakageRate UNIT_FT3_PER_HOUR 834 Leakage rate
LeakageRate UNIT_KG_PER_HOUR 835 Leakage rate
LeakageRate UNIT_GAL_PER_HOUR 836 Leakage rate
BoilerPower UNIT_KW 840 Power
BoilerPower UNIT_HORSEPOWER 841 Power
BoilerPower UNIT_BTU_PER_HOUR 842 Power
Oil_Power UNIT_KW 843 Energy
Oil_Power UNIT_HORSEPOWER 844 Energy
Oil_Power UNIT_BTU_PER_HOUR 845 Energy
Gas_Power UNIT_KW 846 Capacity (Gross)
Gas_Power UNIT_HORSEPOWER 847 Capacity (Gross)
Gas_Power UNIT_BTU_PER_HOUR 848 Capacity (Gross)
Heatingvalue UNIT_KWH_PER_M3 850 Heating Value
Heatingvalue UNIT_KWH_PER_L 851 Heating Value
Heatingvalue UNIT_BTU_PER_FT3 852 Heating Value
Heatingvalue UNIT_BTU_PER_FLOZ 853 Heating Value
ResultLetByTest UNIT_NONE 860 Result Let By Test
Testgas UNIT_NONE 861 Testgas
Rating UNIT_NONE 862 Air Number Check
P_Draft UNIT_MBAR 870 Draught
P_Draft UNIT_PA 871 Draught
P_Draft UNIT_PSI 872 Draught
P_Draft UNIT_HPA 873 Draught
P_Draft UNIT_INH2O 874 Draught
P_Draft UNIT_INHG 875 Draught
P_Draft UNIT_MMH2O 876 Draught