openvehicles / Open-Vehicle-Android

Android App for OVMS
Other
54 stars 45 forks source link

Set SoC limit via the app? #138

Closed glynhudson closed 2 years ago

glynhudson commented 2 years ago

The new feature (https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/676) for Leafs which allows a SoC limit to be set is very useful. Is there anyway this limit could be set or adjusted via the app? Is there a command to do it via the MSG window?

Screenshot 2022-01-13 22 10 58

dexterbg commented 2 years ago

@mjkapkan has already added the corresponding labels to the features editor (https://github.com/openvehicles/Open-Vehicle-Android/commit/6c5172b3596f1b8dc5a726ceb7c499fbc0556151). The change hasn't been release in the App store yet, but the features should work.

You can also generally send nearly all shell commands via the messages page as well as via the command API. Only commands requiring an interactive shell won't work this way.

So all configuration parameters can be listed by config list […] and set by config set … (see command help).

If a configuration instance hasn't been set yet, you need to know the config instance names, which can be found in the documentation… that is, if someone added this info to the documentation. Unfortunately, this info is missing from the Leaf section.

It could look like this: https://docs.openvehicles.com/en/latest/components/vehicle_renaulttwizy/docs/configuration.html

…and as the Leaf used the same config names & feature numbers as the Twizy, you can copy these two rows:

suffrange | … | F11 | Sufficient range [km] (Default: 0=disabled)
suffsoc   | … | F10 | Sufficient SOC [%] (Default: 0=disabled)

So even with feature labels missing you can now set feature 10 to configure the SOC limit, or do config set xnl suffsoc … in the messages page.

Regards, Michael

mjkapkan commented 2 years ago

@glynhudsonII Exactly as Michael wrote. This already works. Just that the labels will come with the next app release. More details: https://github.com/openvehicles/Open-Vehicle-Android/issues/135

mjkapkan commented 2 years ago

@dexterbg In the Leaf features UI accessible from Web GUI we have quite detailed descriptions of all the features in there. So I am not sure we need to duplicate that in the documentation. Maybe there is a better way to sync that so both docs and UI has the same source.

dexterbg commented 2 years ago

The web UI help isn't meant to replace the documentation, it may also not be accessable to a user working remotely on the module. The goal of a UI help is to be concise, while the manual is meant to provide details & additional info. It's possible to derive the manual from the source code, but that has some shortcomings (e.g. embedding images & tables).

mjkapkan commented 2 years ago

@dexterbg Agreed. I will update the docs. As for the feature config in app. There are actually two more variables which I think should be useful for the app users.

suffrangedrop suffsocdrop

They basically describe when to charge battery again after it is fully charged and still connected to the charger. For example, if your SOC limit is 90% and SOC drop is 5%, it will charge to 90% and stop. But if after some time the battery drops below 85% it will start the charge again.

glynhudson commented 2 years ago

Thanks, this worked. Setting feature 10 to 80 set the SoC limit to 80% 👍

Screenshot_20220131-012101

glynhudson commented 2 years ago

It would be fantastic if a UI for setting the charge limit could be added to the app 🤞

mjkapkan commented 2 years ago

Yeah I thought about it. But I think we need to add this charge limit feature as a global object/function to the module first, so it can be utilized with any vehicle. I am no expert in C so would need a lot of guidance from @dexterbg before attempting to do it.