Auto limit EV charge to 80%

Why would you create software to stop charging your car at 80% ?
Because we both work from home, usage of our electric car is very irregular. On some days we use the car for several short trips, while at other times the car is not used several days in a row. No predictable daily commute along the very same route for us.Because of this usage pattern, or lack of it, we like to top up the battery to 80% at the end of each day when we used the car. That way the vehicle is ready for its next use whenever that may be. We attempt not to charge it to 100% because I dislike the situation where the car is fully charged and not used for several days. Although research and opinions differ on whether this is harmful for the battery’s longevity, I choose to take a conservative approach on this.Early models of the Nissan Leaf (2011-2012, and up to about 2014 for UK models) had a build-in option to set a charge-timer with a limit to 80%. Just plug it in and the car itself would stop the charging process once the battery reached 80% SOC (state of charge). As ours is a later model (2016 30kwh Japanese import), this option is not available to us. Neither is the CarWings or Nissan Connect app operational in New Zealand.Over time I trialed various methods which improved with each iteration, leading up to the fully automatic limit system that we currently use.

Estimate time needed and set an alarm

When we just bought the car, it only took a couple of days to figure out that when plugged in via our slow 3 pin EVSE (Electric Vehicle Charging Equipment, basically just a charge cable with some safety electronics build in), the charge would increase by about 6% per hour. So whenever we came home, we would do a rough calculation of the time needed. For example, to charge from 58% to 80% is a 22% increase, which would take a bit less than 4 hours. Set an alarm clock on my mobile phone and plug-out when the alarm rings. That worked pretty well most of the time, unless I got distracted after the alarm and forgot to plug out. Or unless we came home after 11pm.

OVMS for feedback while charging

After a couple of months I ordered an OVMS module online. Open Vehicle Monitoring System is an open source project that has developed the hardware and software to monitor various brands and models of electric cars. The module connects to the car via the OBD-II diagnostics port (like a LeafSpy dongle). A short cable allows the module to be neatly and safely tucked away in the foot-well on the driver’s side. The module can be ordered ready to go for about NZ $300, or can be soldered together yourself.Every couple of seconds the module sends status information about the car to a central server. It will either do this using our own WiFi if we are parked at home, or on the road via a mobile phone sim-card inserted into the module (data use is low, I use a prepaid Vodafone sim which I need to top-up with NZ $20 once a year).

A mobile phone app on IOS and Android allows you to see the status of your car. So once the alarm goes off, or if I don’t trust my estimated stop time, I can use my phone to check on charging progress.

For some brands and models OVMS allows you to remotely start and stop charging using the app. Unfortunately, this is not possible for the Nissan Leaf, hence we still have to go to the car to unplug.

Note that the OVMS module has many more features that are outside the scope of this blog.

Evnex charge-point

About half a year ago our electricity network provider announced they were going to do a test to learn more about the charging habits of electric vehicle owners. They installed a free charge-point (an Evnex R-Series) on our property in exchange for letting them inspect our electricity usage for half a year.

Although the charge-point is pretty smart, it has no way of knowing what kind of car it is charging and how far the charge has progressed. This is a limitation of the type-1 and type-2 charge methods (cable, hardware, protocol, etc). On the faster CHAdeMO chargers this information is provided by car to the charge-point, but those chargers come with a hefty price tag.

However, Evnex does provide an app that allows to monitor the charge-point. It allows you to see the history of charging sessions and whether a charge session is in progress right now. Also, the app has a button to remotely stop the current charge session.

While we still need to make an estimate of the required time and set an alarm, we can now remotely verify and monitor charge progress and stop charging without having to go outside to unplug the car.

Automatic stop

Other than the app, Evnex does not provide any method to view the status of the charge-point. They have indicated they might provide an API (Application Programming Interface, a way for software to talk to it) at some point in the future, but haven’t given a date for it.

Determined to not being stopped by that inconvenience, I spend a weekend to reverse-engineer the communication to and from the Evnex app.

I had already developed software to be able to talk to the OVMS Server to extract information about our own car. Combined with the knowledge of how the Evnex app communicated I was now ready to develop a fully automated solution to charge to 80%.

The full solution works like this:

  • My software is continuously running to monitor our car via the OVMS module. At first I used a spare pc in my home office for this; it was running anyway to monitor our solar panels. Later I moved both these functions onto a tiny Raspberry Pi computer (about NZ $ 70).
  • When it detects the vehicle is charging it will also check whether the charge-point is currently charging something. Furthermore, it will determine whether car and Evnex charge-point are in close proximity (both can detect their GPS-location). If so, the software assumes the charge-point is currently charging our car.
  • When charging reaches 80%, a stop command is issued to the Evnex charge point. Charging will stop without needing to unplug.

This solution has now been up and running reliably for the past half year.

Open source

I often build my own programs using software components that are generously made available by other developers as open source. To give back to this community, I decided to share key parts of my solution in Github. Since I like to develop using C#, all are based on .NET Core:

For anyone interested in adding an OVMS module to their car, you would need the following components:

And a comprehensive video of the setup can be found here (the last 10 minutes are specific to the Kia e-Niro).


UDOCX – Cloud solution for multi-function peripherals

UDOCX (Unified DOCument eXchange) brings new and enhanced features to existing MFP devices that were not possible before, i.e. scan-to-email, scan-to-fax, scan-to-SharePoint and online printing. Through the combination of Office 365 and UDOCX, users can work more efficiently, save costs on licenses and contribute to environmental protection.

The strength of UDOCX comes from its simplicity of usage. Users can easily accomplish common workflow tasks in UDOCX from the MFP just as they would from their desktop. Users log in via the browser of the MFP using their standard Windows credentials resulting in fast and secure authentication with no administrator intervention required.

UDOCX not only stores information but sends it securely and helps organizations maintain regulatory compliance. The system offers users direct access to their personal contacts so that messages are always addressed correctly. Email and fax messages that are sent to multiple addresses by UDOCX are processed and confirmations are sent to the user’s inbox. Everything that the user does is monitored and recorded by a central logging system for security and accountability.

The uniqueness of UDOCX is that there is no need for separate software or hardware, no maintenance, and no additional administrative workload.

UDOCX scan on YouTube
UDOCX print email on YouTube


Fax over IP

Send faxes using fax over IP and take advantage of cost savings, easier and streamlined processes and promoting a green environment.
Voice over IP has proven that it’s possible to take a traditionally analog signal, package it and chop it up to be transported over a digital IP network. It cuts the phone bills, it allows companies to maximize their return on network investments and it enables all sorts of neat applications, like voicemail/email integration.

If it works for voice, why wouldn’t it work for fax?
It does, thanks to a protocol called T.38, better known as Fax over IP (FoIP). FoIP delivers similar advantages as VoIP. Fenestrae Faxination Server and Fenestrae Communications Server both offer a Fax over IP Transport Service that allows you to profit from the following:

Lower hardware and maintenance costs

Although a number of fax boards support FoIP, it’s possible to eliminate the use of fax hardware altogether by using a software-only fax server that connects directly to your IP-enabled PBX. Less hardware means less installation, training, maintenance, and lower costs.

Virtualization benefits

By using a software-only fax solution based on Fax over IP, it is possible to run your fax servers in a virtual environment, with all the ususal benefits: more efficient CPU (Central Processing Unit) usage, less power consumption, lower hardware costs, lower space requirements, etcetera.

Work greener

Using a desktop fax solution in combination with IP faxing allows you to use fewer fax machines or eliminate them entirely, resulting in less toner, paper, and power consumption while lowering your carbon footprint and your operational costs.

Lower phone bills

By using your company’s IP network instead of the Public Switched Telephone Network (PSTN) for all or part of the fax’s route, you can avoid long distance or international transmission charges and lower your telephony bills. In addition, using one or more centralized fax servers may reduce the number of fax lines you need.

Unified Communications

Using your existing IP infrastructure to send and receive faxes allows for easier integration with business applications, email and messaging applications. Employee efficiency will increase by routing incoming fax messages intelligently to any desktop, business application or workflow.