Lack of accuracy for data returned by API for GivEnergy Smart Plugs

2 comments started 2023-10-01 last 2023-10-02
GivEnergy ProductsSmart Plugs
#1 Icarus

I've been puzzling over the data I observe via the API comparing with a seperate energy monitor, which I am trying to correlate.

The following test is easily reproducable.

I have an electric fan which has been adjusted to consume 18 watts at a specific speed setting.

The fan is switched on at 7am for exactly a minute.
Then a pause of exactly a minute.
This is repeated as accurately as possible so that there are 4 times the fan is on.

I have some code that summarises the datapoints returned by the API for a given timespan.
What I expect to see (give or take a couple of seconds at most) is something like this:

Device <PlugE>
From <2023-10-01T06:00Z> to <2023-10-01T07:07:00+01:00>
2023-10-01T06:00:00Z       18.0 watts for    60 seconds      1080.00 watt-seconds (     1080.00 accumulated)
2023-10-01T06:01:00Z        0.0 watts for    60 seconds         0.00 watt-seconds (     1080.00 accumulated)
2023-10-01T06:02:00Z       18.0 watts for    60 seconds      1080.00 watt-seconds (     2160.00 accumulated)
2023-10-01T06:03:00Z        0.0 watts for    60 seconds         0.00 watt-seconds (     2160.00 accumulated)
2023-10-01T06:04:00Z       18.0 watts for    60 seconds      1080.00 watt-seconds (     3240.00 accumulated)
2023-10-01T06:05:00Z        0.0 watts for    60 seconds         0.00 watt-seconds (     3240.00 accumulated)
2023-10-01T06:06:00Z       18.0 watts for    60 seconds      1080.00 watt-seconds (     4320.00 accumulated)

Thus 18 watts consumption for 4 minutes

However I observe from the API has very dubious timing accuracy:

Device <PlugE>
From <2023-10-01T06:00Z> to <2023-10-01T07:07:00+01:00>
2023-10-01T06:00:33Z       18.1 watts for    29 seconds       524.90 watt-seconds (      524.90 accumulated)
2023-10-01T06:01:02Z        0.0 watts for    89 seconds         0.00 watt-seconds (      524.90 accumulated)
2023-10-01T06:02:31Z       18.0 watts for    33 seconds       594.00 watt-seconds (     1118.90 accumulated)
2023-10-01T06:03:04Z        0.0 watts for    88 seconds         0.00 watt-seconds (     1118.90 accumulated)
2023-10-01T06:04:32Z       18.1 watts for    31 seconds       561.10 watt-seconds (     1680.00 accumulated)
2023-10-01T06:05:03Z        0.0 watts for    91 seconds         0.00 watt-seconds (     1680.00 accumulated)
2023-10-01T06:06:34Z       17.9 watts for    27 seconds       483.30 watt-seconds (     2163.30 accumulated)

I'm happy enough the wattage reading is fine, but the accumulated consumption calculation is way off because the observed timestamps are nothing like 60 seconds apart. If anyone is interested and perhaps can shed some light, the raw data is as follows:

{
    "data": [
        {
            "time": "2023-10-01T06:07:01Z",
            "power": 0
        },
        {
            "time": "2023-10-01T06:06:34Z",
            "power": 17.9
        },
        {
            "time": "2023-10-01T06:05:03Z",
            "power": 0
        },
        {
            "time": "2023-10-01T06:04:32Z",
            "power": 18.1
        },
        {
            "time": "2023-10-01T06:03:04Z",
            "power": 0
        },
        {
            "time": "2023-10-01T06:02:31Z",
            "power": 18
        },
        {
            "time": "2023-10-01T06:01:02Z",
            "power": 0
        },
        {
            "time": "2023-10-01T06:00:33Z",
            "power": 18.1
        },
        {
            "time": "2023-10-01T05:59:06Z",
            "power": 0
        },

 etc...

Thoughts anyone?

#2 Icarus

Just as an update, to add proof to the pudding so to speak, I had a look what the GE App was showing for the 4 minutes consumption of 18 watts:

As you can see it is recording 9 Wh whereas it is actually 4320 watt-seconds (which I make out to be 1.2 Whr or 0.0012 kWhr).
The calculation the app has done based on the faulty data is 7.2 X higher than the energy used in practice.
On the basis of the results I am seeing I cannot possibly trust the readings and do hope that a software/firmware fix will be in the pipeline.