Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for more modbus connection variants #47

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

M4GNV5
Copy link
Contributor

@M4GNV5 M4GNV5 commented Aug 28, 2023

My heatpump has a modbus Serial/RTU connector. Together with a transparent RS485<->TCP adapter I end up with modbus rtu-over-tcp.
Previously this library only supported modbus TCP and sungrow variants. This pull request brings support for all the IP-based modbus variants available using pymodbus.

In the future the serial based variants could easily be added to modbus_interface, but I am not sure how to properly handle configuration for them.

@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #47 (b76cd40) into master (7f7a3f2) will increase coverage by 0.20%.
The diff coverage is 97.36%.

@@            Coverage Diff             @@
##           master      #47      +/-   ##
==========================================
+ Coverage   96.35%   96.56%   +0.20%     
==========================================
  Files           6        6              
  Lines        1015     1047      +32     
==========================================
+ Hits          978     1011      +33     
+ Misses         37       36       -1     
Files Changed Coverage Δ
modbus4mqtt/modbus_interface.py 96.73% <94.73%> (+1.01%) ⬆️
tests/test_modbus.py 98.04% <100.00%> (+1.51%) ⬆️

... and 1 file with indirect coverage changes

@tjhowse
Copy link
Owner

tjhowse commented Aug 30, 2023

Thank you very much for this pull request! It has every feature of a great PR:

  • Updated docs,
  • Minimal code changes,
  • Test coverage,
  • Preserves backwards compatibility.

I really appreciate it. There's one minor readme fix required and then it's good to merge.

README.md Outdated Show resolved Hide resolved
@M4GNV5 M4GNV5 requested a review from tjhowse August 30, 2023 22:44
@tjhowse tjhowse merged commit c02482f into tjhowse:master Aug 30, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants