milloin.xyz

Developer docs

Presets

Ready-made loads: ask when to run one with a single URL.

PresetLoadKind
laundryA washing machine program: 2 hours, 1.5 kWhContinuous
saunaHeating an electric sauna: about an hour to warm up and two hours of bathing, 8 kWhContinuous
ev-chargingCharging an electric vehicle: 44 kWh at 11 kWPausable

A continuous load runs from start to end without a break, and the answer is up to three runs that do not overlap, cheapest first. A pausable load can stop and go on later, and the answer is the single cheapest plan, in one or more blocks. GET /v1/electricity/plans/presets lists the presets with their parameters.

Example: the washing machine

Request

curl "https://milloin.xyz/api/v1/electricity/plans/presets/laundry?limit=1"

Response

{
  "request": {
    "pausable": false, "durationHours": 2, "energyKwh": 1.5,
    "earliestStart": "2026-10-12T08:15:00.000Z", "latestEnd": "2026-10-13T21:00:00.000Z",
    "limit": 1, "resolution": "15min", "preset": "laundry"
  },
  "meta": {
    "priceUnit": "c/kWh", "currency": "EUR", "vatIncluded": true, "vatPercent": 25.5, "area": "FI",
    "pricesUntil": "2026-10-13T21:00:00.000Z", "tomorrowPublished": true,
    "nextPricesExpectedAt": "2026-10-13T11:00:00.000Z"
  },
  "activeNow": false,
  "nextChangeAt": "2026-10-13T01:00:00.000Z",
  "startNow": {
    "startTime": "2026-10-12T08:15:00.000Z", "endTime": "2026-10-12T10:15:00.000Z",
    "priceAvg": 11.13, "category": "EXPENSIVE", "costCents": 16.69
  },
  "plans": [
    {
      "startTime": "2026-10-13T01:00:00.000Z", "endTime": "2026-10-13T03:00:00.000Z",
      "priceAvg": 2, "category": "VERY_CHEAP", "costCents": 3, "savingsCents": 13.69,
      "activeNow": false, "nextChangeAt": "2026-10-13T01:00:00.000Z",
      "blocks": [
        { "startTime": "2026-10-13T01:00:00.000Z", "endTime": "2026-10-13T03:00:00.000Z", "energyKwh": 1.5 }
      ]
    }
  ]
}
  • plans[0] is the cheapest run: start the program at its startTime. costCents is the cost of the energy, savingsCents what it saves compared with starting now (startNow).
  • activeNow and nextChangeAt tell a device whether to be on now and when to switch next.
  • The search runs from now to the last published price, meta.pricesUntil. Tomorrow's prices arrive at about 14:00 Finnish time; ask again after meta.nextPricesExpectedAt for a plan that can use them.

Overriding a preset

Any GET /v1/electricity/plans parameter replaces the preset's. Charge 30 kWh before 7:00 tomorrow morning:

curl "https://milloin.xyz/api/v1/electricity/plans/presets/ev-charging?energyKwh=30&latestEnd=2026-10-13T07:00:00%2B03:00"

A durationHours replaces the preset's power, and a maxPowerKw its duration. The other parameters are in Custom plans.