kymoscope-collector
Site collector for Kymoscope. It runs on one host in a plant (normally the DMZ), reads industrial protocols, databases, message brokers, a folder of logger files or your own Python source, encrypts the data and publishes it as Kymoscope streams. Outbound connections only; the disk buffer holds ciphertext.
Install
pip install kymoscope-collector # core: OPC UA, CSV files, UDP/TCP, Python sources
pip install "kymoscope-collector[files]" # + Parquet, TDMS and MF4 files
pip install "kymoscope-collector[windows]" # + Windows service
pip install "kymoscope-collector[history]" # + recording always or by trigger (Historian)
pip install "kymoscope-collector[sql]" # + SQL sources and sinks
Requires Python 3.10 to 3.13 (python.org or your distribution; the Microsoft Store Python cannot host the Windows
service and service install refuses it).
- Docker:
ghcr.io/javijur/kymoscope-collector(mount a folder withcollector.yamlat/data). The container runs as uid 10001, so give it the folder:sudo chown -R 10001:10001 /srv/kymoscope(or use--user). It stops with a clear message when/datais not writable. - Linux (systemd):
sudo useradd --system --no-create-home --shell /usr/sbin/nologin kymoscope, then copy the unit file to/etc/systemd/system/. It ships in the package at<site-packages>/kymoscope_collector/packaging/kymoscope-collector.service(and in the repository atpackages/collector/packaging/). UncommentReadWritePaths=for any folder a files source writes to (ProtectSystem=strict). - Windows service: runs as LocalSystem by default. For a dedicated account:
sc config KymoscopeCollector obj= .\kymoscope password= ..., plus the "Log on as a service" right (sc configdoesn't grant it), read access to the Python installation and the venv (so not a Python installed underC:\Users), modify rights onstate_dirand on every watched folder (itsdoneandfailedfolders too), and read access tostate_dir\pki\own\key.pemif it already exists (it is private to the account that created it and doesn't inherit:icacls ...\pki\own\key.pem /grant kymoscope:R). The service restarts itself after any failure.
Before installing (for the plant's IT)
- Application control (WDAC, AppLocker, Smart App Control): the service host
pythonservice.exefrom pywin32 is not code-signed (python.exeis). If unsigned binaries are blocked, allow it by path or hash, use Docker or WSL, or wait for the signed installer. - Outbound TCP 443 to Kymoscope, directly or through an HTTP proxy (below; Basic, NTLM or Kerberos; TLS inspection works once its root certificate is in the Windows certificate store). Nothing inbound.
- Python 3.10 to 3.13, installed for all users if the service runs under a dedicated account. Not the Microsoft Store Python.
Updating
pip can't replace files while the service runs (WinError 32), so stop it first:
kymoscope-collector service stop --config C:\ProgramData\Kymoscope\collector.yaml
pip install -U "kymoscope-collector[windows]"
kymoscope-collector service start --config C:\ProgramData\Kymoscope\collector.yaml
Docker: docker pull ghcr.io/javijur/kymoscope-collector, then remove and recreate the container with the same
options. systemd: systemctl stop kymoscope-collector, pip install -U kymoscope-collector in the unit's environment,
systemctl start kymoscope-collector. The buffer and certificates in state_dir survive the update.
Proxy
proxy: env:KYMOSCOPE_PROXY # http://host:port or http://user:password@host:port (percent-encode @ : \)
no_proxy: [historian.customer.local]
proxy_auth: basic # basic (default) | negotiate | ntlm
tls_trust: system # system (default) | bundled
ca_bundle: corp-root.pem # optional, a PEM trusted on top
Both the HTTPS calls and the relay WebSocket tunnel through it (HTTP CONNECT); OPC UA never does. A Windows service doesn't see a user's Windows proxy settings, so set it here. The log never shows the credentials.
proxy_auth: negotiate: Kerberos with NTLM fallback, as the account the collector runs as (SSPI on Windows; no password anywhere). A service as LocalSystem authenticates as the computer accountDOMAIN\HOST$.proxy_auth: ntlm: a named account in the URL,http://DOMAIN%5Cuser:password@host:port(keep it infile:).- With either, a local forwarder on 127.0.0.1 authenticates each tunnel. It carries HTTPS only: plain
http://through it gets 501 and a log line (useno_proxyor https). Only the collector itself can use it (a random key per start); another program on the host gets 407. collector.logtraces every tunnel (destination, schemes the proxy offers, the one chosen, each step's answer, the time; never a token or password).log: {libraries: debug}adds pyspnego's and websocket-client's own lines.tls_trust: systemtrusts the operating system's certificate store, where IT installs a TLS-inspecting proxy's root;bundledtrusts only certifi (before 0.8.2).ca_bundleadds a PEM on top (Docker, Linux).
Code-signed installers are coming.
Quick start (no server needed)
kymoscope-collector simulate # demo OPC UA server on port 4840
kymoscope-collector browse --url opc.tcp://localhost:4840 --out tags.csv
kymoscope-collector run --config collector.yaml
A minimal collector.yaml:
api_key: env:KYMOSCOPE_API_KEY
sources:
- name: Demo
type: opcua
url: opc.tcp://localhost:4840
security: None
allow_insecure: true # demo server only
tags: tags.csv
Notes:
- Unknown keys in
collector.yamlare an error that lists the valid ones; a password withsecurity: Noneis allowed but logged as a warning. - Editing
tags.csvreconnects the source, so its tags have a short gap. - One OPC UA source handles about 2,000 tags reporting at distinct millisecond times per second. Split larger tag
lists into several
type: opcuasources with differenttagsfiles. - The enumeration labels are not sent. Blocks wait in a memory queue bounded by
buffer.memory_mb(default 256) while a stream cannot register; the oldest are dropped and counted in<source>.queue_dropped. - The private key
state_dir/pki/own/key.pemis created owner-only (0600; on Windows user, SYSTEM and Administrators).
Other commands: cert (show or renew the collector's certificate), service install|remove|start|stop
(Windows), endpoints --url opc.tcp://host:4840 (the security an OPC UA server offers, as JSON, with the strongest),
discover --config collector.yaml --source NAME --out tags.csv (the tags a configured source offers) and
backfill --config collector.yaml --source NAME --from 2026-10-01T00:00:00Z --to 2026-10-02T00:00:00Z (a time range
of a source's history sent into its stream, marked historical, for sources that keep history).
Recording
Everything the collector stores is a recording. Each source sets record:; the recording: block holds the settings
of every source that records by itself:
sources:
- name: Customer A DCS
type: opcua
url: opc.tcp://dcs-gw:4840
tags: tags.csv
record: always # the default: everything the source sends
mark_tag: MarkButton # optional: each rise of this channel marks the stream
- name: Customer A test rig
type: udp
layout: rig_layout.yaml
record:
trigger: # from start to stop; or all: / any: a list of conditions
start: Speed > 5
stop: Speed < 1
start_after: 5s # optional: the start must hold this long
stop_after: 2min # optional: the stop must hold this long
- name: Customer A lab bench
type: modbus
host: 192.168.1.20
map: registers.csv
record: manual # nothing stored by the collector; Record in the app (kept 90 days)
recording:
timezone: Europe/Madrid # recordings and days are cut at its midnight (default UTC)
split_gap: 30min # no value for this long ends a recording (default 30min)
where: kymoscope # kymoscope | own; omit to follow the organization's choice
raw_years: 2 # raw data kept this many years (your plan may allow fewer); rollups 10 years
max_local_gb: 50 # cap of each source's local day spool (default 50)
Conditions are channel op number (>, >=, <, <=, ==, !=). Durations: 500ms, 30s, 2min, 1.5h or a
plain number of seconds. The live stream always carries every value; record only decides what is stored. The other
recording keys: close_after_min (15), keep_local_days (7), today_every_min (15; 0 or at least 5).
The former history: section is refused: move its keys under recording: (gap_s is now split_gap), and set
record: manual on the sources it left out.
Recording always or by trigger needs the Historian on your plan, the stream in an end-to-end encrypted project and
pip install "kymoscope-collector[history]". Without that extra, a source with no record key records manually (the
log says so) and one with record: always or trigger stops the start.
Marks: every source's stream has a numeric channel mark, 0 from its start and 1 for one sample when the stream is
marked (a rise of mark_tag). segments: rules need their source to record by itself.
Every value a source records also goes into an encrypted local day spool (state_dir/history/<source>/days). About 15
minutes after midnight (close_after_min) each day becomes an encrypted raw day file plus 1-minute and 1-hour rollups,
uploaded straight to Kymoscope storage; the local copy goes keep_local_days (7) after the upload. Values that arrive
later (a backfill, a buffer catching up) make a new version of the day. The day files are sealed with a history key
that only the project's members can open. A stream of an unencrypted project gets no history: the log says so and the
health stream shows <source>.history_needs_e2ee = 1.
Disk: the local day spool never fills the disk. Past 90 % of max_local_gb the uploaded days go first, oldest first
(before keep_local_days); a day not uploaded yet is never deleted for space. When the spool holds max_local_gb of
days not uploaded (the Historian off, the stream not registered, a long outage), or the disk would keep less than
buffer.min_free_mb free, new blocks are not kept for the recording (<source>.history_spool_refused counts them; live
data goes on as usual). A day's build waits while the disk has less free than twice its spool
(<source>.history_disk_low = 1). Plan for about channels x Hz x 3600 x 12 bytes per day before compression and an
hour of it in memory, 2-3 times over, during a build (builds run one at a time): 1,000 channels at 60 Hz is about
20 GB a day and 2.6 GB per build window, the most one source should carry; split a larger tag list into sources.
Firewall: outbound HTTPS to <account>.eu.r2.cloudflarestorage.com (allow *.eu.r2.cloudflarestorage.com if your
proxy takes wildcards), besides the usual Kymoscope hosts.
kymoscope-collector history status --config collector.yaml
kymoscope-collector history upload --config collector.yaml --source "Customer A DCS" --day 2026-10-20 # now, not at midnight
kymoscope-collector history verify --config collector.yaml --source "Customer A DCS" --day 2026-10-20 # uploaded vs local
Own storage (Enterprise): when your organization keeps its recordings in its own S3-compatible bucket (set up by
its admin in the app, Organization > Storage), the collector uploads there itself through links signed by Kymoscope,
so allow outbound HTTPS to that bucket instead (https://kymoscope.com/docs/collector-history-storage).
recording.where: kymoscope keeps one collector in Kymoscope storage anyway; where: own waits (logged) while the
organization has no bucket.
Health channels per source: history_days_pending, history_errors, history_needs_e2ee, history_spool_errors,
history_spool_mb, history_spool_refused, history_disk_low, history_storage_waiting (1 while new days wait for
the organization's own bucket: not tested yet, or its contract ended), history_spool_key_resets (the local spool key could
not be read, e.g. the service reinstalled under another Windows account: it was set aside as spool.key.bad and
replaced; days spooled before can't be read locally any more).
Sinks
Enterprise: every value of your sources can also go to a database you run, in plaintext on your network, besides the encrypted stream. Each sink keeps a local store-and-forward log, so an unreachable database never slows live data and catches up later.
sinks:
- name: Plant SQL
type: sql # PostgreSQL/TimescaleDB, SQL Server, MySQL/MariaDB, Oracle (extra `sql`)
dsn: env:PLANT_SQL_DSN # postgresql://kymo_writer:password@db.plant.local:5432/plant
table: kymoscope_values # created when missing: ts (UTC), source, channel, value
- name: Plant Influx
type: influx # InfluxDB 2.x (api: v2) or 1.x (api: v1)
url: https://influx.plant.local:8086
token: env:INFLUX_TOKEN
org: plant
bucket: kymoscope
Health channels per sink: sink_backlog_mb, sink_connected, sink_rows_written, sink_rows_rejected, sink_dropped, sink_errors, sink_not_in_plan. SQL Server and MySQL/MariaDB need their
ODBC driver on the host; the Docker image has unixODBC but not those drivers. Full reference:
https://kymoscope.com/docs/collector-sinks
Source types
Each sources entry has a type. Install the extra for the types you use; extras combine
(pip install "kymoscope-collector[mqtt,sql]").
type |
Reads | pip extra |
|---|---|---|
opcua |
OPC UA servers (with history backfill) | core |
opcda |
OPC DA (Classic) servers, Windows only | opcda (+ windows) |
mqtt |
MQTT brokers, Unified Namespace, Sparkplug B | mqtt |
modbus |
Modbus TCP / RTU, SunSpec inverters | modbus |
can |
CAN / CAN FD buses decoded with a DBC | can |
logix |
Rockwell ControlLogix, CompactLogix, Micro800 | logix |
s7 |
Siemens S7-300/400/1200/1500 | s7 |
ads |
Beckhoff TwinCAT PLCs by symbol name | ads |
bacnet |
BACnet/IP building automation | bacnet |
serial |
RS-232/RS-485 or serial-server instruments, line by line | serial |
scpi |
SCPI/VISA instruments (LAN, GPIB, USB) | scpi |
udp |
Binary struct packets or JSON/CSV lines over UDP or TCP | core |
kafka |
Kafka topics: JSON, raw numbers, Sparkplug B | kafka |
mtconnect |
CNC machines through an MTConnect agent | mtconnect |
influx |
InfluxDB 2.x (Flux) or 1.x (InfluxQL) | influx |
sql |
Databases; AVEVA Historian, IP.21 and Timescale presets (validate on your system) | sql |
rest |
REST APIs; Canary and Proficy presets (validate on your system) | rest |
webhook |
Receives pushed JSON | webhook |
files |
CSV (core), Parquet, TDMS, MF4; battery cyclers (Neware, BioLogic, Arbin, Maccor, Basytec, Digatron) and HDF5 | files for non-CSV; cyclers, hdf5 |
python |
Your own adapter class | core |
Anything else (IEC 60870-5-104, IEC 61850, DNP3, Mitsubishi MC, Omron FINS...): expose it as OPC UA or MQTT with a
gateway (Kepware, Ignition Edge, Matrikon, Node-RED, Telegraf...).
discover and backfill (above) work with any source type that supports them.
Documentation
- Install,
collector.yamlreference, certificates, security, health, troubleshooting, and "Which source do I use?": https://kymoscope.com/docs/collector - Per source:
/docs/collector-opcda,-opcua-history,-mqtt,-can,-modbus,-logix,-s7,-ads,-bacnet,-serial,-udp,-sql,-rest,-kafka,-mtconnect,-influx,-cyclers, and/docs/collector-gatewaysfor protocols the collector does not read natively.
Metadata
Release files for kymoscope-collector 0.9.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kymoscope_collector-0.9.3.tar.gz | 447.6 kB | With provenance | Details for kymoscope_collector-0.9.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kymoscope_collector-0.9.3-py3-none-any.whl | Python 3 | none | any | Details for kymoscope_collector-0.9.3-py3-none-any.whl |
Total release size: 755.5 kB
Release files / kymoscope_collector-0.9.3.tar.gz
| Download URL | kymoscope_collector-0.9.3.tar.gz |
|---|---|
| Size | 447.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79dee75ee07e69d890d598b937ceffc37ca9a6ecc2d2c2bc8914473dd24dea71
|
|
BLAKE2b-256 checksum How to use checksums |
8b38457a7853183d29d7df98789bafc65c0d224d162a9e434e0199a0c0e7fafa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / kymoscope_collector-0.9.3-py3-none-any.whl
| Download URL | kymoscope_collector-0.9.3-py3-none-any.whl |
|---|---|
| Size | 307.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a2c93755ec337dc8dd68d9b4216b4e3949c668c8dee386a1010eef2587db2f5
|
|
BLAKE2b-256 checksum How to use checksums |
16ba0c97213be428b7184aabafe51951c2a6d989976fb88a09ad75bb5ecdad46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for kymoscope-collector 0.9.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kymoscope_collector-0.9.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.