Recalculating channel history with corrected CT type?

Ask questions about the GEM here.
Post Reply
sarain
Posts: 15
Joined: Thu Feb 22, 2018 12:54 am

Recalculating channel history with corrected CT type?

Post by sarain » Tue Oct 01, 2019 2:00 am

A while back, I discovered that I had accidentally misconfigured the CT type on two channels on my GEM. The CTs are Micro-100s but I accidentally left them as micro-40s when I initially set it up.

This GEM is connected to a Dashbox and the readings are stored in its database.

I fixed the issue a few months later when I realized that things weren't adding up but of course that doesn't change the data captured previously. That makes sense and I think I understand why it works that way but I would love to be able to go back and correct the history if possible.

Is there a handy formula for converting KW and/or KWhr values between various sets of CT parameters?

From what I've read about the CT parameters, they effectively describe how the raw signals are converted to current. I'm hoping those parameters have a fairly straightforward relationship with the final computed power and energy values.

It would be wonderful if there's a way to apply this change to the misconfigured data in the database even if I have to write a script to handle it. If that isn't realistic, being able to do it manually outside the database for select KWhr totals would still be very useful.

I'm getting a new HVAC system and want to compare my consumption between old and new. Part of this power was on those channels.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: Recalculating channel history with corrected CT type?

Post by ben » Tue Oct 01, 2019 10:24 am

sarain wrote:A while back, I discovered that I had accidentally misconfigured the CT type on two channels on my GEM. The CTs are Micro-100s but I accidentally left them as micro-40s when I initially set it up.

This GEM is connected to a Dashbox and the readings are stored in its database.

I fixed the issue a few months later when I realized that things weren't adding up but of course that doesn't change the data captured previously. That makes sense and I think I understand why it works that way but I would love to be able to go back and correct the history if possible.

Is there a handy formula for converting KW and/or KWhr values between various sets of CT parameters?

From what I've read about the CT parameters, they effectively describe how the raw signals are converted to current. I'm hoping those parameters have a fairly straightforward relationship with the final computed power and energy values.

It would be wonderful if there's a way to apply this change to the misconfigured data in the database even if I have to write a script to handle it. If that isn't realistic, being able to do it manually outside the database for select KWhr totals would still be very useful.

I'm getting a new HVAC system and want to compare my consumption between old and new. Part of this power was on those channels.
Micro-100s are pretty close, they difference is they have double the turns. If you double the value it should be pretty close.

CT range halves the value as you go up.

The difference between 211 and 212 for CT Type won't do much.
The difference between 3 and 4 for CT Range is the big one.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
sarain
Posts: 15
Joined: Thu Feb 22, 2018 12:54 am

Re: Recalculating channel history with corrected CT type?

Post by sarain » Wed Oct 02, 2019 10:16 pm

Thanks for your reply! That's certainly an easy enough conversion. If nothing else, at least I can manually recalculate the final daily KWhr readings that way.

Is there any reasonable way for me to write corrected values back into the database on the Dashbox? I'm fine with scripting something to do this if there's a usable interface for poking at things in the database.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: Recalculating channel history with corrected CT type?

Post by ben » Thu Oct 03, 2019 10:04 am

sarain wrote:Thanks for your reply! That's certainly an easy enough conversion. If nothing else, at least I can manually recalculate the final daily KWhr readings that way.

Is there any reasonable way for me to write corrected values back into the database on the Dashbox? I'm fine with scripting something to do this if there's a usable interface for poking at things in the database.
The dbbackup user only has SELECT and INSERT privileges on tables for backup/restore purposes. I'll email you over an update that'll allow it to UPDATE rows also.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
sarain
Posts: 15
Joined: Thu Feb 22, 2018 12:54 am

Re: Recalculating channel history with corrected CT type?

Post by sarain » Tue Nov 05, 2019 10:31 pm

Thank you for your help with this! :D

The data from the miss-configured channels are all straightened out now and I learned some useful skills for working with SQL databases in the process.
Post Reply