KevinB The inverter allows multiple concurrent connections, and a feature of the GE implementation is that when any one client makes a request, they all receive the reply. This means it's possible to capture all the replies by simply making a connection and listening, while using other tools to actually send requests. This can be GivTCP, https://givenergymonitor.wixsite.com/tutorials, the iOS (bbc basic) app, the standard app, or even the portal, to a limited extent.
- ah - I see you're already a predbat user, so that should be covered.
If you use linux, you can make a connection using the socat tool - also available for mac/windows ? https://github.com/3ndG4me/socat/releases
eg socat -x -u TCP:host:8899 CREATE:binfile where 'host' is the ip address of your inverter. This makes a tcp connection to port 8899, and simply writes everything it receives into a file called 'binfile'. (-x means hex-dump to screen, -u means uni-directional LHS to RHS only.) This will only remain connected for a few minutes - the inverter sends out 'heartbeat' requests every so often, and if you don't respond, it will close the connection.
Another way to do it is man-in-the-middle: socat -x -r binfile TCP-LISTEN:8899 TCP:host:8899. This will set up a listening socket on the computer's 8899 port, and when a connection comes it, it will make an outgoing connection to the inverter, and forward all traffic bi-directionally. Here, -r binfile tells it to record all the data from LHS to RHS to the binfile. Then you can tell the official app, or any of the third-party ones, to connect to your computer rather than the real inverter. Because the client should respond to heartbeat requests, this should stay connected indefinitely. Not that I particularly need a lot of traffic - just need to be connected for long enough for whatever tool you're using to explore the various registers.
Either way, I then have a tool which can replay the file through the library, parsing the messages and extracting register values, which I can then dump to create a register file for the server emulator I'm fiddling with. (Just about have that working.)
In principle, it should be possible to use a snooping tool like wireshark and capture the traffic without making a connection to the inverter at all. That's something I could explore if anyone really doesn't want to make an active connection.
If you're actually interested in getting into modbus in more detail, you can use the python client library to explore more actively. But it's a bit catch-22 - until we get support for AIO, it's not so easy to use the tool for that purpose.
There are several versions of the library around - I think there's one in the GivTCP tree which has better support for the more exotic systems - britkat1980 has better access to the givenergy internals. Perhaps here: https://github.com/britkat1980/giv_tcp/tree/dev3/GivTCP/givenergy_modbus_async - you can see in the 'model' subdirectory the different families of devices, and it's these that I'd like to have some way to test, in the absense of actual hardware.
My clean tree is at https://github.com/divenal/givenergy-modbus-async/tree/clean6 (currently awaiting integration into hoggy's master tree), and it's a little behind that one. We will get them to converge eventually, but a simplification I made to one of the other files (to avoid duplication of register definitions) needs a bit of revision to be able to target these different system types. So detecting the system type is the next bit I want to work on.