Skip to content

Commit

Permalink
Changing modbus read/write from coils to registers per feedback from #1
Browse files Browse the repository at this point in the history
  • Loading branch information
yozik04 committed May 29, 2022
1 parent 26c7a2d commit c0b5f68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nibe/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.2.0"
4 changes: 2 additions & 2 deletions nibe/connection/modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async def read_coil(self, coil: Coil, timeout: float = DEFAULT_TIMEOUT) -> Coil:
logger.debug(f"Sending read request")
try:
result = await asyncio.wait_for(
self._client.read_coils(
self._client.read_input_registers(
slave_id=self._slave_id, starting_address=coil.address, quantity=1
),
timeout,
Expand All @@ -45,7 +45,7 @@ async def write_coil(self, coil: Coil, timeout: float = DEFAULT_TIMEOUT) -> Coil
logger.debug(f"Sending write request")
try:
result = await asyncio.wait_for(
self._client.write_coil(
self._client.write_register(
slave_id=self._slave_id, address=coil.address, value=coil.raw_value
),
timeout,
Expand Down

0 comments on commit c0b5f68

Please sign in to comment.