I converted my home to zero-emissions. This included solar panels, with a battery and inverter amongst other things. My energy retailer offers a variable feed-in tariff which is based on the wholesale National Electricity Market (NEM) rate. This means the feed in tariff is sometimes negative, and other times positive. This means that at times, there is a charge for exporting energy, and also there are times when *importing* energy could earn money. For the operator of a battery connected to the NEM, choosing when to charge the battery and when to discharge the battery is a complex question. This presents an automation challenge, which has been studied at length by economists. For consumers, the retailer may provide an app to manage the inverter via the vendors cloud. But I soon discovered that this is less than optimal for several reasons. Fortunately, the energy retailer provides a customer REST api to monitor NEM market including futures, the inverter can be managed via a local network, and Im a software developer. So I set up a home assistant instance, and have been working on software to manage the inverter to optimise integration and allow me to maximise my return on investment without having to look at the app 24x7.