Releases: cybcon/modbus-server
Releases · cybcon/modbus-server
v2.1.0
Release: Persistence, Docs, and Improvements
Summary
This release adds persistent storage for Modbus register state, accompanying tests, configuration, and documentation improvements. It also includes maintenance updates such as logging adjustments, version bumps, and repository-level community and security documents.
Highlights
- Persistence: new register persistence library integrated into the server to save and restore register state across restarts.
- Tests: unit tests covering the persistence behavior.
- Configuration: persistence settings added to
src/app/modbus_server.jsonand example configuration files. - Docs & Community: added
SECURITY.md,CODE_OF_CONDUCT.md,CONTRIBUTING.md, andarc42architecture documentation/diagrams. - Maintenance: logger tweaks, version increases, and improved
.gitignoreentries.
What's New
- New library:
src/app/lib/register_persistence/__init__.py— handles efficient storage and restore of register state. - Graceful save:
src/app/modbus_server.pynow triggers a persistence save on graceful shutdown to avoid state loss. - New tests:
tests/test_register_persistence.pyvalidates persistence logic and edge cases. - Example updates:
examples/test.json,examples/abb_coretec_example.json, andexamples/udp.jsonupdated to reflect new config and removed deprecated fields.
Upgrade & Migration Notes
- Persistence is opt-in via configuration in
src/app/modbus_server.json. Review thepersistencesection in the config and theexamples/before enabling in production. - Deployments should allow sufficient time for graceful shutdown so the server can complete persistence writes.
- When enabled, the server will create or update on-disk persistence files according to the configured path; ensure appropriate file permissions and storage availability.
Compatibility & Caveats
- No changes to core Modbus protocol handling — this release only augments lifecycle behavior with persistence.
- Default runtime behavior remains unchanged if persistence is not enabled.
- Storage format and on-disk files are managed by the new library; future releases may include migrations if the format changes.
What's Changed
Full Changelog: v2.0.0...v2.1.0
v2.0.0
Summary
This release upgrades the Modbus Server project to PyModbus v3.11 and includes several maintenance updates and improvements.
Key Changes
Dependency Upgrades
- PyModbus v3.11: Major version upgrade with updated API and imports
- Changed from
pymodbus.server.synctopymodbus.servermodule imports - Updated datastore imports: removed deprecated
ModbusSlaveContext, now usingModbusDeviceContext - Updated device module path:
pymodbus.device→pymodbus.pdu.device - Adjusted function signatures and data block handling to match new API
- Changed from
Infrastructure Updates
- Alpine base image: Updated from 3.23.2 to 3.23.3 (security & patch updates)
- Version bump: 1.4.1 → 2.0.0 (reflects major PyModbus upgrade)
- Copyright year: Updated to 2026
Feature Removals
- Removed
zeroModeconfiguration: The deprecatedzeroModeoption has been removed from both the configuration file and the codebase. This simplification aligns with PyModbus v3.11 standards and reduces unnecessary complexity.
Documentation & CI/CD Improvements
- CI/CD workflow enhancement: Updated GitHub Actions test workflow to install dependencies from dedicated
tests/requirements.txtfile, improving setup clarity and maintainability - Improved configuration handling: Updated default config file path logic for better portability
- Added Copilot Instructions: New
.github/copilot-instructions.mdwith comprehensive project documentation including architecture, build commands, conventions, and configuration guidelines - Updated documentation: README and code comments reflect new version and removed features
Code Quality
- Updated docstring format and type hints throughout
modbus_server.py - Enhanced error handling documentation
What's Changed
Full Changelog: v1.4.1...v2.0.0