Skip to content

Conversation

silverailscolo
Copy link
Contributor

@silverailscolo silverailscolo commented Aug 20, 2025

Overview

  • Move model definitions to models/ directory, 1. Move models to folder #9
  • a simple init pytest as a starting point for pymodbus-supported test, 2. Add minimal pytest #10 and More tests #11
  • Automatic indexing of any module in the models/ directory.
  • Streamlined naming of model class .Node and data NodeData.
  • ProductId const enum replaced by dict built at startup from models/ definition files, returning normal int hex, also to HA integration.
  • CLI: model-specific print moved to models/ files. Ventura commands added. Fixed number entry being rejected as text by try int(val) in decode().
  • Duplicate code bundled in bridge module, used by cli and __init__ (integration access).
  • Register Access flags fixed (IntEnum, correctly recognizing R+W+S)
  • Add ClimaRad Ventura model support (common elements and methods in VMD_base.py)
  • Add NO_CAP to capabilities enum to fake the capabilities register, which the HA integration Fan relies on but Ventura does not support..
  • spelling fixes
  • sort imports

Note: will require simultaneous update of homeassistant-airios-component to pick up changes in data received.

I will offer separate PR's so you can merge them (first 2 merged). Full code reads/writes to a device OK by now 😁.

@silverailscolo silverailscolo changed the title WIP: Ventura support WIP: Ventura support/refactor Aug 23, 2025
@silverailscolo
Copy link
Contributor Author

Had to pull --rebase + fix merge conflicts, but that created 70 extra commits. Better to squash merge this instead of adding all these commits.

Thanks for installing the Lint workflow (see it in my own branch). Will fix the errors 1 by 1. Keeps me focussed ;-)

@silverailscolo silverailscolo marked this pull request as draft September 11, 2025 13:20
@silverailscolo silverailscolo marked this pull request as ready for review September 22, 2025 18:46
@silverailscolo
Copy link
Contributor Author

This package contains all remaining bullets. Is it worth the effort to pull it apart?

  • It puts all model-specific elements into the models files, including CLI node status prints() and product_id & _name;
  • It dynamically collects all supported models into the bridge_data for CLI and api (Home Assistant);
  • It adds Ventura V1 support.

@scabrero
Copy link
Owner

I have started to pick the changes slowly in a new branch on top of main because it is really hard to follow the commits. Please avoid merges in pull requests, always rebase on top of main. I will comment on some changes.


class RegisterAccess(Flag):
"""Register access flags."""
class RegisterAccess(IntEnum):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. The access is a bitmask.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought so, but 3 combined access level flags didn't work, meaning I could not write to an RW register in CLI master.

Perhaps a fix is defining register access flags between extra pair of brackets ( | )

@scabrero
Copy link
Owner

I have started to pick the changes slowly in a new branch on top of main because it is really hard to follow the commits. Please avoid merges in pull requests, always rebase on top of main. I will comment on some changes.

I will push picked changes to https://github.com/scabrero/pyairios/tree/ventura and then merge it, unless you prefer to clean up this and rebase on top of main without merge commits.

@silverailscolo
Copy link
Contributor Author

I transferred the changes to a fresh branch/PR #12.

To pass all checks, added a number of None checks.
Left out the Access/Flag change.

@silverailscolo
Copy link
Contributor Author

We are continuing in PR #4 , closing this

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