-
Notifications
You must be signed in to change notification settings - Fork 34
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
Error with fresh install due to PAHO-Client incomtability #53
Comments
Thanks very much for this – I actually hit this problem at my day job but I never fixed it on this project. I'll pin paho to <2.0 and put out a release to pypi today. Device manufacturers have many different interpretations of how modbus should be used. It's difficult to provide universally-accurate guidance. Generally speaking "holding registers" are for configuration values, and "input" registers are either reflections of the state of physical inputs, or software inputs to the logic in the controller. Historically there have also been "coil" and "output" registers, but I haven't seen those outside of industrial Programmable Logic Controllers (PLCs). Cheers, |
Hi tjhowse,
great.
Well, as the modbus protocol is comparably simple there are coils (R: FC 01 / W: FC 05/15), holding registers (R: FC 02/03 W: 06/16), input registers (R: FC 04) and even the modbus devices targeting on Smart Home like the E-Byte ones and many others too use still coils. Modbus Reference: Modbus Reference I was not able to read a single value from my E-Byte device while reading and writing data to/from it with the very old Modbus Poll Software was very easy. I like the approach of your software very much and it could be a piece of standard software but there should be database for working config.yaml files for known hardware somewhere along with a better documentation of how to create the config. E-Byte documentation for my device DOC ME31-AAAX2240 I tried the following config:
It's tested before with Modbus Poll that the device is reachable and the registers work as documentated. With this config I get the following error.
Completely leaving out the last Datapoint as it is a coil leads to:
I mean the configuration could not be easier and I can't get it to work. Can you give me a hit what I am doing wrong? regards Chris |
Hi,
I just wanted to try out this library and before using it with docker I like to use it from the CLI in order to better understand what is happening. So I created a folder with a venv and installed modbus4mqtt into it with
pip3 install modbus4mqtt
. Then I tried to create a really simple config.yaml.To test the program I just called the help text with
modbus4mqtt --help
which worked fine.When I tried to run the program against the config I got:
So I guessed there has to be something wrong with the underlying mqtt library. I removed PAHO 2.0.0 with
pip uninstall paho-mqtt
and installed and earlier version of PAHO withpip3 install paho-mqtt==1.6.1
.Afterwards modbus4mqtt is running right away, so you should consider either updating your program to the new API of PAHO-mqtt 2.0.0 or change your requirements.txt to use 1.6.1 version during installation.
P.S.: For me it is difficult to understand how the addresses for the modbus registers are configured in the right way. Is the first number of the address the modbus function? When is the holding and when is the input table used? I think this is the core of modbus configuration and the documentation should be a little more extensive.
HTH
regards from germany
Chris
The text was updated successfully, but these errors were encountered: