Visualise your Amber Electric electricity consumption using this flutter dashboard. It's available on web, Android, and iOS/iPhone. It can be built and packaged for Linux and Windows also if anybody requires that, but I'd need to automate the relevant store uploads.
You can make suggestions regarding this app here. You can make suggestions to the Amber Electric company here.
Feel free to buy Brad a coffee if you thought this dashboard was useful to you. Feedback welcome also.
Amber Electric is an innovative energy retailer in Australia which gives customers access to the wholesale energy price as determined by the National Energy Market.
This gives customers the opportunity to reduce their bills and their reliance on fossil fuels by shifting their biggest energy usage to times of the day when energy is cheaper and greener.
Amber gives customers access to a LOT of their own data through their public Application Programming Interface or API.
This tool relies on you having access to Amber's API, which means you need to be an Amber customer, and you need to get an API token. But that's pretty easy. Start here.
Amber has started to support 5 minute billing periods now for some customers. The app should be able to automatically detect and support all users regardless of whether they are on 30 minute or 5 minute billing periods.
Regardless of the billing period, the dashboard charts are drawn as fixed
half-hour bars (2 bars per hour, 48 bars per day). For a site on a 5 minute
billing period, its six 5-minute intervals are aggregated into each half-hour
bar: usage (kWh) and cost ($) are summed (so one bar shows the total of
6 x 5-minute values), while prices on the Forecast tab are averaged
(price is a rate, not a total, so summing would overstate it). 30 minute
sites contribute one interval per bar. Each record is bucketed on its own
timestamp/channel, so interleaved multi-channel API responses land in the
correct bar. This aggregation is implemented in
DataAggregator.aggregateData in lib/bar_chart.dart.
Timestamps from the Amber API are DST-blind for NSW: they are always interpreted as AEST (+10), never AEDT (+11) during daylight saving, so the half-hour buckets stay fixed at 48 bars/day even across DST transitions.
Amber Electric Dashboard is not affiliated with Amber Electric other than we are a customer of their electricity services. The name Amber Electric is their trademark.
This is a standard Flutter project.
- Install dependencies:
flutter pub get - Run the tests:
flutter test(aggregation logic, including 30 and 5 minute scenarios, is covered intest/bar_chart_test.dart) - Static analysis:
flutter analyze
The chart aggregation lives in lib/bar_chart.dart (DataAggregator) and the
screens are assembled in lib/main.dart. The Usage data model is in
lib/model/Usage.dart.
There is no local deploy script. Builds and releases are automated with
Codemagic. Pushing to the master
branch triggers the Codemagic pipeline, which builds and publishes the web,
Android and iOS versions.
The version is defined in pubspec.yaml as version: x.y.z+build
(e.g. 0.5.2+41). Minor version bumps and a sequentially increasing build
number follow the existing commit history convention.
While all attempts are made to ensure Amber Electric Dashboard is accurate, no guarantees are made regarding its accuracy or correctness.
Amber Electric Dashboard code is shared under licence.
