I started MODBHub as a small personal project to make direct Modbus TCP integration with Hubitat a little easier and more generic.
A bit of background first: I am not a Groovy developer. I do have a general understanding of programming, going back quite a few years and covering things such as C, C++, HTML, PHP, JavaScript, Node-RED, and various other technologies. I also know PLCs and Modbus reasonably well. I develop my own PLC applications and regularly make PLCs communicate with each other and with Node-RED and other systems.
For this project, however, I deliberately took a different approach.
I did not write, edit, or even verify a single line of the Groovy code myself. The coding mission was assigned entirely to ChatGPT. My role has essentially been that of project manager, system designer and beta tester: defining what the application should do, specifying the expected Modbus behaviour, building test configurations on real PLCs, deliberately trying to break things, reporting the results, challenging questionable behaviour, and deciding what should — or should not — be added.
This has been a very iterative process: define a small requirement, generate the code, test it against real hardware, find problems, understand why they occur, correct them, and test again.
The objective is definitely not to build a huge Modbus “gas factory.” Quite the opposite.
I wanted a small and friendly tool that allows Hubitat to communicate directly with Modbus TCP devices without requiring Node-RED, MQTT, custom HTML interfaces or another intermediate system. I also wanted it to be as generic as reasonably possible, rather than creating another driver dedicated to one specific Modbus device.
MODBHub currently reflects that philosophy: describe the PLC/device and its points, let the application handle the Modbus details, and expose useful values and commands to Hubitat.
My test environment includes several PLCs and Modbus devices, but obviously that represents only a tiny fraction of what exists in the real world. This is therefore where the Community Release becomes interesting.
I would very much appreciate people testing MODBHub with different PLCs, controllers and Modbus TCP devices, and reporting what works, what doesn't, and what could be improved.
Comments are equally welcome about the overall philosophy and architecture and about the AI-generated Groovy code itself. If experienced Hubitat/Groovy developers see something questionable, unnecessarily complicated, inefficient, or simply wrong, please say so. That is part of the purpose of publishing it here.
One important caveat: this is a personal project and I do not have a huge amount of free time, so I cannot promise active or immediate support. I will nevertheless do my best to answer questions, investigate useful bug reports, and incorporate improvements when they make sense.
Most importantly: **test it, challenge it, break it, and tell me what you find.
**
Before I go any further with setting up a proper distribution method for MODBHub (GitHub or otherwise), I would first like to see whether there is actually some interest in this project.
If you would like to test MODBHub, please send me a PM. I will be happy to provide the current Community Release package and installation documentation.
If enough people are interested, I will then look at setting up a more convenient public distribution method.

