You have to change Graphana graph line configuration in order to look “continuous” and not pulse… as @j.assuncao has just explained
Your data seems good because with this configuration one count is equivalent to 120 w and for this reason you can see in your graph a lot of “0” values… and “120” because you are working at minimun of the scale.
You have to create (using templates) some function to “accumulate” data for days, month, etc… and also to reset this data hourly… monthly
I have ready access to a sonoff basic, do you have updated code for arduino idea, or does it only work with plat form io, I want to try this project with Sonoff, must just get a meter with a pulse output.
Hello, thank you for your script.
I have only not the good current usage. Can it be that it is calculated by how many pulses there are in 1 minute? That is not realy accurate maybe you can change it so it can be caluted by the times between the pulses?
Hi, thanks! Even if we count the time between two consecutive pulses we are not going ot have the good current usage: only in the precise moment when you get the pulse and do the calculation. Let’s remember this:
So, in summary, with this device we are not going to have an accurate current (or instantaneous) value of the consumed power. I prefer to do the calculations on a fixed time basis rather than on time-difference method because with the latter approach your measurement is not updated if there is no consumption (which will lead you to think that your appliance is ON while maybe it isn’t).