forked from Pho3niX90/solis_modbus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* - bump version * - bump version * Refactor update methods and adjust poll intervals Changed the 'async_update' methods to just 'update' in sensor.py, number.py, and switch.py files. Additionally, the poll intervals have been adjusted. These modifications aim to enhance the efficiency and timing of data updates. * Update async operations in sensor.py The async operations for updating sensor entities have been refactored and encapsulated in a new function `get_modbus_updates`. This improves the asynchronous handling of updates, making the code more efficient and organized. * Switch to async Modbus operations for responsiveness Refactored Modbus reading methods across several components to use asynchronous operations. This allows the event loop to manage other processes to keep the system responsive, particularly during heavy IO operations. * Update version and clean error handling in Modbus operations The version number in the system has been updated from 1.4.3 to 1.4.4 in both manifest.json and const.py. Additionally, error handling for modbus operations within modbus_controller.py has been updated to streamline failure responses, eliminating unnecessary error check steps and focusing on exception-based error handling. fixes Pho3niX90#43 and Pho3niX90#27 * Switch Modbus operations to asynchronous version Switched all write operations in Modbus component to their asynchronous counterparts, starting from calling the asynchronous version of write methods in modbus_controller.py, propagated through other components like time.py, sensor.py, and more. This change aims to boost performance by leveraging Python's native async features. Logging statements unrelated to debugging were also removed to clean the code. * Replace synchronous Modbus operations with asynchronous The Modbus operations have been replaced with their asynchronous counterparts in modbus_controller.py, number.py, and time.py. The switch to asynchronous operations aims to improve performance by effectively utilizing Python's in-built asynchronous features. Logging messages unrelated to debugging have been removed for a cleaner codebase. * Implement asynchronous Modbus operations Switched synchronous Modbus functions to their asynchronous variants to leverage Python's asyncio capabilities and improve performance. Debugging-specific logging messages have been removed to tidy up the codebase. Asynchronous operations were adopted in files like modbus_controller.py, number.py, and time.py.
- Loading branch information
Showing
9 changed files
with
65 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
DOMAIN = "solis_modbus" | ||
CONTROLLER = "modbus_controller" | ||
VERSION = "1.4.4" | ||
VERSION = "1.4.5" | ||
POLL_INTERVAL_SECONDS = 15 | ||
MANUFACTURER = "Solis" | ||
MODEL = "S6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters