-
Notifications
You must be signed in to change notification settings - Fork 19
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
Generic and configurable modbus meter device support #5
base: master
Are you sure you want to change the base?
Generic and configurable modbus meter device support #5
Conversation
Hi @cupertinomiranda , that is a very nice contribution! But I have to disappoint you: I've decided to not now include this. We're launching our own energy meter, and together with the other supported energy meters that is already plenty of effort to keep testing and supporting officially. Perhaps you can make an installable package for this? That way we could also get an idea of the demand cq. interest in this. Ie something with venus-data.tgz that installs itself on the data partition, and using rcS.local, or the other one, at boot tries to patch the files on the rootfs. |
Hi @mpvader, thanks for the honesty. I realized recently that there are already way too many projects in /opt/victronenergy that communicate through serial modbus protocol, however each individual brand is implementing their own solution, such as the CG meter support. Anyway, can you point me out to documentation or an example of such installable package. |
Hi @cupertinomiranda , For modbus connections, the plan is to have it all in this repo. Meaning also deprecate the cgwacs one. We don’t have a good example of such installation package, I think. What we do have are the various hooks and scripts around venus-data-*.tgz. See the root access documents for pointers. How are your bash/shell skills? The approach I have in mind is:
What needs to happen on boot and having an sdcard/usb stick with that file on there is:
install script is (thus) executed on every boot, and it:
good to have there would be a notification to the user in case patching fails. To have some sort of auto updater, like the Setuphelper from @kwindrem has, is nice and user friendly - it can help to automatically overcome the problems that arise when we changes files in such way that the patch no longer applies. But on the other hand I’d think that suxh thing really is a step two. |
Reason to use rcS.local is to patch the files before the service is started up |
Hi @mpvader,
If I may suggest, why not having a service that abstracts the tty into tcp. And then any serial modbus connections could be done and scanned as if they were tcp modbus.
If I understand well, what you recommend would be to patch the code in dbus-modbus-client at boot time? Right? Personally, I would rather wait or spend some time to unify the modbus tty, perhaps leaving some more room to expand-ability.
They are good. ;-) |
Hi again!
dbus-modbus-client already works with both tty and tcp connections; what advantage do you see? We’re quite happy with how this service works. Some more additions are coming and someday perhaps moving to asyncio or similar. But: it works, and we have limited capacity, so not sure when that would be done.
exactly
It is available from stock per today.
what infrastructure?
good! |
Being able to do my own implementation of a tty based meter device without having to hack dbus-modbus-client. There is currently a race in the access to the tty devices by the multiple implementations, for example between dbus-modbus-client and dbus-cgwacs.
I cannot really consider this a proper solution. I would not like my system to depend on this. :-( |
More affordable meter devices usually are not capable to be identified through inspection of it modbus registers, due to lack of specific registers that identify the device, and for that reason are impossible to be supported.
Any solution implies that the user would somehow hand specify the device.
This pull request suggests a solution to this problem by introducing a more configurable meter device, in which the end user/installer can provide the missing information, such as the registers for the paths, etc.
Personally I would love to support this device through the GUI, however and so far I lack the proper knowledge to make such implementation.
The solution for configuration was in the form of a json file, also included in the last commit.
Looking forward for your comments and suggestions on how to properly add such functionality to the project.