Frequency output incorrect


#1

I have finally got around to setting up my IotaWatt. Since I want to log to InfluxDB I figured using the alpha channel software would be best, I don’t mind the risk of things going wrong.

After setting up 4 CT inputs and playing around with outputs I think I may have stumbled across a bug with the frequency output. For my ‘grid’ connection the frequency output is reported way too high, in the range 550-800. This only applies to the output configured, the stats section of the status page shows the correct 50.0 Hz.


#2

Hi Phil,

This is one of those gray areas that easier to explain than police in the software. You are asking for the frequency of a power channel. IoTaWatt maintains two data points for each channel:

For voltage channels it maintains the cumulative volthours and Hzhours.
For power channels it maintains the cumulative watthours and VAhours.

If you ask for Hz from a power channel, you get VA and visa versa.
The way the “calculator” script system works, you can include whatever values you want in an output, and operate on them as you please. It’s up to you to decide if what you get back is meaningful. The code to strongly type these values and do conversions would be enormous and complicated, moreover, 99% of users don’t need it.

So if you want to know the grid frequency, ask for the Hz of the voltage channel. That’s the channel that will be sampled along with the Grid CT to give you Grid power. The secondary data field of the voltage will have the frequency, and the secondary data field of the power channel has the VA (which is used to get PF and amps, there is some typing going on).

Hope that helps.


#3

Thanks @overeasy for the clarification. Changing to the voltage channel fixed the issue nicely. Guess I should RTFM a bit more.


#4

Errr, the manual is a little behind on that. I need to WTFM. I did look at the code and I can type that to refer to the associated voltage channel. Look for that down the road.