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

Vendor pymodbus, rather than relying on the version which HA installs #749

Merged
merged 2 commits into from
Feb 1, 2025

Conversation

canton7
Copy link
Collaborator

@canton7 canton7 commented Jan 31, 2025

This should protect us from HA breaking things in the future!

Fixes: #748

@canton7 canton7 force-pushed the feature/vendor-pymodbus branch 4 times, most recently from fa90997 to 1cbf0d3 Compare January 31, 2025 11:58
@FozzieUK
Copy link
Contributor

FozzieUK commented Feb 1, 2025

I've been (over) thinking about pymodbus versions and which is closest to what we had prior to the change in core 2025.1.x.

There have been a few issues reported since the change to 3.7.4, a lot because of install and other modbus dependencies but a few systems worked ok on core 2024.12.x and not on 2025.1.x (i'd assumed 3.7.4 has specific issues).

Before the change to handle core 2025.1.x the manifest specified >= 3.1.3 and requirements.txt ==3.5.4 so i'm guessing? the dependencies in requirements would have won out but it stopped working because of the api changes in 3.7.4 so it must have been using that.

The actual version of pymodbus shipped prior to 2025.1.x was 3.6.9 and that seemed to be as good as any - so I wondering if it would be better to use 3.6.9 as the vendor specific version ?

@canton7
Copy link
Collaborator Author

canton7 commented Feb 1, 2025

Good point. Home assistant used the following versions:

  • Jul 2024: 3.6.9
  • Apr 2024: 3.6.8
  • Apr 2024: 3.6.7
  • Mar 2024: 3.6.6
  • Mar 2024: 3.6.5
  • Feb 2024: 3.6.4
  • Jan 2024: 3.6.3
  • Oct 2023: 3.5.4
  • Sep 2023: 3.5.2
  • Sep 2023: 3.5.1
  • Aug 2023: 3.5.0
  • Aug 2023: 3.4.1
  • Jun 2023: 3.3.1

So we haven't actually stayed on any particular version of pymodbus for any length of time at all.

Looking back through the logs, 3.5.4 was the last time I checked to see whether our patches on top of pymodbus were correct. But as you say, 3.6.9 seemed to be working fine. Either way, 3.1.3 is probably a bit old :P

@canton7 canton7 force-pushed the feature/vendor-pymodbus branch from 945ede7 to d2a06cd Compare February 1, 2025 12:56
This should protect us from HA breaking things in the future!

Fixes: nathanmarlor#748
This avoids having to configure both black and ruff
@canton7 canton7 force-pushed the feature/vendor-pymodbus branch from d2a06cd to 9a20e9f Compare February 1, 2025 13:00
@canton7 canton7 merged commit 893c65a into nathanmarlor:main Feb 1, 2025
3 checks passed
@canton7 canton7 deleted the feature/vendor-pymodbus branch February 1, 2025 13:10
@canton7
Copy link
Collaborator Author

canton7 commented Feb 1, 2025

3.6.9 it is!

@FozzieUK
Copy link
Contributor

FozzieUK commented Feb 1, 2025

Thanks, ready to test 👍

@canton7
Copy link
Collaborator Author

canton7 commented Feb 1, 2025

@FozzieUK Do you want any itme to test before I push out a release?

@FozzieUK
Copy link
Contributor

FozzieUK commented Feb 1, 2025

It'll be easier if you can push it out as a pre-release and then I can try it on a few different systems - i've been lucky so far and not had any problems using the waveshare so will be good to expand it out and find a few candidates that have had issues and get them to test first.

Could you label it 'Don't use this unless invited' or something

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.

Do not upgrade to HA 2025.2. We'll get a fix out when we can.
2 participants