A Dart subsystem for energy consumption estimation and tracking of household appliances using Energy Star data. Energeist provides a simple interface to fetch appliance data from the Energy Star API and estimate energy usage based on appliance type, brand name, and model number.
- Query Energy Star API for appliance energy consumption data
- Support multiple appliance types
- Estimate energy usage from minimal inputs (appliance type, brand name, model number)
- Choose between median or mean aggregation strategies
- Normalized data model that standardizes various Energy Star dataset formats
- Handles multiple dataset IDs per appliance type
Add this to your package's pubspec.yaml file:
dependencies:
energeist:
git:
url: https://github.com/nvf-research/energeist.git
ref: v0.2.0dependencies:
energeist:
git:
url: https://github.com/nvf-research/energeist.git
ref: mainThen run:
dart pub getThe simplest way to use Energeist is with the Estimator class to get energy usage for an appliance:
import 'package:energeist/energeist.dart';
void main() async {
final estimator = Estimator();
// Use Case 1: Estimate for all refrigerators (defaults to median)
final estimatesForRefrigerators = await estimator.estimate(
type: ApplianceInfo.refrigerator,
);
// Use Case 2: Estimate for a specific brand
final estimatesForRefrigeratorsBrand = await estimator.estimate(
type: ApplianceInfo.refrigerator,
brandName: 'Lynx',
);
// Use Case 3: Estimate for a specific brand and model
final estimatesForRefrigeratorsBrandAndModel = await estimator.estimate(
type: ApplianceInfo.refrigerator,
brandName: 'Lynx',
modelNumber: 'LN24REFC*',
);
// Use Case 4: Use mean instead of median
final meanEstimate = await estimator.estimate(
type: ApplianceInfo.refrigerator,
brandName: 'Lynx',
modelNumber: 'LN24REFC*',
strategy: Strategy.mean,
);
}For more control, use the EnergyStarService to query the Energy Star API directly:
import 'package:energeist/energeist.dart';
void main() async {
final service = EnergyStarService();
// Search for all Lynx refrigerators
final results = await service.fetchAppliances(
datasetIds: ApplianceInfo.refrigerator.datasetIds,
brandName: 'Lynx',
);
for (final appliance in results) {
print('Brand: ${appliance.brandName}');
print('Model: ${appliance.modelNumber}');
print('Energy: ${appliance.annualEnergyUseKwhPerYear} kWh/year');
}
}Use the ApplianceInfo enum to specify appliance types:
ApplianceInfo.refrigerator
ApplianceInfo.freezer
ApplianceInfo.dishwasher
ApplianceInfo.clothWasher
ApplianceInfo.clothDryer
ApplianceInfo.waterHeater
ApplianceInfo.centralAc
ApplianceInfo.roomAc
ApplianceInfo.dehumidifier
ApplianceInfo.ceilingFan
ApplianceInfo.computerMonitor
ApplianceInfo.display
ApplianceInfo.electricCookingProductEach appliance type contains:
displayName: Human-readable, appliance namedatasetIds: Energy Star dataset IDs to queryenergyStarFieldNames: Expected field names in API responses
Estimates appliance energy consumption from minimal inputs.
Methods:
estimate({required ApplianceInfo type, String? brandName, String? modelNumber, Strategy strategy = Strategy.median}): Returns aggregated annual energy usage in kWh/year based on the chosen strategy (median or mean)
Service for interacting with the Energy Star API.
Methods:
fetchAppliances({required Set<String> datasetIds, String? brandName, String? modelNumber}): Returns a list of normalized appliance data fetched in parallel from the Energy Star datasets.
Normalized data model for Energy Star API responses.
Properties:
brandName: Brand name of the appliancemodelNumber: Model numberannualEnergyUseKwhPerYear: Annual energy consumptiondatasetId: Energy Star dataset IDapplianceType: Type of applianceadditionalFields: Raw API response data
Methods:
fromJson(Map<String, dynamic> json, [String? datasetId]): Converts raw Energy Star API responses into a standardized formattoJson(): Converts the normalized object back to JSON format
- Data Source: Energeist queries the Energy Star public API, which contains certified appliance data
- Normalization: Different Energy Star datasets use different field names. Energeist normalizes these into a consistent format
- Estimation: When estimating energy usage, Energeist:
- Queries the appropriate Energy Star dataset(s) for the appliance type
- Filters by brand and/or model if provided
- Calculates the median or mean energy consumption from all matching results (defaults to median)
- Returns 0.0 if no matches are found
Energeist supports two aggregation strategies:
- Strategy.median (default): Returns the middle value, less affected by outliers
- Strategy.mean: Returns the average value, useful for understanding typical consumption across all models