Jaguar I-Pace Forum banner

Timed Charging to %SOC via Raspberry Pi and JLRPY

9K views 33 replies 13 participants last post by  gf4444 
#1 ·
Hi

Not sure if anyone on here has tried or posted on this before.

But I've "discovered" a relatively easy way of making my dumb podpoint "smart" charger - really smart. To do this you need 3 ingredients:

1) Raspberry PI https://www.raspberrypi.org/connected to your home network (over wifi) running raspbian (I had one lying around but you can buy what you need for about £55 or less :D ).
2) Python3 installed with the python 3 version of ardevd's jlrpy library for python control of the ipace. (it's on github: https://github.com/ardevd/jlrpy
3) The provided sample script and ini file - charge_offpeak.py/sample.jlrpy.ini (in the github repo in the examples folder).

The .ini file holds your login credentials, home charger position, charging hours, and max desired %SOC.

  • With the script running, all you need to do is plug the car in, it will start charging, until the script wakes and checks the car (every minute).
  • It uses the home charger position to only proceed when you are charging at home.
  • The script then pauses charging via the API, until the charge window opens.
  • When the window opens it resumes charging until the end of the window or max SOC is reached and it then pauses charging again,
  • Charging will resume when the window opens again..

My last 3 charges worked like a charm - feeling more comfortable about my upcoming switch to a variable tarriff now.

If folks want I can provide a writeup of the installation and configuration of the script to run as a service (auto on startup).

Ardevd - can't thankyou enough, I was gearing up to take your API descriptions and write this from those - but this does exactly what I need.

Simon,.
 
See less See more
#2 ·
Looks promising! But this also means that the script will call the Jaguar API every minute 24/7? I hope this is within the rate limit allowed by JLR and hope it doesn't impact the performance for regular users too much... The system is already underperforming and if too many people query the APIs every minute, it won't get any better I am afraid....
 
#3 ·
From the code;
threading.Timer(60.0, check_soc).start() # Called every minute

It can easily be changed to every 5 minutest, 15 minutes etc.

threading.Timer(900.0, check_soc).start() # Called every 15 minutes

Maybe @ardevd could add this feature to WattCat ?
 
#4 ·
Snoerd, totally agree...

I'm only plugging the PI in when I'm getting the cable out to charge, then turn it off when I put the cable away, so this minimises the load on the servers (no point having it running if the charge cable is coiled up in the cupboard).

I didn't want to use Wattcat for this as it will keep the phone awake and consume a lot more battery, especially as I had a Pi sat in the cupboard.

S
 
#6 ·
Hi Simon,

Thanks for this. I'm getting my pod-point installed in 2 weeks time & was starting to explore how to reliably program timed charging as I already have Economy 7. Sounds like the Raspberry Pi is better than using the car's charging controls?

Best, Rob
 
#8 ·
RobN said:
Hi Simon,

Thanks for this. I'm getting my pod-point installed in 2 weeks time & was starting to explore how to reliably program timed charging as I already have Economy 7. Sounds like the Raspberry Pi is better than using the car's charging controls?

Best, Rob
Rob,

Yes the car timed charge controls are currently a source of mass frustration for users, well publicised on here. The car happily overrides timed periods, as it will only times charge based on leaving at 100% SOC against a set departure time. It also measures charge rate for a few seconds when you plug in and sometimes I get a lower value than reality, it then overestimates the time to charge.

A zappi may have been the better option, but given a pod point this is as good as I've come up with..

S.
 
#9 ·
There will be some on the forum that won't have the technical inclination or time to get/setup the equipment required. Maybe you can put it together and send it to them for a nominal fee? Other members have "sold" small services on the forum and whilst it's not a mechanism to become rich, there will be appreciation for your expertise/time on the matter.
 
#10 ·
fa147 said:
51mes said:
Hi

Not sure if anyone on here has tried or posted on this before.

But I've "discovered" a relatively easy way of making my dumb podpoint "smart" charger - really smart. To do this you need 3 ingredients:

1) Raspberry PI https://www.raspberrypi.org/connected to your home network (over wifi) running raspbian (I had one lying around but you can buy what you need for about £55 or less :D ).
2) Python3 installed with the python 3 version of ardevd's jlrpy library for python control of the ipace. (it's on github: https://github.com/ardevd/jlrpy
3) The provided sample script and ini file - charge_offpeak.py/sample.jlrpy.ini (in the github repo in the examples folder).

The .ini file holds your login credentials, home charger position, charging hours, and max desired %SOC.

  • With the script running, all you need to do is plug the car in, it will start charging, until the script wakes and checks the car (every minute).
  • It uses the home charger position to only proceed when you are charging at home.
  • The script then pauses charging via the API, until the charge window opens.
  • When the window opens it resumes charging until the end of the window or max SOC is reached and it then pauses charging again,
  • Charging will resume when the window opens again..

My last 3 charges worked like a charm - feeling more comfortable about my upcoming switch to a variable tarriff now.

If folks want I can provide a writeup of the installation and configuration of the script to run as a service (auto on startup).

Ardevd - can't thankyou enough, I was gearing up to take your API descriptions and write this from those - but this does exactly what I need.

Simon,.
There will be some on the forum that won't have the technical inclination or time to get/setup the equipment required. Maybe you can put it together and send it to them for a nominal fee? Other members have "sold" small services on the forum and whilst it's not a mechanism to become rich, there will be appreciation for your expertise/time on the matter.
If there is real interest in this I'd be happy to provide a more refined solution. Also, a full Raspberry Pi is probably overkill.
 
#13 ·
I have a Linux Server (Intel Nuc) that runs 24/7 so an application that I could put on there would be great. If it was accessible via HTTP then even better.
 
#15 ·
Ardevd,

It's more than a dime - there are a number of variable tarriffs we have in the UK for those with smart meters, all designed to encourage folks to not charge between the major peak of 4pm-7pm and ideally overnight 23:00 -07:00 (though this varies supplier to supplier). peak rate can be 30-40p/KW/h, off peak can be as low as 5p KW/h.

The tariff I've just joined is 8p 23:00-07:00 then 12p 07:00-16:00 & 19:00-23:00 , 34p 16:00 - 19:00. Getting home @ about 17:30, I can plug in and forget about peak charging, with the car waiting until 23:00 to charge for 8 hours overnight. Of course if the car or the charger did this for me I wouldnt need to rely on this, but they dont - so this works well!

Getting non IT literate folks to use a docker image will be problematic - I was thinking of a pi zero W (there appears to be no stock of these anywhere though) , potentially with docker to wrap up the library. Currently it's running on my pi as a service managed via systemd and I manually edit the file..

S.
 
#16 ·
51mes said:
Ardevd,

It's more than a dime - there are a number of variable tarriffs we have in the UK for those with smart meters, all designed to encourage folks to not charge between the major peak of 4pm-7pm and ideally overnight 23:00 -07:00 (though this varies supplier to supplier). peak rate can be 30-40p/KW/h, off peak can be as low as 5p KW/h.

The tariff I've just joined is 8p 23:00-07:00 then 12p 07:00-16:00 & 19:00-23:00 , 34p 16:00 - 19:00. Getting home @ about 17:30, I can plug in and forget about peak charging, with the car waiting until 23:00 to charge for 8 hours overnight. Of course if the car or the charger did this for me I wouldnt need to rely on this, but they dont - so this works well!

Getting non IT literate folks to use a docker image will be problematic - I was thinking of a pi zero W (there appears to be no stock of these anywhere though) , potentially with docker to wrap up the library. Currently it's running on my pi as a service managed via systemd and I manually edit the file..

S.
I second that, there are a number of tariffs that are timed and the I-Pace's inbuilt mechanism is mostly as good as a chocolate tea pot. I have managed to figure out how to get the time charge to work on a Zaapi 2.0 but others may not have that level of configuration from their charger... Something like this will help and the simpler it is to plug'n'ply, the more of an update you will have.
 
#17 ·
ardevd said:
I figured I would just make a Docker image for people to use. On a side note, I'm curious to know why people need this? Are you trying to save a dime on electricity?
It's not just about saving money. It's also about being a "good EV owner" too. The reason tariffs are lower at night is because demand is lower. That's when we should be switching on our 7kW power supplies, not when everyone else is using it to power their homes in the peak demand periods. Without timed charging the grid would struggle to cope with 30 million EVs, With timed charging it can cope with minimal investment. But also, as others said, it's actually quite a big difference between peak rate one off-peak (in the UK anyway). For my supplier, electricity costs treble at peak rates.
 
#18 ·
Thanks, I'm convinced. This would be fairly trivial to implement in WattCat if all you need is the ability to set a start and stop time for charging. No need to poll the API constantly for thst. Are there any other requirements, suggestions or wishes in regards to that functionality?
 
#19 ·
ardevd said:
Thanks, I'm convinced. This would be fairly trivial to implement in WattCat if all you need is the ability to set a start and stop time for charging. No need to poll the API constantly for thst. Are there any other requirements, suggestions or wishes in regards to that functionality?
WattCatt is no good for me. I thought you were suggesting something else. Sorry! My mistake!
 
#20 ·
Abu Dhabi Dude said:
ardevd said:
Thanks, I'm convinced. This would be fairly trivial to implement in WattCat if all you need is the ability to set a start and stop time for charging. No need to poll the API constantly for thst. Are there any other requirements, suggestions or wishes in regards to that functionality?
WattCatt is no good for me. I thought you were suggesting something else. Sorry! My mistake!
I'm suggesting both ;)
 
#21 ·
ardevd said:
Thanks, I'm convinced. This would be fairly trivial to implement in WattCat if all you need is the ability to set a start and stop time for charging. No need to poll the API constantly for thst. Are there any other requirements, suggestions or wishes in regards to that functionality?
Could then timed charging be set up in WattCat? that would certainly be of interest to may of us, currently I and most others have to set a departure time in the car to get any sort of timed charging working with our chargers, that is despite my Wallbox charger having a timed charging feature built in, it only works when setting a departure time in the future in the car. Wallbox are aware of the problem but say it is a JLR software problem that is preventing me being able to use the Wallbox timed charging feature.
 
#22 ·
ardevd said:
Abu Dhabi Dude said:
ardevd said:
Thanks, I'm convinced. This would be fairly trivial to implement in WattCat if all you need is the ability to set a start and stop time for charging. No need to poll the API constantly for thst. Are there any other requirements, suggestions or wishes in regards to that functionality?
WattCatt is no good for me. I thought you were suggesting something else. Sorry! My mistake!
I'm suggesting both ;)
Aha! Then I'm back in!
 
#23 ·
Chris MC

I have a Wallbox Pulsar+ (it's the one with support for WiFi) I have no issues currently with setting a charging period for example 00:30 to 07:00 the charge period works as set. Only real issue with the WB is that If you plug in 12 hours before the start of the charging period then charging starts straight away. However, if you hit the "Pause" button charging will stop, but will start again using the time set in the app. I know there was an issue with the car not waking up when the timed period started, which was introduced with a JLR SW update end of 18 early 19 however appears to have been fixed in a later update. I have had the Wallbox since August 19 and timed charging set in the app has always worked. I have not had to set a departure time in the future in the car to get charging to start using the start time in the WB app.
 
#24 ·
JohnGriff said:
Chris MC

I have a Wallbox Pulsar+ (it's the one with support for WiFi) I have no issues currently with setting a charging period for example 00:30 to 07:00 the charge period works as set. Only real issue with the WB is that If you plug in 12 hours before the start of the charging period then charging starts straight away. However, if you hit the "Pause" button charging will stop, but will start again using the time set in the app. I know there was an issue with the car not waking up when the timed period started, which was introduced with a JLR SW update end of 18 early 19 however appears to have been fixed in a later update. I have had the Wallbox since August 19 and timed charging set in the app has always worked. I have not had to set a departure time in the future in the car to get charging to start using the start time in the WB app.
Thanks JohnGriff,

I have had the Wallbox Pulsar since April 2019, at first it worked fine scheduling a charge no problem, then there was a Wallbox software update and my I Pace had an update, since about mid May last year I have tried all sorts to get the Wallbox Pulsar to schedule a timed charge for me, but it has not worked, less than two hours ahead I can do it, anything more than that and it fails. I have spoken to Wallbox in Spain numerous times, had them test all sorts of things, I have also tested various different methods of getting it to work with my car, but nothing has worked so far, at the moment its stalemate, Wallbox say it is categorically a Jaguar problem, Jaguar say it is Wallbox, so the only way currently I can get timed charging to work is by using the Departure setup method, which works every time, but means I cannot use the charger as it is intended to be used.

I still try different things from time to time, and every time we have a new software update or hardware update, but nothing seems to work at all for some reason.

PS I know about the 12 hour thing with the WBP, but with mine I cannot get it to do anything. I know others on here have the same as me and it works for them, why mine shouldn't is a mystery.
 
#25 ·
JohnGriff said:
Chris MC

I have a Wallbox Pulsar+ (it's the one with support for WiFi) I have no issues currently with setting a charging period for example 00:30 to 07:00 the charge period works as set. Only real issue with the WB is that If you plug in 12 hours before the start of the charging period then charging starts straight away. However, if you hit the "Pause" button charging will stop, but will start again using the time set in the app. I know there was an issue with the car not waking up when the timed period started, which was introduced with a JLR SW update end of 18 early 19 however appears to have been fixed in a later update. I have had the Wallbox since August 19 and timed charging set in the app has always worked. I have not had to set a departure time in the future in the car to get charging to start using the start time in the WB app.
I got around it by programming in a permanent timer on the charger from 17:15-17:16. Charges for one minute and then stops. As long as I plug the car in after 5:16 in the morning I don't need to worry and 1 minute at peak rate is practically zero pence. No need to hit pause or anything. Just plug in and leave it.
 
#26 ·
Abu Dhabi Dude said:
JohnGriff said:
Chris MC

I have a Wallbox Pulsar+ (it's the one with support for WiFi) I have no issues currently with setting a charging period for example 00:30 to 07:00 the charge period works as set. Only real issue with the WB is that If you plug in 12 hours before the start of the charging period then charging starts straight away. However, if you hit the "Pause" button charging will stop, but will start again using the time set in the app. I know there was an issue with the car not waking up when the timed period started, which was introduced with a JLR SW update end of 18 early 19 however appears to have been fixed in a later update. I have had the Wallbox since August 19 and timed charging set in the app has always worked. I have not had to set a departure time in the future in the car to get charging to start using the start time in the WB app.
I got around it by programming in a permanent timer on the charger from 17:15-17:16. Charges for one minute and then stops. As long as I plug the car in after 5:16 in the morning I don't need to worry and 1 minute at peak rate is practically zero pence. No need to hit pause or anything. Just plug in and leave it.
I actually tried that a few weeks ago, but it still didn't work. I even set up short multiple charging periods no longer than 2 hours ahead to see if that would work, but didn't. I might try again when I can be bothered.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top