Energy Management - Live wholesale pricing

It would be great to include the Australian pricing forecast integrated into emoncms. Here in Australia we have live pricing based on each region and state. One energy retailer (Amber Energy) provides customers with wholesale pricing, the pricing for their customers is available via Ambers API, and is specific to that customers energy import/export meter.

They have a program called SmartShift, which automatically controls the charging and discharging of batteries, and automatic solar curtailment when the wholesale solar pricing goes negative, thus enables a zero export on the inverters and only then it provides enough energy for household consumption and charging of the batteries. their implementation is done via the inverter manufacturers own VPP, where Amber Smartshift sends commands to the VPP for charging, discharging and curtailment etc.

However, once each inverter and battery are enrolled in the Smartshift program, the customer side, we can no longer implement our own automations and we are then dependant on Amber to request changes, and wait weeks on end for a response. the idea is fantastic, but the implementation and integration is very much beta.

My own automations using local emoncms, I am able to then automate the curtailment, charging and discharging but I cannot find a good way to implement the wholesale pricing forecast, therefore I cannot determine the best time to charge 30kWh worth of batteries.

If emoncms was able to implement something like this, it would then be available via the local emoncms API and we could then charge and discharge based on the best time emoncms chooses to do so.

Would it be possible for emoncms to implement such a pricing forecast, where we can post the forecast information via the emoncms the pricing for the day, and it could determine the best time for charge/discharge? the API output would only need to be something simple like “charge now = 1” or something like that.

@glyn.hudson what are your thoughts on this? - Australia seems to be moving more and more towards changing energy use habits based on the current network demand, it would be great to have this in the all in one system, emoncms if possible

@TrystanLea created the ‘Agile’ App (for emoncms) that does just that for a supplier here in the UK (Octopus) who have a half hourly charging tariff. They publish the day ahead data. He may be able to amend it to do it for another supplier.

Your other route is HomeAssistant or Node-RED. There are several implementations/integrations that query this Half Hour tariff (search for Octopus Agile) and thus enable automations to fire/be fired.

Thanks Brian,

The agile add on is a great feature however it is significantly different than what I am suggesting.

I already have the live pricing, pulled from an api and posted into Emoncms for true pricing etc. however I am looking for a ‘smart’ addon, where for example, right now the price might be 50c/kWh feed in Tarif, however in a few hours it might reach $15/kwh, therefore don’t discharge 30kWh worth of battery storage now, instead wait until X time to discharge.

Then the feed in Tarif at midday might be -10c/kWh, therefore not only charge from excess PV but also charge from the grid at -10c so it can be sold at 60c or $1 or $20 at X time later on.

I can create a simple ‘dumb’ solution where it just discharges when pricing is above X and then charge when below X, however, the prices here in australia change every 5 minutes from the NEM, and as of Jan 23, our meters are reprogrammed to submit data every 5 minutes to match the true NEM pricing, instead of the end of 30minute settlement pricing.

Ok, so not really a task for emoncms.

Node-RED or HomeAssistant would be your best automation platform to develop it on (if it doesn’t already exist). Look for the various Agile implementations for ideas. This is what they do, just at 30minute resolution.

Live changing is not where we are at. Prices are always published in advance.

what? Emoncms already has the demand shaper to charge EV from excess PV. If my idea could be implemented, then the demand shaper would be complimented by being able to charge from extremely low or negative energy costs based on the best time to charge from a pricing forecast. it would be able to change from excess PV and then also charge at the best time from the grid. When prices are negative, it means the grid is under stress from too much energy, therefore by being able to know this and charge from the grid, it would remove that stress. this is going to be more and more popular as renewables (especially solar) are the main source of energy.

this obviously can be done externally, however it would be best to have an all in one system, hence I am requesting it here and why I am not asking the question of how to do it on some home assistant or node red forum.

currently, to get data into home assistant from emoncms, I have the following

Data from inverters post via API into emoncms > processed and published to MQTT > telegraf pulls the data and posts into influxdb > homeassistant then pulls the data from influxdb - this is not efficient, and again would be best to be included in the all in one system, adding onto the demand shaper within emoncms.

It could, but emoncms as an automation platform isn’t something that I think time should be spent on, when there are far better platforms out there. Demandshaper was created by @glyn.hudson IIRC at a time when there wasn’t really a good alternative. I disable it as it is a processor hog.

If you want to write it, feel free, but personally I think there are more pressing matters that need attention within the platform, especially as there are good tools out there to do this.

An all in one system doesn’t exist. emoncms itself is a collection of different systems. Use the right tool for the job. Just because you have a hammer, doesn’t mean it is the right too to fit screws (though it can).

Why? there is an Emoncms component for HA to pull it in directly. At worst, HA will pick up the MQTT feed.

All emoncms would need to do is process the pricing forcast and log it to a feed. i.e is now the best time to charge? result, no, so log to feed “0”. is now the best time to charge? yes, log to feed “1” - then, externally that value can be called via the emoncms API.

Emoncms is great for data processing, so why not incorporate pricing forecasts that can log to individual feeds of the result? that is the question. the question not how can I get emoncms do to my full automation, but how can we get emoncms to provide the number crunching so external services can do automation, given emoncms does great number crunching from inputs already. its just another input into emoncms, specific to determining the best charging times.

inputs needed for number crunching are, state of charge (EV or battery or combined both), what is the maximum charge rate per hour (might have 10kWh of storage, but can only charge at a maximum of 5kW) - what is the current consumption and what is the current Fit price and grid import price and what is the forecasted Fit & grid import price to determine the feed value output

I wrote this before I saw your later posts, so not greatly relevant - but posted here for others that may be in a similar situation.

And just to your point about using emoncms to get prices and log to feed, some time ago I was using Solcast to get PV forecasts up to 12 hours ahead. I used a simple python script to get the data then fed it into emoncms as a feed. I was going to use this to try and manage loads and charging etc, but gave up as the forecasts weren’t useful enough. The point though is it would be straightforward to get the tariffs into emoncms as a feed if you needed to…

I’m in Australia and use Amber Electric as a retailer. I have PV and 10 kWh battery and use Robin’s PV diverter to take excess PV to the hot water, which works brilliantly. But without intervention, on clear days in summer, both battery and hot water are fully charged by noon and excess gets exported.

This can be costly when the FiT goes negative!

My Selectronic inverter doesn’t allow direct adjustment of settings - rather it is a software platform where settings can be changed which are then uploaded to the inverter. There is however provision for 4 digital inputs which can be used to call up different profiles depending on conditions. I have just recently started using these to manage the export override when FiT goes negative.

I have a python script to pull down the 5 minute tariffs from Amber and Node-red to check the conditions, so if the tariff goes negative, the digital relay is triggered and a “no export” profile is activated. This shuts down export until FiT goes positive.

My inverter won’t talk to Amber and can’t be instructed to (directly) export as far as I can tell. But it can be controlled through these digital inputs to charge when prices are low (if necessary) and otherwise interact with other sensors (eg hot water heater).

One of the advantages of using your own control system is you can intervene when you have more information than just price - such as local weather anomolies, upcoming extra loads, whether to divert excess to HWS or precooling with air con etc.

Admittedly it’s not as convenient or simple as a retail offering but it is achievable with Node-red, and can work with systems that don’t allow third party control.

that is a great work around!

I use emoncms to pull and post data, then my python services get this information via the emoncms API.

currently, if the pricing is negative it sends the command via tcpmodbus to change the site_export_limit register to “0” on all three solaredge inverters (each inverter is configured as its own leader, because the solaredge backup interface only supports x1 unit at the moment and not x3)

this is great enough for a very simple execute commands right this very instance, however the issue is processing the Amber forecast data to hold off on charging from the grid until a better time. i.e don’t charge right now, because in 4hours from now at 1pm (example) the import Tarif is negative, so charge at 1pm and get paid to charge the batteries (or vice versa when the feed in tariff is negative etc.)

I already have this implemented, and based off a ‘dumb’ set value, i.e if above $1, discharge battery, if below 10c, charge battery. but it’s not very smart. I am about to go down the route of doing this myself as another python service to make the system “smart”, since there isn’t any other option at the moment.

while only me gets the benefit of this, if it is already incorporated into an existing, much larger ecosystem, then many others would be able to benefit too and ultimately helping the grid and local community.

I will publish my python service when or if I complete it as desired, but it wouldn’t be as user friendly as emoncms currently is, unless those who wish to implement the same as I have, they would require some basic python understanding.