Sometimes the need arises to access the data that is available for en EV with an online connection from outside the app of the manufacturer. I have seen a lot of solutions for getting the SoC or other data from the Zero bikes.
Since the SR/F comes with its own connectivity and companion app I needed to get access to the data in the Zero cloud from outside the Zero NextGen App.
I have a smart Wallbox solution which supports smart charging modes depended on the EVs SoC. So I wrote a plugin for the smart Wallbox solution
OpenWB. In order to accomplish this I had to reverse engineer the Webservice calls from the Zero NextGen app to the cloud backend.
Now here it comes. Code examples are for experienced users using Terminal on Linux or Mac.
In order to gain access to the cloud data you have to identify the service specific unitnumber for your vehicle. This can be accomplished by the following simple call to the Zero NextGen Backend:
curl -s --http2 -G https://mongol.brono.com/mongol/api.php?commandname=get_units -d format=json -d pass=<ZERONEXTGENPASSWORDFROMAPP> -d user=<ZERONEXTGENUSERNAMEFROMAPP>
You can pass this JSON output to
jq to make it readable. Or you just note the value of
unitnumber for the actual call for the relevant values.
curl -s --http2 -G https://mongol.brono.com/mongol/api.php?commandname=get_last_transmit -d format=json -d user=<ZERONEXTGENUSERNAMEFROMAPP> -d pass=<ZERONEXTGENPASSWORDFROMAPP> -d unitnumber=<ZERONNEXTGENUNITNUMBERFROMABOVE>
Same here: Pass the output to
jq in order to have a formatted JSON output.
There are some relevant values and some not so relevant values. Relevant values include: VIN, mileage, software_version (do not know how reliable though), longitude, latitude, altitude, velocity, heading, main_voltage, address, soc.
If you are interested in a very smart Wallbox and living in Europe I strongly suggest to look at
OpenWB. Zero NextGen Support comes out-of-the box, just username and password needed to configure.
Hope this helps someone.