Skip to content

For Developers

The Hungry Machines optimizer is available over a documented HTTP API, so you don’t have to use the default Home Assistant app. You can build your own dashboard, a mobile app, a Home Assistant integration tuned to your home, or firmware on an embedded device — anything that can speak HTTPS.

This section is the public integration contract: everything you need to send the right data and apply the results, with worked examples in several languages.

Whatever you build, the shape is the same:

  1. Register the account’s appliances and preferences (one-time).
  2. Push readings so the optimizer can learn the home (ongoing, ~every 5 minutes).
  3. Pull the schedule once a day and apply each 30-minute step to the device locally.

Your client owns all local device control — hysteresis, safety limits, hardware I/O. The API owns the optimization.

  • Accounts are created on the website. Always have users sign up at hungrymachines.io — that flow sets up billing, subscription state, and onboarding, none of which the API does on its own. Your client authenticates an existing account; it doesn’t create real ones. See Authentication.
  • Everything is one base URL. Both authentication and product endpoints live on https://api.hungrymachines.io. Users sign in with the same email and password they use everywhere else — no separate API credentials.
  • The default app is open source. The Home Assistant panel and cards are MIT-licensed and a good reference (or fork target) if you want a head start. Patches and forks are welcome.
DirectionEndpointTypical cadencePurpose
PushPOST /api/v1/readingsEvery ~5 minHVAC sensor data — the input the optimizer learns from
PushPOST /api/v1/appliances/{id}/readingsEvery ~5 min (per appliance)EV / battery / water-heater state
PushPOST /api/v1/weatherOnce a dayYour local weather forecast
PullGET /api/v1/schedulesOnce a dayReady-to-apply schedules for every appliance
Read/write/api/v1/appliances · /api/v1/preferences · /api/v1/ratesAs neededRegister devices, comfort settings, pricing

A few fields the API returns are for display onlyestimated_savings_pct, model_confidence, and the predicted-temperature trajectory line. Render them as-is; don’t build logic on how they’re computed, and don’t try to reverse-engineer the optimizer from them. The stable contract is: apply setpoint_temps (and on/off intervals) verbatim, honor the documented fallbacks, and show the rest. The API Reference spells out each field and its fallback.