Charmed Quark Systems
Google
WWW CharmedQuark.com

Go Back   Charmed Quark Systems > General Discussion > Beta Driver Development
Register FAQ Members List Calendar Mark Forums Read

Beta Driver Development Discussion of new drivers, finding someone to write a new driver, etc...

Reply
 
Thread Tools Display Modes
  #1  
Old 08-23-2008, 04:11 PM
beelzerob beelzerob is offline
 
Join Date: Mar 2006
Location: Central PA
Posts: 4,662
Default Brultech ECM-1220.H Driver Development

This thread is for development of a driver for the Brultech ECM-1220 and 1220H home power monitoring system. If you own the device, please feel free to install this driver pack and provide input on any errors encountered.

*NOTE*: To use this beta version driver, you must be updated to CQC version 2.4.20 or later.

The current driver supports the following fields (all read only):
  • Channel 1 Current (amps)
  • Channel 2 Current (amps)
  • Total Current (amps)
  • Total Current (amps) (Averaged over 5 sec)
  • Voltage (volts)
  • Channel 1 Watts
  • Channel 2 Watts
  • Watts Total
  • Watts Total (Averaged over 5 sec)
  • Channel 1 kWattHours consumed since reset
  • Channel 2 kWattHours consumed since reset
  • Total kWattHours consumed since reset
  • kWh_Costs_Day
  • kWh_Costs_Day_Projected
  • kWh_Costs_Hour
  • kWh_Costs_Hour_Projected
  • kWh_Costs_Last_Day
  • kWh_Costs_Last_Hour
  • kWh_Costs_BillingPeriod
  • kWh_Costs_BillingPeriodProjected
  • kWh_Last_Hour
  • kWh_Used_Current_Hour
  • kWh_Used_Current_Day
  • kWh_Used_Current_Billing_Period
  • CurrentRatePeriod
  • CurrentRate
The following rate structures are planned for support:

1) Straight rate per kWH (currently supported).
2) Tiered rate based on kWH usage. (currently supported).
3) Special peak rate
4) Time of day and day of week rates. (in work)

To use the cost calculations, you must create a config-type file and place it in the following directory (on the PC this driver is installed on):

\CQC\CQCData\MacroFileRoot\Drivers\Brultech

The file must be named rate_info.txt and the info put into it depends on the rate structure you have.

NOTE: Everything below is subject to change as the code matures and better formats for the config file are determined. Your patience is appeciated.

The file must have this basic structure (?? represents user selected values):
Code:
BillingDate=9 RateType=??(Straight, TimeOfUse or Tiered) StartRates RateName=?? ???????? (See examples) EndRate EndRates END

Examples are included in the rate_info_examples.zip file attached to this post. REMEMBER, the file in your directory must be named rate_info.txt.

When specifying months or days in a TimeOfUse rate, be sure and use the full month or weekday name ("January", "Saturday"), and not the abbreviated name. Capitalization is not important.



Logging to a file
If you write True to the LogData field, then a log file will be created in the same directory as the rate config file. The file name will be of the form:

datalog_[Month][Day]_[Hours]_[Min].csv

The driver will then log data into the file every minute. The data is one entry per line, and each entry contains several values separated by commas. This should make importing (and thus graphing) in Excel or OpenOffice Calc very easy.

The driver will continue to log until you write False to the LogData field, or remove the driver.

Each line in the file will contain the following fields (separated by commas):
Date/Time
TotalKwh (since last reset)
TotalWatts
TotalAmps
Costs_LastHour
Costs_Hour
Costs_HourProj
Costs_LastDay
Costs_Day
Costs_DayProj

Note: If you write True to the LogStoredData field instead of the LogData field, then the driver will go offline, and read the stored data from the device and log it to the file, before coming back online, and data will continue to be stored from that point on. So, if you want to capture in a file all of the data stored in the device, that is the way to do it.

Unit Configuration
In order to be able to use the data stored in the device, you must do the following (only once):

1) Using the unit menu, set a new interval of not less than 5 (minutes), and not more than 60.
2) After setting that, you must use the menu to reset the device. When you reset it is very important...you must reset it on the interval you chose. For instance, if you chose 5 minutes for an interval, then you will need to reset the device at :00, :05, :10...:45, :50, or :55. So, when the interval evenly divides into the minutes. This has to be done to synch the device logging to your wall clock, as there is no internal clock in the device. As another example, if you set the interval to 15, then you need to reset the device at :00, :15, :30 or :45 during the hour.
Attached Files
File Type: cqcdrvpack Brultech_ECM1220_dev_v.2.7.CQCDrvPack (21.4 KB, 10 views)
File Type: zip rate_info_examples.zip (800 Bytes, 6 views)

Last edited by beelzerob : 01-28-2009 at 05:43 PM.
Reply With Quote
  #2  
Old 09-10-2008, 06:31 AM
beelzerob beelzerob is offline
 
Join Date: Mar 2006
Location: Central PA
Posts: 4,662
Default

Ok, I had the hardware installed this morning, and I've already played with the interface some, so I'd hope for a rough draft on this driver before this weekend.
Reply With Quote
  #3  
Old 09-10-2008, 08:22 AM
anogee anogee is offline
 
Join Date: Aug 2008
Location: Scottsdale, AZ
Posts: 850
Default

Just wondering, are you just pulling the wires out of the wall on the other side of your breaker box, and your installing the unit there? Or are you planning to extend the wires with CAT-5 and place it some place else?

My breaker box is outside my garage, so I could install the unit inside my garage, but I'm not sure how really useful that would be.
Reply With Quote
  #4  
Old 09-10-2008, 08:58 AM
beelzerob beelzerob is offline
 
Join Date: Mar 2006
Location: Central PA
Posts: 4,662
Default

Well, from the beginning I've pretty much planned to view the data via CQC, not the box on the wall. Or otherwise, to have something (again probably cqc) to download the logged data so I can view it in a friendlier format. So my plan was to simply keep the unit near the panel. My panel is in the basement in my HA wiring room, so it'll be in the perfect place as far as connecting to a PC to read it.
Reply With Quote
  #5  
Old 09-11-2008, 08:24 AM
beelzerob beelzerob is offline
 
Join Date: Mar 2006
Location: Central PA
Posts: 4,662
Default

Well, I got it up and running last night. I was watching the amps reading and then revving my power drill, and it DOES respond fast. Essentially instantly. Pretty neat.

I got started into the driver but fell asleep before it could actually read data....but by tonight I should be reading the 1Hz rate data stream, so that'll be power and volts for both channels.

There is no cost data being sent by the unit, only power. So any $$$ values will have to be calculated on my side of the driver. Not a problem really, but I know there are myriad of means that power companies calculate the rate by. I know IVB has a tiered rate, and I believe mine is simple/flat, and there's also time-of-day rates.

Could some of you who are waiting for this driver please give me the basics of your power rate structure? I believe we're going to have to go with the config file approach to this, since i don't think the .manifest prompting will be robust enough to handle all the possibilities.

All in all so far, I'm quite pleased with this system.
Reply With Quote
  #6  
Old 09-11-2008, 10:13 AM
anogee anogee is offline
 
Join Date: Aug 2008
Location: Scottsdale, AZ
Posts: 850
Default

Mine is a bit complex, but if you can do this one, you can probably can do any.

O.K. I have Summer and Winter Rates. Each are calculated the same, but the costs are different.

Within that, I have one rate (peak) which is in effect 12:00pm noon - 7pm Weekdays and another rate (off peak) all the other times.
O.K. are you with me so far? Now, for the kicker. In addition, my meter records the highest KWH usage for any one hour during the 12:00pm noon - 7pm weekdays and I pay a charge for that. Plus, like most people, I pay a tax on all of it, and I pay a monthly fixed service charge.

Although my rates are quite low, the peak usage charge is about $11/KWH peak which adds a good chunk to the bill. So my goal is to keep that peak as low as possible from noon - 7pm weekdays.

So I have winter and summer, peak and on-peak rates, and a peak charge for the highest usage during the peak time period.

So for me, its not about the usage, its about the peak demand. If my wife runs the dryer just one hour during our peak time, it could add $80 to our bill.

Last edited by anogee : 09-11-2008 at 10:15 AM.
Reply With Quote
  #7  
Old 09-11-2008, 10:58 AM
klindy klindy is offline
 
Join Date: Mar 2006
Location: Denton, Texas
Posts: 1,316
Default

Quote:
Originally Posted by beelzerob
Could some of you who are waiting for this driver please give me the basics of your power rate structure? I believe we're going to have to go with the config file approach to this, since i don't think the .manifest prompting will be robust enough to handle all the possibilities.

This thread has a really good cross section of various rates, tier structures and billing details. Might be a good place to start if you're going to attempt to cover them all.
__________________
Keith
Reply With Quote
  #8  
Old 11-09-2008, 04:29 AM
Target Target is offline
 
Join Date: Sep 2007
Location: Boston
Posts: 646
Default

Howdy,

Absolutely loving this device. I have a quick question. Which field reads out total power consumed and/or total cost accumulated for the current billing period? Looking at the numbers from all of the active fields, none of them seem to be correct.

Thanks,

Target
Reply With Quote
  #9  
Old 11-09-2008, 06:04 AM
beelzerob beelzerob is offline
 
Join Date: Mar 2006
Location: Central PA
Posts: 4,662
Default

Well, CurrentBillingPeriod should be just that. However, also look at the BillingStartDate field, as it will only go back as far as the data in the device allows, which may not match up with your actual start date. And I assume you set the interval to something over 5 min and reset it on the interval?

That being said, I just recently reinstalled mine on a new PC, and I'm not pleased with the numbers I'm seeing either, so I think some more detective work will be necessary on my part.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:27 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.