开发者Skip to main content

  1. 文件
  2. 收费

能量端点

端点

backup

POST /api/1/energy_sites/{energy_site_id}/backup

Adjust the site's backup reserve.

backup_history

GET /api/1/energy_sites/{energy_site_id}/calendar_history?kind=backup&start_date={start_date}&end_date={end_date}&period={period}&time_zone={time_zone}

Returns the backup (off-grid) event history of the site in duration of seconds.

charge_history

GET /api/1/energy_sites/{energy_site_id}/telemetry_history?kind=charge&start_date={start_date}&end_date={end_date}&time_zone={time_zone}

Returns the charging history of a wall connector.

  • Energy values are in watt hours.

energy_history

GET /api/1/energy_sites/{energy_site_id}/calendar_history?kind=energy&start_date={start_date}&end_date={end_date}&period={period}&time_zone={time_zone}

Returns the energy measurements of the site, aggregated to the requested period.

grid_import_export

POST /api/1/energy_sites/{energy_site_id}/grid_import_export

Allow/disallow charging from the grid and exporting energy to the grid.

live_status

GET /api/1/energy_sites/{energy_site_id}/live_status

Returns the live status of the site (power, state of energy, grid status, storm mode).

  • Power values are in watts.
  • Energy values are in watt hours.

off_grid_vehicle_charging_reserve

POST /api/1/energy_sites/{energy_site_id}/off_grid_vehicle_charging_reserve

Adjust the site's off-grid vehicle charging backup reserve.

operation

POST /api/1/energy_sites/{energy_site_id}/operation

Set the site's mode.

products

GET /api/1/products

返回映射到用户的产品。

site_info

GET /api/1/energy_sites/{energy_site_id}/site_info

Returns information about the site. Things like assets (has solar, etc), settings (backup reserve, etc), and features (storm_mode_capable, etc).

  • Power values are in watts.
  • Energy values are in watt hours.
  • default_real_mode can be autonomous for time-based control and self_consumption for self-powered mode.

storm_mode

POST /api/1/energy_sites/{energy_site_id}/storm_mode

Update storm watch participation.

time_of_use_settings

POST /api/1/energy_sites/{energy_site_id}/time_of_use_settings

更改住宅的电费时段价格. 如需获取更多信息,请访问 https://www.tesla.cn/support/energy/powerwall/mobile-app/utility-rate-plans . 请求体参数中的tou_settings.tariff_content_v2 就是电费时段价格. 范例可见 https://digitalassets-energy.tesla.cn/raw/upload/app/fleet-api/example-tariff/PGE-EV2-A.json. 在构建请求时,请注意:

  • 需至少创建一个 季度 的价格. 季度可以被随意命名。每个季度包含一年内不同的月份和天数。每个季度内每天不同时段可有不同价格。
  • demand_charges 标识用电高峰期的额外费用,住宅区一般不缴此费. 普通住宅区应使用 energy_charges 表明费用.
  • energy_charges 或者 demand_charges 中,ALL规定的费用适用于所有时段. 如果电费价格不安时段变化,请使用ALL表示。
  • 电价可为以下币种: USD, EUR, GBP
  • 电价时段名称可自定义,但仅有有以下可被手机应用展示: ON_PEAK, OFF_PEAK, PARTIAL_PEAK or SUPER_OFF_PEAK.
  • 电费时段及价格须保证:
    • 时段不重叠
    • 总时段不留空隙
    • 季度不重叠,总体不留空隙
    • 每组买入卖出价格都需有对应的季节时段
    • 每个季节里的时段都需要有相对应的价格
    • 价格不可为负,系统会把负数自动归零。请使用税后电价
    • 买入价不可以比卖出价格低。如果低,系统自动将买入价调成卖出价