Closed hectovs closed 4 months ago
What does "unit=0" mean ???? that is not a parameter we have, nor is it documented
You got a response from an unexpected device.
Please look at our examples or documentation to see the correct parameter usage.
Apologies, I appreciate that is not the correct parameter usage, I have now changed it and I still get the same logs and error. I am specifying the slave as zero now, as follows:
response1 = await async_client.read_holding_registers(address=124, count=4, slave=0)
slave=0 means broadcast, as pr documentation, is that really what you want ?
Anyhow that is most likely the reason why the response is rejected.
There are however a part of the log that disturbs, I will try to simulate your call
Interesting I cannot reproduce your problem even with slave=0.
The only difference I see is that you receive the package a byte at a time, that is something we have not tested, but I will a new test and see if that shows the problem.
Thanks for your help, switching away from broadcast with slave=0 fixes this problem in this specific case for me. I am still receiving the response a byte at a time but it no longer throws an error. There is only one other device on the modbus network in my set up - is there a reason this broadcast mode throws up an issue only on the async client?
I am looking into that, because it should motivate happen.
Thanks! your description and logs helped us nail down a year old bug.
Versions
Pymodbus Specific
Description
I have successfully run the client with the synchronous client but when I switch to the asynchronous client it no longer works. On viewing the logs, it looks like there's a mismatch between the transaction numbers and the asynchronous client is perceiving the response to be an unrequested message. How can I fix this
Code
Logs