You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a test case using modsim.topmaker.net device for string16 #79
I will later update the modpoll example config files to include above usages as well. thanks.
Btw, the modsim is only a very simple example of Modbus simulator (all logics are in one python file), you could fork it and easily make changes to adapt to your further tests.
Sorry for the late response, you are absolutely right, 16-character long string is 8 words, so here we shall poll 8 registers in the config file.
Hope you have already get the problem solved.
Btw, the modsim is only a very simple example of Modbus simulator (all logics are in one python file), you could fork it and easily make changes to adapt to your further tests
To clarify my intend, my request is targeting to improve usability of modpoll for all possible use cases as it is such a great tool!
In this specific case no example for extracting strings exists in current documentation.
So far I found modpoll to work perfectly in environments where device specifications are fully correct, but errors in specifications and implementations are are a fact of life.
I'll add more issues around handling incorrect output of modpoll due to errors in creator supplied device specifications & implementations shortly.
I have to agree that the current document is far from covering all features or potential usecases of modpoll tool. the tool itself is quite flexible and can be used in many senarios, I'll continuously improve our documents. Thanks for your suggestions.
Meanwhile, I would also like to say, I always welcome contributions from users, because people love to see and learn from actual examples, you might have just come through a hard time (due to non-standard vendor implementation or even incorrect vendor specs) to figure out a modpoll config for a specific device, now the other people happens to use the same vendor might be benefit from your work if you could share it. It could be a config file or any writeups of your experience or tips. PULL REQUESTS ARE WELCOME.
In fact, this is the gist of creating this modpoll tool, which made it different from the other traditional non-sharable modpoll tools.
I plan to contribute like I did in many other OSS projects already.
Unfortunately I've not mastered ModBus yet but modpoll is helping a lot.
I try to read data from devices supporting SunSpec but have to rely currently on an ESP32-based simulator. This emulator is written in Tasmota script and suffers from a number of issues I hope to fix.
To complicate matters further, the emulator's source code is currently only available on a file sharing website with description on a different website :(
I'm working with the original author to publish on GH but with limited success yet.
The emulator's ModBus related code is below
current power in W = 40097
total Wh export = 40129
total Wh Import = 40137
Do you have the SunSpec Modbus protocol? why not follow the document straight away? also interested to know if your goal is to read data from actual SunSpec device, or to create a SunSpec emulator?
Activity
mi-hol commentedon Dec 18, 2024
and field "MajorMinorRevision": "3.8.0"
gavinying commentedon Dec 22, 2024
In fact, the register's string length shall be according to device specification, it is not configured or decided by modpoll tool.
For your request, we need to modify modsim code to simulate a 16-character long string value, see top-maker/modsim@392113d#diff-1214100fc30f036ad98e2a546fcb20b6fb7a7cf375bff7fcbb4a099590f6cbfdR97
Now, you could use below config to retrieve 16-byte long string value from modsim device,
I will later update the modpoll example config files to include above usages as well. thanks.
Btw, the modsim is only a very simple example of Modbus simulator (all logics are in one python file), you could fork it and easily make changes to adapt to your further tests.
mi-hol commentedon Dec 23, 2024
Thanks, I see my misunderstanding now.
"Poll" extracts 8 words, which is containing the 16-character long string value.
did I get this right?
gavinying commentedon Jan 3, 2025
Sorry for the late response, you are absolutely right, 16-character long string is 8 words, so here we shall poll 8 registers in the config file.
Hope you have already get the problem solved.
mi-hol commentedon Jan 6, 2025
To clarify my intend, my request is targeting to improve usability of modpoll for all possible use cases as it is such a great tool!
In this specific case no example for extracting strings exists in current documentation.
So far I found modpoll to work perfectly in environments where device specifications are fully correct, but errors in specifications and implementations are are a fact of life.
I'll add more issues around handling incorrect output of modpoll due to errors in creator supplied device specifications & implementations shortly.
gavinying commentedon Jan 7, 2025
I have to agree that the current document is far from covering all features or potential usecases of
modpolltool. the tool itself is quite flexible and can be used in many senarios, I'll continuously improve our documents. Thanks for your suggestions.Meanwhile, I would also like to say, I always welcome contributions from users, because people love to see and learn from actual examples, you might have just come through a hard time (due to non-standard vendor implementation or even incorrect vendor specs) to figure out a modpoll config for a specific device, now the other people happens to use the same vendor might be benefit from your work if you could share it. It could be a config file or any writeups of your experience or tips. PULL REQUESTS ARE WELCOME.
In fact, this is the gist of creating this
modpolltool, which made it different from the other traditional non-sharablemodpolltools.Happy coding and sharing :)
mi-hol commentedon Jan 7, 2025
I plan to contribute like I did in many other OSS projects already.
Unfortunately I've not mastered ModBus yet but modpoll is helping a lot.
I try to read data from devices supporting SunSpec but have to rely currently on an ESP32-based simulator. This emulator is written in Tasmota script and suffers from a number of issues I hope to fix.
To complicate matters further, the emulator's source code is currently only available on a file sharing website with description on a different website :(
I'm working with the original author to publish on GH but with limited success yet.
The emulator's ModBus related code is below
current power in W = 40097
total Wh export = 40129
total Wh Import = 40137
gavinying commentedon Jan 7, 2025
Do you have the SunSpec Modbus protocol? why not follow the document straight away? also interested to know if your goal is to read data from actual SunSpec device, or to create a SunSpec emulator?