meterCategory

meterCategory #

The meterCategory is an optional request parameter, which should indicate the expected meter category, if this happens to be known beforehand. It should be either gas, water, or electricity. Providing this parameter might result in more accurate readings by Blicker. In addition, it can be used to verify that the readings by Blicker are in line with the expectations.

Based on the image, Blicker will try to determine the meter category. If Blicker is able to verify that the expected meter category is indeed found, no special message is returned. For example, when the expected display type was water, the response will contain:

{
    "meterCategory": "water",
    "expectedMeterCategory": "water"
}

When the meter category could not be verified, the response will contain messageCode no_match_meter_category. For example:

{
    "meterCategory": "water",
    "expectedMeterCategory": "electricity",
    "messages": [
        {
            "code": "no_match_meter_category",
            "message": "The detected meter category does not match the expected meter category.",
            "messageId": "<messageId",
            "objectId": "<objectId>"
        }
    ]
}

If this is the case, the end-user may have photographed the wrong meter. It is recommended to indicate this to the end-user and instruct them to take an image of the correct meter. In some cases, Blicker will repeatedly identify the meter category to be different from the expected meter category. Therefore, an end-user might be given the opportunity to submit the request anyway.

Example request #

curl -X 'POST' \
  'https://api.blicker.ai/blicker/2020-10-01' \
  -H 'subscription-key: <your subscription key>' \
  -F 'image=@test_image.jpg' \
  -F 'meterCategory=electricity'
from pathlib import Path
from pprint import pprint

import requests

response = requests.post(
    "https://api.blicker.ai/blicker/2020-10-01",
    headers={"subscription-key": "<your subscription key>"},
    files={"image": ("test_image.jpg", Path("test_image.jpg").read_bytes())},
    data={"meterCategory": "electricity"},
)

pprint(response.json())