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

Allow configuration of modbus device address ("unit") and used write command #50

Merged
merged 5 commits into from
Jan 16, 2024

Conversation

M4GNV5
Copy link
Contributor

@M4GNV5 M4GNV5 commented Jan 9, 2024

I got some more time to play around with my RS485-TCP adapter and made it successfully talk to my heatpump.
I had to make some further adjustments to this program in order to be able to make it work:

  • My heatpumpt only supports multi-writes not single writes. I added a config option to configure which write mode to use
  • The program always talked to modbus address 0x01. I added a config option to specify the device address to talk to.

EDIT: I will have a look at the pep8 and coverage comments and try to fix them.

@pep8speaks
Copy link

pep8speaks commented Jan 9, 2024

Hello @M4GNV5! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-01-15 09:25:01 UTC

@M4GNV5 M4GNV5 changed the title Allow configuration of modbus device address ( Allow configuration of modbus device address ("unit") Jan 9, 2024
@M4GNV5 M4GNV5 changed the title Allow configuration of modbus device address ("unit") Allow configuration of modbus device address ("unit") and used write command Jan 9, 2024
Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (c02482f) 96.56% compared to head (a8d32cb) 96.53%.

Files Patch % Lines
modbus4mqtt/modbus4mqtt.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
- Coverage   96.56%   96.53%   -0.03%     
==========================================
  Files           6        6              
  Lines        1047     1068      +21     
==========================================
+ Hits         1011     1031      +20     
- Misses         36       37       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@M4GNV5
Copy link
Contributor Author

M4GNV5 commented Jan 15, 2024

The @codecov report seems outdated, but from my perspective this PR should now be ready for review / merge @tjhowse

@tjhowse
Copy link
Owner

tjhowse commented Jan 16, 2024

Looks good to me! Amazing work! Thank you very much.

@tjhowse tjhowse merged commit e3c17c8 into tjhowse:master Jan 16, 2024
2 of 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.

3 participants