Your electrical engineering knowledge may be rusty, John, but it's probably better than mine. I trained as civil engineer so mine is basic high school physics - V=IR and Power =VI for direct current. It wasn't until I looked into why my plugin power meter was apparently recording ridiculously high power drain on a microwave oven that I found out about AC phase angle and power factor. I'm not an IT expert either!
I am not aware of any CT clamps on my system, except non-related ones for my Owl Intuition solar monitoring and an old British Gas remote monitor. I thought that CT clamps measured apparent current, but since most house appliances are electric motors and heating elements with a power factor of unity they normally read fairly accurately. It's things like switched mode power supplies, that we think the Powerwall uses, that mess things up. Interestingly, my British Gas remote meter with CT clamp on the meter tail reads about 400W when the Powerwall is supplying all the house demand and the Smart Meter display is reading about 80W , so presumably the difference is related to the power factor. I presume that the Gateway employes some more sophisticated internal monitoring system, like the Smart Meter. If I type
https://x.x.x.x/api/meters/aggregates (where x.x.x.x = IP address of gateway) into my browser I get the instant gateway output as raw data, which includes instant_power, instant_reactive_power and instant_apparent_power, so presumably it's capable of determining the true power consumption which, I understand, is termed 'active power'.
I'm not quite sure what you mean between 'difference between day and night readings'. My powerwall is generally providing all my house demand during the day, so the meter should record nearly zero demand, like the 0.1-0.2kWh the Powerwall is showing on the app, instead of the 1.3-1.5kWh it's actually recording. At night I will obviously be drawing a large demand from the grid to recharge the powerwall and run the house demand.
But quite why my night and total readings are higher than the Tesla app readings is a mystery to me. I would have thought it should be the other way round, like your total readings.The figures I gave yesterday for 3 days readings seem to indicate that overall I actually used (metered) ~5kWh more than the Powerwall App recorded. That suggests that my smart meter meter is logging a lower total demand than I'm actually using, so in that sense I'm ahead. The problem is that most of the 5kWh is at a very cheap price, but where it's apparently over-reading, during the day, I'm paying through the nose at a very expensive rate. If those figures are approximately correct, it may be a case of swings and roundabouts. Calculating the plus and minus costs and extrapolating my 3 days to a year it only works out at an additional cost of about £23 rather than the £150+ that the Peak over-read is costing, so perhaps I shouldn't complain.
Have I made an error somewhere? I'll check my calculations. Well, wiggly amps were never my best subject!