Replies: 9 comments 1 reply
-
I am sure, that that can be done with some database magic... |
Beta Was this translation helpful? Give feedback.
-
get the id from the charges table and you can do like the below if the charge id is 9 that you want to modify the cost for. In the query below, if you set the cost to NULL instead of a value, you can edit it from the web UI I think.
|
Beta Was this translation helpful? Give feedback.
-
Ok, that challenged me...
(use that instead of line 2 and 3 above) |
Beta Was this translation helpful? Give feedback.
-
note that, if you want to make the change for all charges at that geolocation you use the geofence_id. If you need to change for a specific charge, you can use the id from the charges table. |
Beta Was this translation helpful? Give feedback.
-
And don't forget to make a backup before... |
Beta Was this translation helpful? Give feedback.
-
Thanks All, this is going to work. Thanks for pointing me in the right direction. And sure i do have backups :) |
Beta Was this translation helpful? Give feedback.
-
I just started looking into this. It looks like price per kWh is calculated realtime, while the database stores the total cost and energy added. Is that correct? Going to need that info to make the correct updates, because it's looking like I'll need a query like this: UPDATE charging_processes SET cost = charge_energy_added * 0.39 WHERE geofence_id=1 AND start_date >= '2023-08-01 00:00:00.000' AND start_date <= '2023-08-31 23:59:59.999'; Is this correct, assuming I want to update all August 2023 charges to 39 cents per kWh? |
Beta Was this translation helpful? Give feedback.
-
Hi all, I made some tests and I see a small glitch that may lead to zero costs for some sessions. For some "very short session" I have at DB records with a valid charge_energy_added value but charge_energy_used is null (I do not know why, but in graphana these are showed correctly) To solve this I think is is better to use this formula in the UPDATE clause
Moreover we can simplify the start_date selection using like For instance to update all the charges at my home geofence made in May 2025 where
I test it in my installation and all works correctly |
Beta Was this translation helpful? Give feedback.
-
For sure, just change it back in geofence and it will ask you if you will change it in past as well. If not directly, change to 0 and then to new value. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
i accidentally set the charging price of a geofence location to €30 instead of €0.30. The total price in grafana of charging at that location are completely wrong now. Can i change the price of the previous charging sessions from that location?
Kind regards,
Mark
Beta Was this translation helpful? Give feedback.
All reactions