Changelog
2.2.1 (2026-06-16)
Internal
add strict static typing with basedpyright across
modpoll/; introducemodpoll/types.pyand enforcemake typecheckin local and CI quality gatesextract
Device,Poller, andReferenceintomodpoll/modbus_models.py(orchestration remains inmodbus_task.py)replace black with ruff for format and lint
Documentation
add typing audit baseline in
docs/typing-audit.mdextend contributor release checklist and harden the
on-release-mainworkflow
Tests
import device models from
modpoll.modbus_modelsin unit tests
2.2.0 (2026-06-16)
Features
MQTT on-demand read (get): subscribe on
modpoll/+/get(--mqtt-get-topic-pattern); publish{"ref": null}tomodpoll/{device}/get; response onmodpoll/{device}/get/responsewith partial success (unknown or failed refs omitted); targeted Modbus reads viareference_read.pywith adjacent register batchingPersistent Modbus connection:
ModbusConnectionManagerkeeps the client open between poll cycles and MQTT commands; non-blocking exponential reconnect backoff (--modbus-backoff-base,--modbus-backoff-max); optional connection recycle (--modbus-max-connection-age)enrich per-device MQTT diagnostics with
config_source, get/set counters (get_count,get_errors,get_success,get_unknown_refs,get_read_errors,set_count,set_errors,set_success,set_unknown_refs)publish process-wide health on
modpoll/diagnostics(mqtt_connected,modbus_ok,devices_failing,last_cycle_s, Modbus connection state and reconnect metrics)publish process presence on
modpoll/statuswith last-will (online: false) and birth message (online: true); status is always retainedapply
--mqtt-retainto diagnostics topics (same policy as data publishes)
BREAKING CHANGES
``–interval`` default is now transport-aware:
0.0s for TCP/UDP (was0.5s); serial/RTU derives the RTU 3.5-character frame gap from--serial-baudwith a0.005s floor. Set--intervalexplicitly for slow devices.Modbus connect/close per poll cycle removed: the client stays open until shutdown or a transport failure; on serial/RTU the port remains reserved while
modpollrunsMQTT multi-reference writes now use
--intervalbetween successive refs in onesetmessage (was a fixed0.1s delay)
Documentation
document MQTT get, persistent connection, transport-aware
--interval, and extended diagnostics indocs/usage.rst
Tests
add
tests/test_modbus_connection.py, extendtests/test_main_get.pyfor backoff, connection reuse, and diagnostic countersmigrate Modbus lifecycle tests to
ModbusConnectionManager
2.1.2 (2026-06-15)
Features
warn at config load when a reference is marked
w/rwon adiscrete_inputorinput_registerpoller (Modbus inputs are read-only)
Documentation
fix README MQTT write example for
bool8references (array of 8 booleans, not a scalar)document export, diagnostics, mqtt-single, config sources, write constraints, and publish behavior in
docs/usage.rstexpand
docs/configure.rstwith CSV schema, dtypes, poll limits, and validation rulescorrect
config_template.csvcomment: dtype column is required
Tests
add contract tests in
tests/test_handler_behavior.pyfor documented edge casesconsolidate handler regression/contract tests; share
FakeModbusMasterintests/helpers/modbus.py
2.1.1 (2026-06-11)
Features
add
--mqtt-retainto set the MQTT retain flag on data publishes (diagnostics topics are never retained)
Documentation
add release documentation checklist for agents and maintainers in CONTRIBUTING.md
align narrative docs with MQTT reference-map write format and
--mqtt-keysusage
Internal
centralize MQTT data publish policy (QoS and retain) in
MqttHandler.publish_data_message
2.1.0 (2026-06-10)
Features
add
--mqtt-keys name-onlyto publish MQTT JSON keys without the unit suffix (default key style remainsname-with-unit)MQTT writes on
modpoll/{device}/setaccept a map of references{"ref_a": val, "ref_b": val}in one message; unknown keys are skipped with a warning
BREAKING CHANGES
renamed
--daemon/-dto--no-output(suppresses poll result tables only; does not fork)MQTT write payload must be a reference map (
{"ref": val});ref/valueobject format removed
2.0.0 (2026-06-10)
Project
forked from modpoll; PyPI package renamed to
modpoll2mqtt, repositoryyoch/modpoll2mqttCLI command and Python module remain
modpoll
Features
semantic MQTT write by CSV reference on
modpoll/{device}/setwith payloadrefandvalue(device from topic; scale, dtype, and endianness handled automatically)subscribe pattern
modpoll/+/setby default
BREAKING CHANGES
removed low-level MQTT write format (
object_type,address,value); use topic +refandvalueinsteadduplicate reference names on the same device now abort config loading (previously warned and overwrote)