You can install our site as a web app on your iOS device by utilizing the Add to Home Screen feature in Safari. Please see this thread for more details on this.
Note: This feature may not be available in some browsers.
That's a shame - was hoping mine had just been complaining due to the initial setup stuff. Annoyingly you don't seem to be able to monitor actual memory usage on the instances unless you install the cloud monitor agent, which itself uses some resources - which is the last thing you want when it is running so close to the max. If only they extended the always free offer to the e2-micro machine types too!Mine lasted a few days without warnings, just checked now and have one.
I'm a bit time limited but have taken a look at what the absolute minimum is to achieve this. You might have also seen I posted a picture of the TeslaMate schema earlier in this thread. I've tried this on a test database and taken screenshots so you can see what you do and don't get. Depends on how much your OCD on charge data is nagging you!
The good news is that a charging_processes table record has no outward dependency on records in the charges table, the latter has to refer to a parent charging_processes record but not vica versa.
If all you want is the Charging Stats dashboard to have the right numbers for Total Cost, Total Number of Charges and Total kWh added then you can achieve that with manually inserting a single record for each missing charge session. This will make the Charging Stats dashboard totals reflect your manually added charge(s), no entries will be shown in the Charges dashboard though. The Charges dashboard entry is possible but will need more work on your side.
WARNING: make sure you take a backup of your database before you try any of this just in case you need to revert back. No warranty given or implied so do at your own risk.
Example of faked charging session for the following desired values:
29th June 2020, 23:00 - 23:30, 30 mins duration (SQL statement below inserts time/date in UTC so 1 hour offset to BST)
Charge added = 2.75kWh
Cost = 0.12
Assumes only a single car in TeslaMate (car_id = 1)
Assumes charge is linked to first position ever logged in TeslaMate (position_id = 1), you can set this to a different value if you find the id of your desired position in the database but haven't described that here.
Only populates values in the table that cannot be left null as per the database design plus those values needed to get your charge costs correct.
Code:INSERT INTO public.charging_processes( id, start_date, end_date, charge_energy_added, duration_min, car_id, position_id, cost ) VALUES( nextval('public.charging_processes_id_seq'), TIMESTAMP '2020-06-29 22:00:00', TIMESTAMP '2020-06-29 22:30:00', 2.75, 30, 1, 1, 0.12 );
Before view of Charging Stats dashboard
View attachment 560364
View attachment 560365
After view of Charging Stats dashboard with changes highlighted in red
1 charge session added
30 minutes added to total duration
Total charged kWh increased, TeslaMate always rounds to whole kWh value
Total charging cost increased
View attachment 560366
Faked charging session defaulting to a DC based charge.
No named location based on using position_id = 1 in my example database.
As we've not created any corresponding charge data stream records in the public.charges table there is no SOC data shown.
You won't be able to drill into the faked charging session, it only appears on the Charging Stats dashboard and contributes to maintaining your total number of charges, kWh, duration and costs.
View attachment 560367
You could also add the geo-fence column into that INSERT and supply the I’d of your home geo-fence, for example, if it was a home charge that’s missing.Really appreciate the time taken to post this. I shall let you know how I get on.
You could also add the geo-fence column into that INSERT and supply the I’d of your home geo-fence, for example, if it was a home charge that’s missing.
It’s a supercharger that was missing but I have geofenced all superchargers so presumably it will have a geo-fence ID.
Sorry one very basic query - what command do I have to run to get to the position to use the “Insert” command you suggested above? Apologies I’m coming at this quite green.
Thanks again.
You need to get to the DB, if you followed the inserting supercharger guide, you can use the first bit of that
That's a shame - was hoping mine had just been complaining due to the initial setup stuff. Annoyingly you don't seem to be able to monitor actual memory usage on the instances unless you install the cloud monitor agent, which itself uses some resources - which is the last thing you want when it is running so close to the max. If only they extended the always free offer to the e2-micro machine types too!
Yup, the monitoring uses 200 odd Mb of memory I believe so you can’t practically add that to F1-micro too.That's a shame - was hoping mine had just been complaining due to the initial setup stuff. Annoyingly you don't seem to be able to monitor actual memory usage on the instances unless you install the cloud monitor agent, which itself uses some resources - which is the last thing you want when it is running so close to the max. If only they extended the always free offer to the e2-micro machine types too!
No idea what happens if you carry on leaving it on F1-micro with that warning...
Well I'll uninstall the monitor and switch back to the f1-micro for a bit and see what happens too.
As an aside I'm moving from Octopus Go to Octopus Agile as of midnight tonight so I've added Matt Jeanes' bit to the docker-compose.yml file for when I restart it - hopefully with the appropriate bits! Do I need to remove the current cost I have in the geofence in order for it to work do you know @Durzel ? I only want it to be triggering for charges at home from midnight tonight.
mine has the message now. not installed a monitor just pure Teslamate, im going to leave it as is and see what happens
View attachment 561497
Only says to consider it.. mine still works absolutely fine so far, just as responsive as it was on the Pi.
I'm a bit time limited but have taken a look at what the absolute minimum is to achieve this. You might have also seen I posted a picture of the TeslaMate schema earlier in this thread. I've tried this on a test database and taken screenshots so you can see what you do and don't get. Depends on how much your OCD on charge data is nagging you!
The good news is that a charging_processes table record has no outward dependency on records in the charges table, the latter has to refer to a parent charging_processes record but not vica versa.
If all you want is the Charging Stats dashboard to have the right numbers for Total Cost, Total Number of Charges and Total kWh added then you can achieve that with manually inserting a single record for each missing charge session. This will make the Charging Stats dashboard totals reflect your manually added charge(s), no entries will be shown in the Charges dashboard though. The Charges dashboard entry is possible but will need more work on your side.
WARNING: make sure you take a backup of your database before you try any of this just in case you need to revert back. No warranty given or implied so do at your own risk.
Example of faked charging session for the following desired values:
29th June 2020, 23:00 - 23:30, 30 mins duration (SQL statement below inserts time/date in UTC so 1 hour offset to BST)
Charge added = 2.75kWh
Cost = 0.12
Assumes only a single car in TeslaMate (car_id = 1)
Assumes charge is linked to first position ever logged in TeslaMate (position_id = 1), you can set this to a different value if you find the id of your desired position in the database but haven't described that here.
Only populates values in the table that cannot be left null as per the database design plus those values needed to get your charge costs correct.
Code:INSERT INTO public.charging_processes( id, start_date, end_date, charge_energy_added, duration_min, car_id, position_id, cost ) VALUES( nextval('public.charging_processes_id_seq'), TIMESTAMP '2020-06-29 22:00:00', TIMESTAMP '2020-06-29 22:30:00', 2.75, 30, 1, 1, 0.12 );
Before view of Charging Stats dashboard
View attachment 560364
View attachment 560365
After view of Charging Stats dashboard with changes highlighted in red
1 charge session added
30 minutes added to total duration
Total charged kWh increased, TeslaMate always rounds to whole kWh value
Total charging cost increased
View attachment 560366
Faked charging session defaulting to a DC based charge.
No named location based on using position_id = 1 in my example database.
As we've not created any corresponding charge data stream records in the public.charges table there is no SOC data shown.
You won't be able to drill into the faked charging session, it only appears on the Charging Stats dashboard and contributes to maintaining your total number of charges, kWh, duration and costs.
View attachment 560367
Thanks again for this. Finally had a chance to start putting it together.
Apologies for another basic question. The only outstanding item I have is the position ID.
You mentioned the following:
Assumes charge is linked to first position ever logged in TeslaMate (position_id = 1), you can set this to a different value if you find the id of your desired position in the database but haven't described that here.
My query is how to find the position ID. It is the same location as most of my other charges (South Mimms), but I can't quite see how to find the position ID. I've looked in the JSON tables within Grafana and within the URLs.
If it is easier to go down this route, it is also one of my saved geo-fences.
Much appreciated as always!
SELECT position_id FROM public.charging_processes WHERE id = 4;
position_id
-------------
37
(1 row)
INSERT INTO public.charging_processes(
id,
start_date,
end_date,
charge_energy_added,
duration_min,
car_id,
position_id,
geofence_id,
cost
)
VALUES(
nextval('public.charging_processes_id_seq'),
TIMESTAMP '2020-06-29 22:00:00',
TIMESTAMP '2020-06-29 22:30:00',
2.75,
30,
1,
37,
1,
0.12
);