Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Huge amount of wasted energy caused by undesirable sleep patterns using smart chargers

This site may earn commission on affiliate links.
Which endpoints? I've never managed to wake my car with any of my Teslamate queries - standard or my own.
That's not what I said either. If you call the Vehicle Data API (https://owner-api.teslamotors.com/api/1/vehicles/:id/vehicle_data) you reset the idle timer and so prevent the car from falling asleep. See here it discussed in TeslaMate's documentation Frequently Asked Questions | TeslaMate

So it doesn't wake the car, but can prevent the car from returning to sleep. In this case the car is waking itself looking for an opportunity to charge, then TeslaMate is either keeping it awake, or unable to timely report detect that the car has gone to sleep.

Also, you can wake the car by calling an API if you like, the endpoint is https://owner-api.teslamotors.com/api/1/vehicles/:id/wake_up
 
That's not what I said either. If you call the Vehicle Data API (https://owner-api.teslamotors.com/api/1/vehicles/:id/vehicle_data) you reset the idle timer and so prevent the car from falling asleep. See here it discussed in TeslaMate's documentation Frequently Asked Questions | TeslaMate

So it doesn't wake the car, but can prevent the car from returning to sleep. In this case the car is waking itself looking for an opportunity to charge, then TeslaMate is either keeping it awake, or unable to timely report detect that the car has gone to sleep.

You missed the title from that section:

Why am I missing data when not using the Streaming API?​


As I said above, if the OP is using the default Streaming mode then Teslamate doesn't poll and the above doesn't apply.
Also, you can wake the car by calling an API if you like, the endpoint is https://owner-api.teslamotors.com/api/1/vehicles/:id/wake_up
There is no access to that endpoint from Teslamate.
 
  • The car's charging pattern is not as good for the battery. With the Ohme that I've got, it adjusts the charging curve in a way as to minimise the time the car spent charged at high current. In contrast, the car only charges at a flat 32A.
This may be your problem. There is no way that Ohme knows what is better for the car than Tesla does. Tesla needs the charger to do as it's told ("please give me the 32A you said you are capable of") and to behave in a predictable way, so if it isn't (eg the behaviour of being there but having no current) then I'm not surprised the car isn't behaving as you'd expect it to. By the way, 32A is *not* a high current for the batteries in a Tesla; it qualifies as little more than a trickle charge (10h or thereabouts to charge an individual cell). It'd be interesting to see what behaviour other Ohme owners see.
 
Pro: Very good trade in prices at present making upgrade/refresh look cheap .:)
Would dropping the LIMIT overnight be any good?

My overnight charging script, based on when I did have to get up early to commute, dropped limit to 80% 5 minutes before start of off-peak, Car's scheduler then started the charge. That finished whenever 80% was reached. My script then changed the limit to 90% an hour or so before expected departure [I left early, that was still within off-peak] and started charging (if it had finished / stopped) .. and then turned on climate etc. a bit before expected departure.
Thanks, dropping the charging limit is a good idea :) it'll surely let the car go to sleep after even a partial charge session. Did you use GitHub - tdorssers/TeslaPy: A Python module to use the Tesla Motors Owner API for access?.

I don't have the Zappi but I'd expect the API to let us trigger charging remotely so the tricky part is whether the Zappi/Hypervolt let us access the solar output. Failing that, it might be possible from the Tesla API to differentiate between charger connected and powered vs. unpowered state, but I haven't checked.

The finish charging issue should be partially solvable with a small script that simply drops the charge limit once it has seen a charging session stopped, for the simplest use-case of a single charge session over night that the car employs. The Ohme has a fairly sophisticated charging algorithm that could result in 2 charging sessions (one during the cheap hours, and another for the scheduled departure).

I'll find some time to write one up, unless you've got something that already works in a similar fashion?.
 
I'll find some time to write one up, unless you've got something that already works in a similar fashion?.
TeslaFi has the ability to do all sorts of schedules, including starting & stopping charging at certain times, and changing the charge limits.

I don't use it, but this is the window to set it up.

1648411305043.png
 
  • Like
Reactions: vanhtu1987
You missed the title from that section:

Why am I missing data when not using the Streaming API?​


As I said above, if the OP is using the default Streaming mode then Teslamate doesn't poll and the above doesn't apply.

There is no access to that endpoint from Teslamate.
I'd concur, to my understanding: Streaming mode is not expected to either wake up the car or prevent it from going to sleep since it passively receives data reported by Tesla server.

There might be more nuances than this as the docs isn't crystal clear (it doesn't explicitly say that the 3 minutes idle window shouldn't apply to Streaming mode), but more information about this could be found at Consider using the websocket streaming API · Issue #417 · adriankumpf/teslamate . The feedback was positive.
 
  • Like
Reactions: init6
This may be your problem. There is no way that Ohme knows what is better for the car than Tesla does. Tesla needs the charger to do as it's told ("please give me the 32A you said you are capable of") and to behave in a predictable way, so if it isn't (eg the behaviour of being there but having no current) then I'm not surprised the car isn't behaving as you'd expect it to. By the way, 32A is *not* a high current for the batteries in a Tesla; it qualifies as little more than a trickle charge (10h or thereabouts to charge an individual cell). It'd be interesting to see what behaviour other Ohme owners see.
Indeed, 7kW is 0.1C which is minuscule by LiPo battery's charging standard, but another benefit of the Ohme's charging algorithm (apart from being able to use the cheap hours effectively) is that it lets the battery in a warmer state compared to using Tesla's.

As an example, if the car's SoC is 30% and I need it charged to 90% by 9AM. The typical charge curve would be:
  • 4 hours of full charge rate at 7.4kW: car will be charged to ~70% by 4:30AM.
  • 2 hours charging session at 4kW from 6-8AM: car will be charged to ~80% by 8AM
  • 1 hour of full charge rate until 9AM
It allows the battery to both minimally charged at low current but the current is ramped up to the max rate closer to the scheduled departure time to allow the battery to get warmer. Other things that it does do (but is irrelevant in this thread) is optimising the charging sessions to be greenest as well, which some people care about.

The car as it stands, unfortunately doesn't support Time-of-Use tariff well but even if it does, smart chargers do have quite sophisticated algorithms that I found lacking in Tesla's.
 
Interesting. I have a 2021 model 3. I get home from work and plug it in every night to charge only between 00:30 and 04:30 all controlled by the EO Smart Charger.

Sometimes it stays plugged in all weekend and tops up each night.

According to Tessie, it is sleeping perfectly fine. Only being woken up by the fact the charger has started delivering power to it at half 12.

So no idea why your seeing what your seeing.
 
Complete control can be obtained by using the Tesla API and a home automation system. This approach avoids services like Teslafi and the issue of getting hacked a losing the API key.

The two home automation systems I've used with Tesla are Homeseer and Home Assistant. I'm sure there are others that have implemented the Tesla API.
 
Interesting. I have a 2021 model 3. I get home from work and plug it in every night to charge only between 00:30 and 04:30 all controlled by the EO Smart Charger.

Sometimes it stays plugged in all weekend and tops up each night.

According to Tessie, it is sleeping perfectly fine. Only being woken up by the fact the charger has started delivering power to it at half 12.

So no idea why your seeing what your seeing.
One person with a 2022 Model 3 has shown that they have no such issue Huge amount of wasted energy caused by undesirable sleep patterns using smart chargers , but another showed similar behaviour on their Model 3 Huge amount of wasted energy caused by undesirable sleep patterns using smart chargers so it seems this is no longer an issue for 2021 Teslas'.

Could you please clarify its sleeping pattern?.

I intend to keep the car for a very long time, at least until the 7-seater Model Y comes to the UK or until the kids have out-grown it, as my Model S is a 7-seater.
 
I had a play with TeslaPy today and came up with a script to monitor the charger's power state and adjust the car's desired SoC accordingly to allow it to go to sleep when the charger is off:
from datetime import datetime import teslapy import time email = '<your email>' def set_charge_limit(car, percent): print('Setting charge limit to', percent) try: car.command('CHANGE_CHARGE_LIMIT', percent=percent) except BaseException as exc: print(exc) with teslapy.Tesla(email) as tesla: cars = tesla.vehicle_list() car = cars[0] charging_state = '' while True: CHARGER_ON_STATES = ['Complete'] CHARGER_OFF_STATES = ['Disconnected', 'NoPower'] new_charging_state = car.get_vehicle_data()['charge_state']['charging_state'] print('{}: charge state {}'.format(datetime.now().strftime("%d/%m/%Y %H:%M:%S"), new_charging_state)) if new_charging_state in CHARGER_ON_STATES and charging_state not in CHARGER_ON_STATES: set_charge_limit(car, 100) elif new_charging_state in CHARGER_OFF_STATES and charging_state not in CHARGER_OFF_STATES: set_charge_limit(car, 50) charging_state = new_charging_state time.sleep(15)

Example output (slightly outdated):
$ python minimise_wakeup_time.py 06/04/2022 01:12:43: charge state Disconnected Charger is off, setting min charge limit 06/04/2022 01:12:59: charge state NoPower 06/04/2022 01:13:14: charge state NoPower 06/04/2022 01:13:29: charge state NoPower 06/04/2022 01:13:45: charge state Complete Charger is on, seting max charge limit 06/04/2022 01:14:00: charge state Charging 06/04/2022 01:14:15: charge state Charging 06/04/2022 01:14:31: charge state Disconnected Charger is off, setting min charge limit 06/04/2022 01:14:46: charge state Disconnected 06/04/2022 01:15:01: charge state Complete Charger is on, seting max charge limit 06/04/2022 01:15:17: charge state Charging 06/04/2022 01:15:32: charge state Charging 06/04/2022 01:15:48: charge state Charging 06/04/2022 01:16:03: charge state Disconnected Charger is off, setting min charge limit

I need to test it for a few days under different conditions. One feature that is likely needed is geofencing: when connected to a charger outside from home (which is not schedule-able), we'd likely want to adjust the maximum SoC to a different value other than 100% so the script must not interfere in those cases.