# Beginner Questions

**URL:** <https://community.openems.io/t/beginner-questions/432>\
**Category:** English Forum\
**Created:** [February 18, 2021, 3:52pm UTC](https://community.openems.io/t/beginner-questions/432 "2021-02-18T15:52:06Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![stefan.feilmeier](https://community.openems.io/user_avatar/community.openems.io/stefan.feilmeier/32/2585_2.png) [@stefan.feilmeier](https://community.openems.io/u/stefan.feilmeier)\
**Post date:** [March 24, 2021, 9:37pm UTC](https://community.openems.io/t/beginner-questions/432/6 "2021-03-24T21:37:40Z")

</div>

Hi Carlos,

_Optimization of power allocation_:  
As we discussed in person, good examples for similar Controllers are:

> **[OpenEMS/openems](https://github.com/OpenEMS/openems/tree/feature/gridOptimizedCharge/io.openems.edge.controller.ess.gridoptimizedcharge)**
>
> feature/gridOptimizedCharge/io.openems.edge.controller.ess.gridoptimizedcharge

and

> **[OpenEMS/openems](https://github.com/OpenEMS/openems/tree/feature/dynamicCharge)**
>
> feature/dynamicCharge

_CSV file_  
The way we usually do it, is:

- Record data via `Timedata.InfluxDB` into an InfluxDB database
- Analyze data using Grafana ([https://grafana.com/](https://grafana.com/))
- Export data from Grafana to CSV
- Import to OpenEMS

This gives good control about what data we want to use for simulation and in which resolution (e.g. one value per second or one value per 15 minutes).

Otherwise, see also this post for details on how to implement your own `Datasource`: [EMS-Simulation durch Daten aus DB statt CSV-Dateien - #2 by stefan.feilmeier](https://community.openems.io/t/ems-simulation-durch-daten-aus-db-statt-csv-dateien/451/2)

_UI historic view_

The `Datasource` for simulated meters is a different concept than the `Timedata` provider. I understand, that those can easily get mixed up.

- `Datasource` provides a new value on each Cycle for live simulation
- `Timedata` provides access to historic data that it was previously recording

Regards,  
Stefan

---

_[View the full topic](https://community.openems.io/t/beginner-questions/432)._
