Skip to content

Instantly share code, notes, and snippets.

@mountbatt
Last active March 24, 2023 06:01
Embed
What would you like to do?
Scriptable iOS widget that displays the status of your Renault ZOE on your iPhone and iPad.
/* Das Widget ist auf Grund von Beschwerden von Renault vorrübergehend entfernt */
/* Le widget a été temporairement supprimé suite à une plainte de Renault. */
/* The widget is temporarily removed due to complaints from Renault */
@Tuedderbueddel
Copy link

Ah, dann ist es klar. Danke!

@wopfel
Copy link

wopfel commented Jul 1, 2022

When carNumber is an empty string, it is set to 0. In the next few code lines, the variable is decremented by 1, so it gets -1 then. A negative array index would be used then.

https://gist.github.com/mountbatt/772e4512089802a2aa2622058dd1ded7#file-zoe-widget-js-L449

Maybe this would fix it?

			if(carNumber == ""){ // fallback
				carNumber = 0;
			} else {
				// set correct carNumber to array (starts with 0)
				carNumber = carNumber - 1;
			}

@mountbatt
Copy link
Author

@wopfel Thanks … I updated the code …

@matzZz
Copy link

matzZz commented Aug 22, 2022

Hi, is there a solution to stop the charging at a specific % of charge?

@mountbatt
Copy link
Author

Hi, is there a solution to stop the charging at a specific % of charge?

Not with this widget! This widget only runs while you open it. And your iPhone decides when to refresh it. So no background activity / Monitoring etc is possible. This behavior is by design from Apple!

@codex-20
Copy link

Hi Mountbatt.

This is an awesome script. Many many thanks for taking the time to code it. I guess you’re a Zoe owner yourself!

My only suggestion would be to modify the code so that the language to be displayed is not hard coded in to the script but available to easily modify at the top with the rest of the user defined variables.

Thank you again in any case!

@RaMaHW
Copy link

RaMaHW commented Jan 16, 2023

Hi Mountbatt,
Thanks for the script, I have been using it successfully and frequently since almost the beginning.
FYI, I am currently getting some off values for the remaining charge. The attached result for a 52kWh ZOE. As far as I can tell from the log, the 13kWh is reported by the renault server.
8F6DD730-BE18-4A61-8023-6916F37EFA6D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment