FlexMeasures can be run in specific modes (see the FLEXMEASURES_MODE config setting). This is useful for certain special situations. Two are supported out of the box and we document here how FlexMeasures behaves differently in these modes.


In this mode, the server is assumed to be used as a demonstration tool. Most of the following adaptations therefore happen in the UI.

  • [Data] Demo data is often from an older source, and it’s a hassle to change the year to the current year. FlexMeasures allows to set FLEXMEASURES_DEMO_YEAR and when in demo mode, the current year will be translated to that year in the background.

  • [UI] Logged-in users can view queues on the demo server (usually only admins can do that)

  • [UI] Demo servers often display login credentials, so visitors can try out functionality. Use the FLEXMEASURES_PUBLIC_DEMO_CREDENTIALS config setting to do this.

  • [UI] The dashboard shows all non-empty asset groups, instead of only the ones for the current user.

  • [UI] The analytics page mocks confidence intervals around power, price and weather data, so that the demo data doesn’t need to have them.

  • [UI] The portfolio page mocks flexibility numbers and a mocked control action.


In this mode, the server is assumed to be used to run simulations.

Big features

  • [API] The inferred recording time of incoming data is immediately after the event took place, rather than the actual time at which the server received the data.

  • [API] Posting price or weather data does not trigger forecasting jobs.

  • [API] The restoreData endpoint is registered, enabling database resets through the API.


A former feature of play mode is now a separate config setting. To allow overwriting existing data when saving data to the database, use FLEXMEASURES_ALLOW_DATA_OVERWRITE.

Small features

  • [API] Posted UDI events are not enforced to be consecutive.

  • [API] Names in GetConnectionResponse are the connections’ unique database names rather than their display names (this feature is planned to be deprecated).

  • [UI] The dashboard plot showing the latest power value is not enforced to lie in the past (in case of simulating future values).