Inconsistent Readings From Sensor (HS110)

First, a little bit of background:
I’m happy that we have some rain in California, but that - of course - brings another set of issues.
I have French Drain under the house and a sump pump takes care of taking the water out. It turns on when necessary, and sits idle when it’s dry.

In order to make sure that the pump doesn’t just die on me while I’m not watching, I’ve hooked it up through a TPLink HS110 switch that I purely use as a sensor to detect if and when the sump pump turns itself on. When the pump starts (Wattage reading on the meter is >100W) I have set up an automation that sends me a notification via Pushbullet notification telling me that the pump just turned on. So far, so good.

Now to the inconsistency:
I have two instances of HASS running, a ‘live’ setup on an RPi3 and a ‘test / development installation’ on another RPi3. They are both connected to the same switch / sensor.
In theory, the sensors should record the same events, right?
In practice, they dont’t.

This is the graph from the test setup:

And this is the graph from the live instance:

Any idea what the reason for this inconsistency could be?

Couldn’t it be a simple graphing anomaly? I have the feeling that sometimes values fall off a chart due to a threshold or something.

The strange thing is that one isn’t a full subset of the other - each instance has entries that the other one doesn’t have.
And - even stranger - test setup, which has a faster SD card and less CPU load records fewer events that he production environment.

And if it’s a graphing anomaly, wouldn’t the graphs change when I reload the history?
But they don’t. So my conclusion was it a recording, not a display issue - I’d comparing the entries in my MYSQL databases for this if only I knew how.

Are you sure you are running mysql? Out of the box homeassistant comes with a sqlite database.
If you use mysql then you can install phpmyadmin to export all readings (https://pimylifeup.com/raspberry-pi-mysql-phpmyadmin/)
If you run sqlite than you can use dB browser for sqlite (https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/)

Yes, I am runnng MYSQL.
I set it up when sqlite started running very slowly - not that it makes any difference for met, though.

Thanks for the URLs wil try this later today.l

Thanks @fversteegen,

downloaded phpmyadmin as you suggested and exported all the readings into a csv.

After looking at some pivot tables in Excel I came to the conclusion that it actually is a recording, not a graphing problem.

Looks like readings are taken every 31 seconds when possible (in 55% of the cases, sometimes the readings are 62s, 93s, 124s, 155s apart). And given that the pump only runs for approx 15-25 seconds I can now see why these values sometimes make it into the database of one instance but not the other :-S.

Still, I can see that the pump keeps running - which was the reason why I originally set this up.

Bu I now also know that I should not rely on this kind of device in case I want to exactly measure power usage, especially if the amps drawn will vary, because of the way that readings are carried out.

-chairstacker