-
Notifications
You must be signed in to change notification settings - Fork 976
Passing in a device_id
to read_holding_registers
causes error got an unexpected keyword argument 'device_id'
#2609
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
Comments
Looks a lot like the pymodbus version is NOT v3.8.6 look at the code:
|
Are you sure you do not another version installed e.g. globally that that precedence. Did you verify with pip that v3.8.6 is actually installed? |
I thought the same thing, but everything I've tried says it's
🤷 |
... and yet, when I go in to def read_holding_registers(self,
address: int,
*,
count: int = 1,
slave: int = 1,
no_response_expected: bool = False) -> T:
"""Read holding registers (code 0x03).
:param address: Start address to read from
:param count: (optional) Number of registers to read
:param slave: (optional) Modbus slave ID
:param no_response_expected: (optional) The client will not expect a response to the request
:raises ModbusException:
This function is used to read the contents of a contiguous block
of holding registers in a remote device. The Request specifies the
starting register address and the number of registers.
Registers are addressed starting at zero.
Therefore devices that specify 1-16 are addressed as 0-15.
""" I'm clearly not running the actual So I dunno. Something funky happened. I'll delete the venv and start again. If I can recreate this issue I will re-open the issue but otherwise this is something at my end. Sorry for the noise. |
I'm using version 3.8.6 from pip and talking to an EW11 modbus TCP adapter.
According to the docs I can pass in a
device_id
.However, when I do this I get the error:
When ommiting
device_id
altogether things work as expected.Example code
Error
The text was updated successfully, but these errors were encountered: