Skip to content
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Build Your First IoT Forecast Model

This guide builds your first prediction model: a forecast of the energy each site will use over the next 7 days. It takes a few minutes and no code. Trendz learns from the readings your devices already sent to ThingsBoard.

By the end of this guide, you will have this model:

Before you start: you need devices of one profile in ThingsBoard that send a number regularly, for example hourly energy, with a few weeks of history.

Go to Prediction models in the left menu and click Create model. Then pick what you want to predict. For a first model, choose Forecast and click Next.

Tell Trendz which devices to learn from and which reading to predict:

  1. Pick the device profile, here Site Energy.
  2. Pick the reading to predict, here total, the energy used.
  3. Check the Data Readiness panel on the right. Good or Excellent means there is enough history.

Click Next.

Pick how far into the future to predict, for example Next 7 days. Leave everything else as it is, and click Build model. Trendz trains the model, which takes from a few seconds to a few minutes.

The other options are already set to the values Trendz recommends, so you get the best forecast possible from the data you selected without changing anything.

The model page opens when training is done. The chart shows the measured readings as a solid line and the forecast as a dashed line after Now. The table below lists every device with its latest reading and its next predicted value.

A new model predicts once. To refresh the forecast as new readings arrive, click Monitoring in the page header:

  1. Switch Periodic refresh on and choose how often, for example every hour.
  2. Switch Scheduled retrain on. The model then relearns from the newest readings before each forecast, so it follows changes in how your devices behave.
  3. Optionally switch Save telemetry on and enter a Telemetry key, so the forecast is also saved in ThingsBoard for your dashboards.
  4. Click Save changes.

That’s it: the model now keeps its forecast current on its own.