![]() |
|
|||||||
| Beta Driver Development Discussion of new drivers, finding someone to write a new driver, etc... |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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):
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:
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. Last edited by beelzerob : 01-28-2009 at 05:43 PM. |
| Thread Tools | |
| Display Modes | |
|
|