Stevef1964 1) My inverter spaeaks to theGiv cloud to update it every few millseconds
Nope. Your app makes a local (wifi) call to the inverter using Givtcp (or something very similar). If it can't speak to the inverter over wifi, it'll fall back to "Away" where it pulls Cloud data every five minutes or so.
Stevef1964 2) A clash could be being caused by another device calling Givtcp? If so where can this clash occur, at the cloud end or my local end? Could it be another completely separate piece of kit I have locally, nothing to do with Giv Energy?
The clash, if it did occur would be at the inverter. The clash could be cloud calls and app calls being made at the same time or the app and your Home Assistant/RPi/whatever making calls before a previous one was completed. I don't know if the cloud actually calls for data (probably not) or, more likely, the inverter has an internal countdown which posts data every 5 minutes. Nevertheless, it's the inverter pushing data through the dongle (answering one call, or doing a routine post) while receiving an app call for update that would be the clash.
Stevef1964 3) When my inverter speaks to the Giv cloud does it do a "handshake" (my inverter "hi, it's me, is that you?" Giv cloud, "Yes it's me") If it doesn't get the handshake it won't send the info and so the inverter is waiting for a time.
I don't know but probably not. I presume that the Givenergy cloud is a Time Series Database which is scaled to accept thousands, or tens of thousands of data point posts every second. That means that when your inverter sends out it's data to the cloud, it just gets put in a queue until ingested by the database, probably within a few milliseconds of it being received.
Stevef1964 But how does this explain my inverter not giving me the updates locally via my dongle? Surely the local data output should not be affected as the data is sent at a separate interval to the Giv cloud?
The TCP bit of TCP/IP keeps track of packets going out and assembles them into the correct sequence when they reach their destination. The IP bit finds a route to the destination and different packets can be sent via different routes. If the route is unreliable or slow, it can take a while for the whole message to be sent and assembled at the destination. If another call is made before the first is completed, it won't interfere with the traffic already in hand but if the inverter hasn't completed dumping registers into TCP packets, it can bork the original call and both have to be started from scratch. For this reason, if there was only one device sending Givtcp calls to the inverter over a reliable network, and the inverter Modbus was working well, you could potentially get a 5 second refresh of data. However, anything not quite right on wifi or home router or internet could slow things down.
Stevef1964 Where does the dongle get its sync timing from?
If you check the timestamp on your inverter data, you should see it's mostly every five minutes, but sometimes, it can be a bit longer (few seconds to couple of minutes). Therefore my assumption is that the inverter has an internal 5 minute countdown and the timestamp is made by the database when the data is ingested. I doubt that the internal countdown is reset by the database when ingested as that would be unnecessary additional traffic that might get delayed.