Documentation
¶
Overview ¶
Command devicesim stands in for a protocol handler and its devices in the local Docker Compose setup. It reads the device commands the engine sends to the Kafka topic of a protocol handler and answers every one on the topic the command names (metadata.response_to), as platform-connector does once the device answered. At a fixed interval it also sends an event of every device in device-repository for each of its services with the interaction event or event+request, to the device data topic of the service, as platform-connector does when a device reports a value.
Answer and event follow the outputs of the service, the answer by protocol segment, the event by the name of the output variable. Values are the value of a variable if the device type fixes one, the current number for numbers, true for booleans and "simulated" for strings. The number swings around NUMBER by AMPLITUDE over PERIOD, so that event conditions turn true and false again. A service without outputs, a setter, gets an empty answer. Inputs are logged, not stored.
Environment: KAFKA_URL (default kafka:9092), TOPICS (comma separated, default connector), GROUP (default devicesim), NUMBER (default 21.5), AMPLITUDE (default 3), PERIOD (default 2m), EVENT_INTERVAL (default 10s, 0 sends no events), DEVICE_REPOSITORY_URL (default http://device-repository:8080), AUTH_URL (devauth, default http://devauth:8080).