Hello,
I’m posting today to let everyone know that I’ve open-sourced my modbus proxy I made for use between the ET112 and a CerboGX. This is a specialised fork of another modbus gateway I found on Github.
The hardware required to make this work is an ESP32, and a pair of RS485-TTL adaptors. The ESP32 polls the ET112 for its important register values, caches them, and makes them available on a second RS485 network.
From the perspective of the CerboGX, the proxy looks like the ET112. This is not a pass-through proxy, so you can’t just query any register. You can only request registers that are being proactively cached. The set of registers it polls are those that the CerboGX cares about. You can edit the source code if you want extra registers. I did attempt to make a reactive pass-through proxy, but I had some timing issues. This might not be insurmountable, but I abandoned the effort when I saw that polling and caching worked.
You can use this device to alter the bps rate of the ET112. I am using mine at 38400bps. The CerboGX continues to operate at 9600bps on its own RS485 network, as I am not aware of the CerboGX being capable of higher speeds.
In addition to being a semi-transparent RTU proxy, it also acts as a Modbus TCP server. It offers the very same registers over TCP that it exposes on RTU.
If you get a second ESP32, and another RS485-TTL module, you can set-up a second unit to act as an Modbus RTU to Modbus TCP gateway.
This means that you can connect a second CerboGX (a client) to that ESP32, and have it share access to the single ET112.
This does not mean that you can have two independent MultiPlus-II load-balance based purely on these device. I have managed to do this, but that was a separate project.
If you use the right ESP32 module with an OLED display, you can see the main power fluctuate in real-time.
Feedback would be great. I can’t promise to be very responsive here, as I am very busy with work, but I will check in now and then. You can view the project here:
John