devicesim

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL