Skip to content

Latest commit

 

History

History
236 lines (212 loc) · 7.67 KB

README.md

File metadata and controls

236 lines (212 loc) · 7.67 KB

alpr4motion - 🚗alpr listening for 🎬motion

Provides automated license plate reader as micro-service listening for MQTT messages. This service is built from the alpr service. This container may be run locally using Docker, pushed to a Docker registry, and published to any Open Horizon exchange.

Status

Supports amd64 Architecture Docker Pulls

Supports arm Architecture Docker Pulls

Supports arm64 Architecture Docker Pulls

Service discovery

  • org - [email protected]
  • url - com.github.dcmartin.open-horizon.alpr4motion
  • version - 0.0.1

Service variables

  • ALPR_COUNTRY - configuration of ALPR; us, eu
  • ALPR_PATTERN - pattern to recognize, for example va; defaults to none
  • ALPR_TOPN - number of interpretations for each plate; default 10; range 1 to 20
  • MQTT_HOST - hostname or IP address of MQTT broker; defaults to mqtt
  • MQTT_PORT - port for MQTT; defaults to 1883
  • MQTT_USERNAME - username for MQTT access; default "" (empty string)
  • MQTT_PASSWORD - password for MQTT access; default "" (empty string)
  • ALPR4MOTION_GROUP - topic group; default + (all)
  • ALPR4MOTION_DEVICE - topic device; default + (all)
  • ALPR4MOTION_CAMERA - topic camera; default + (all)
  • ALPR4MOTION_TOPIC_EVENT - topic event; default event/end
  • ALPR4MOTION_TOO_OLD - events older in seconds are ignored; default 300
  • ALPR4MOTION_USE_MOCK - generate mock events for testing
  • LOG_LEVEL - specify level of logging; default info; options include (debug and none)

How To Use

Copy this repository, change to the alpr4motion directory, then use the make command; see below:

% mkdir ~/gitdir
% cd ~/gitdir
% git clone http://github.com/dcmartin/open-horizon
% cd open-horizon/alpr4motion
% make
...
{
  "mqtt": null,
  "alpr4motion": {
    "timestamp": "2020-03-02T21:12:27Z",
    "log_level": "debug",
    "debug": true,
    "group": "motion",
    "device": "+",
    "camera": "+",
    "event": null,
    "old": 300,
    "payload": "image",
    "topic": "motion/+/+",
    "services": [
      {
        "name": "mqtt",
        "url": "http://mqtt"
      }
    ],
    "mqtt": {
      "host": "mqtt.dcmartin.com",
      "port": 1883,
      "username": "username",
      "password": "password"
    },
    "alpr": {
      "log_level": "debug",
      "debug": true,
      "timestamp": "2020-03-02T21:12:27Z",
      "date": 1583183547,
      "period": 10,
      "pattern": "",
      "scale": "none",
      "country": "us",
      "topn": 10,
      "services": [
        {
          "name": "mqtt",
          "url": "http://mqtt"
        }
      ],
      "countries": [
        "br2",
        "in",
        "vn2",
        "br",
        "kr2",
        "sg",
        "mx",
        "kr",
        "auwide",
        "fr",
        "us",
        "eu",
        "au",
        "gb"
      ]
    },
    "date": 1583183547
  },
  "timestamp": "2020-03-02T21:12:27Z",
  "date": 1583183547,
  "hzn": {
    "agreementid": "",
    "arch": "",
    "cpus": 0,
    "device_id": "",
    "exchange_url": "",
    "host_ips": [
      ""
    ],
    "organization": "",
    "ram": 0,
    "pattern": null
  },
  "config": {
    "timestamp": "2020-03-02T21:12:27Z",
    "log_level": "debug",
    "debug": true,
    "group": "motion",
    "device": "+",
    "camera": "+",
    "event": "event/end",
    "old": 300,
    "payload": "image",
    "topic": "motion/+/+",
    "services": [
      {
        "name": "mqtt",
        "url": "http://mqtt"
      }
    ],
    "mqtt": {
      "host": "mqtt.dcmartin.com",
      "port": 1883,
      "username": "username",
      "password": "password"
    },
    "alpr": {
      "log_level": "debug",
      "debug": true,
      "timestamp": "2020-03-02T21:12:27Z",
      "date": 1583183547,
      "period": 10,
      "pattern": "",
      "scale": "none",
      "country": "us",
      "topn": 10,
      "services": [
        {
          "name": "mqtt",
          "url": "http://mqtt"
        }
      ],
      "countries": [
        "br2",
        "in",
        "vn2",
        "br",
        "kr2",
        "sg",
        "mx",
        "kr",
        "auwide",
        "fr",
        "us",
        "eu",
        "au",
        "gb"
      ]
    }
  },
  "service": {
    "label": "alpr4motion",
    "version": "0.0.1",
    "port": 0
  }
}

Sample

Changelog & Releases

Releases are based on Semantic Versioning, and use the format of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented based on the following:

  • MAJOR: Incompatible or major changes.
  • MINOR: Backwards-compatible new features and enhancements.
  • PATCH: Backwards-compatible bugfixes and package updates.

Authors & contributors

David C Martin ([email protected])