I would like to use the api that Octopus energy provide for their Agile tariff (which is a time of use rate) to control smart plugs with Hubitat to operate a device during lowest cost periods at night. The api gives a look ahead to the price for each half hour over the next 24 hours, which is published at 16:00 UTC every day.
I plan to use this to charge any household battery devices (typically, personal handheld devices, laptop PCs, vacuum cleaners, and my ebike) when the cost of electricity is at its lowest.
Since it won't be possible to measure the charge state of the batteries to set a charging duration, I plan to use the api to identify the cheapest of a given number of night time half hours to switch the smart plug on for.
With smaller household devices this might only be a coupe of hours. For the ebike battery this is likely to be nearer to six hours (and therefore would target the cheapest twelve half hours). A separate smart plug could be used for each overall charge duration, to ensure a tight focus on the cheapest periods.
In each case the devices own BMS (battery management system) should stop drawing charge when the battery reaches the target charge level, which will usually be 100%, but in the case of my ebike charger can be set to 80, 90, or 100%.
I have read about the use of api's with Hubitat, but so far have not come across any mention of their use for home energy management (which in this particular case is termed "load shifting").
Can anyone help?
PS I'm a comparative newbie with Hubitat, so please don't assume a high degree of experience with home automation, or api's.