You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I first input the electricity rate in the UI, TeslaMate asks whether to back-calculate the historical charging records to compute the cost. At this point, a “cost” field or some cache data is generated, which Grafana uses to display electricity costs.
However, if I later change the electricity rates, the cost for the previous historical records does not update automatically; it still shows the old values.
Restarting or reinstalling Grafana does not trigger the back-calculation again, so the cost data does not refresh.
Additionally, TeslaMate currently does not support tiered electricity rates based on off-peak, normal, and peak periods, which makes the cost calculation less accurate for users with time-of-use pricing.
Expected Features:
Support automatic recalculation of electricity costs on historical charging data whenever electricity rates are changed, ensuring data consistency and accuracy.
Add support for configuring multi-tier time-of-use electricity rates (off-peak, normal, peak) so users can specify different rates by time periods for more precise cost calculation.
Thanks to the developer team for maintaining this great project!
UPDATE charging_processes
SET cost = CASE
WHEN charge_energy_used IS NULL THEN NULL
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') BETWEEN 0 AND 7 THEN charge_energy_used * 0.2292 -- 低谷 (0:00-8:00)
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') BETWEEN 8 AND 9 THEN charge_energy_used * 0.5889 -- 平段 (8:00-10:00)
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') = 10 THEN charge_energy_used * 0.9949 -- 高峰 (10:00-11:00)
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') = 11 THEN charge_energy_used * 1.2437 -- 尖峰 (11:00-12:00)
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') BETWEEN 12 AND 13 THEN charge_energy_used * 0.5889 -- 平段 (12:00-14:00)
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') BETWEEN 14 AND 14 THEN charge_energy_used * 0.9949 -- 高峰 (14:00-15:00)
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') BETWEEN 15 AND 16 THEN charge_energy_used * 1.2437 -- 尖峰 (15:00-17:00)
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') BETWEEN 17 AND 18 THEN charge_energy_used * 0.9949 -- 高峰 (17:00-19:00)
WHEN EXTRACT(HOUR FROM start_date AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Shanghai') BETWEEN 19 AND 23 THEN charge_energy_used * 0.5889 -- 平段 (19:00-24:00)
END
FROM geofences g
WHERE charging_processes.geofence_id = g.id
AND g.name = '家'
AND charge_energy_used IS NOT NULL;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
When I first input the electricity rate in the UI, TeslaMate asks whether to back-calculate the historical charging records to compute the cost. At this point, a “cost” field or some cache data is generated, which Grafana uses to display electricity costs.
However, if I later change the electricity rates, the cost for the previous historical records does not update automatically; it still shows the old values.
Restarting or reinstalling Grafana does not trigger the back-calculation again, so the cost data does not refresh.
Additionally, TeslaMate currently does not support tiered electricity rates based on off-peak, normal, and peak periods, which makes the cost calculation less accurate for users with time-of-use pricing.
Expected Features:
Support automatic recalculation of electricity costs on historical charging data whenever electricity rates are changed, ensuring data consistency and accuracy.
Add support for configuring multi-tier time-of-use electricity rates (off-peak, normal, peak) so users can specify different rates by time periods for more precise cost calculation.
Thanks to the developer team for maintaining this great project!
问题描述:
我在使用 TeslaMate 时,发现其电费计算功能存在一个问题:
当我第一次在界面输入电费率时,系统会询问是否回溯历史充电记录以计算电费,这时会生成一个“cost”字段或类似缓存数据,供 Grafana 展示电费。
但如果之后我更改了电费率,之前的历史记录电费不会自动更新,显示的仍然是之前的旧数据。
关闭或卸载 Grafana 并重新安装也无法重新触发回溯计算,电费数据不会刷新。
另外,TeslaMate 默认不支持根据“闲时、平时、峰时”不同时间段设置不同电价,导致电费计算无法精确反映实际电价结构。
期望功能:
支持电费率变更后自动对历史充电记录重新计算电费,保证数据的一致性和准确性。
增加支持峰谷平三个时段电价设置的功能,允许用户根据不同时间段配置对应电价,便于更精准地计算充电费用。
感谢开发者团队持续维护这个优秀的项目!
All reactions