Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flexmeasures show CLI commands #339

Merged
merged 6 commits into from Jan 29, 2022
Merged

Add flexmeasures show CLI commands #339

merged 6 commits into from Jan 29, 2022

Conversation

nhoening
Copy link
Contributor

Closes #338

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening requested a review from Flix6x January 27, 2022 09:43
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening
Copy link
Contributor Author

Showcasing how it looks like:

± flexmeasures show accounts
[FLEXMEASURES][2022-01-27 13:40:21,602] INFO: Loading config from /home/nicolas/.flexmeasures.cfg ...
All accounts on this FlexMeasures instance:
 
  Id  Name                   Assets
----  -------------------  --------
   1  Seita                      70
   2  A1                          0
   3  V2G@Home Living Lab         5
   4  Cwi                         1
   5  Some company                1
(sempras) nicolas at xps13 in ~/workspace/seita/flexmeasures on cli-show-data-commands (21 untracked)
± flexmeasures show account --account-id 5
[FLEXMEASURES][2022-01-27 13:40:37,910] INFO: Loading config from /home/nicolas/.flexmeasures.cfg ...
==============================
Account Some company (ID:5):
==============================

Account has no roles.

All users:
 
  Id  Name    Email            Last Login                  Roles
----  ------  ---------------  --------------------------  -------
  34  Summer  summer@seita.nl  2022-01-13 15:24:49.974231

All assets:
 
  Id  Name                  Type      Location
----  --------------------  --------  ------------
  84  SomeGenericTestAsset  building  (10.0, 12.0)
(sempras) nicolas at xps13 in ~/workspace/seita/flexmeasures on cli-show-data-commands (21 untracked)
± flexmeasures show roles                 
[FLEXMEASURES][2022-01-27 13:40:51,695] INFO: Loading config from /home/nicolas/.flexmeasures.cfg ...
Account roles:

  Id  Name      Description
----  --------  -------------
   1  MDC
   2  Prosumer

User roles:

  Id  Name         Description
----  -----------  -----------------------------------------------
   1  admin        An admin has access to all assets and controls.
   2  Prosumer     USEF defined role of asset owner.
   3  MDC          USEF defined role of Meter Data Company.
   4  task-runner  Process running BVP-relevant tasks.
   5  anonymous    An anonymous user cannot make edits.
   6  CPO          OCPI defined role of Charging Point Operator.
(sempras) nicolas at xps13 in ~/workspace/seita/flexmeasures on cli-show-data-commands (21 untracked)
± flexmeasures show asset-types
[FLEXMEASURES][2022-01-27 13:41:07,004] INFO: Loading config from /home/nicolas/.flexmeasures.cfg ...
  Id  Name               Description
----  -----------------  -------------------
   1  solar              solar panel
   2  wind               wind turbine
   3  battery            stationary battery
   4  building           building
   5  one-way_evse       one-way EVSE
   6  two-way_evse       two-way EVSE
   7  day_ahead          day-ahead market
   8  tou_tariff         time-of-use tariff
   9  temperature        ambient temperature
  10  wind_speed         wind speed
  11  radiation          solar irradiation
  19  day-ahead market
  23  transmission zone
  24  EV
(sempras) nicolas at xps13 in ~/workspace/seita/flexmeasures on cli-show-data-commands (21 untracked)
± flexmeasures show asset --asset-id 34
[FLEXMEASURES][2022-01-27 13:46:12,468] INFO: Loading config from /home/nicolas/.flexmeasures.cfg ...
===================================================
Asset millennium-seoul-hilton---charger-1 (ID:34):
===================================================

Type          Location             Attributes
------------  -------------------  ------------------------------------------------
two-way_evse  (37.5557, 126.9761)  display_name:Millennium Seoul Hilton - charger 1
                                   min_soc_in_mwh:0.0
                                   max_soc_in_mwh:0.0
                                   soc_in_mwh:0.0
                                   soc_datetime:None
                                   soc_udi_event_id:None
                                   can_curtail:False
                                   can_shift:True
                                   correlations:['temperature']

All sensors in asset:
 
  Id  Name                                 Unit    Resolution    Timezone    Attributes
----  -----------------------------------  ------  ------------  ----------  ------------------------------------------------
  60  millennium-seoul-hilton---charger-1  MW      0:15:00       UTC         display_name:Millennium Seoul Hilton - charger 1
                                                                             latitude:37.5557
                                                                             longitude:126.9761
                                                                             capacity_in_mw:0.05
                                                                             market_id:131
                                                                             is_consumer:True
                                                                             is_producer:True
                                                                             daily_seasonality:True
                                                                             weekly_seasonality:True
                                                                             yearly_seasonality:True

``

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
flexmeasures/cli/data_show.py Outdated Show resolved Hide resolved
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening requested a review from Flix6x January 28, 2022 11:36
@nhoening nhoening merged commit 43a0173 into main Jan 29, 2022
@nhoening nhoening deleted the cli-show-data-commands branch January 29, 2022 22:41
@Flix6x Flix6x added this to the 0.9.0 milestone Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI commands for listing data
2 participants