You probably know abetterrouteplanner.com
It is probably the best tool to plan a route, and to optimize where to charge.
It has a live function, which allows to adjust with the real consumption of the vehicle, by connecting an obd device and soft like EVNotify or Torque Pro.
Why not having this function with OVMS?
On abrp forum, it is explained how to send data:
https://forum.abetterrouteplanner.com/topic/97-submitting-live-data-thro...
What do you think?
Sounds like a great idea, although I’m not the one who can contribute in programming, unfortunately.
When this works, does it mean I would get updated ABRP-data on my phone through the ABRP servers, or through direct communication between my phone and the OVMS plug?
It means once it will work, you can launch abrp on your phone, and follow your route and consumption and next stop to charge in this website- app like.
That is the functional answer. I was looking for the technical answer: what is the data flow, from where to where? Does the OVMS plug communicate with the ABRP server(s) or with the phone or tablet where ABRP is running?
Yes you're right.
Technically, OVMS box will send data directly to abrp server-side through 3g/4g link. No direct info from OVMS to the phone running client-side, as it is not an existing functionality I am aware of.
Maybe we could use scripting to do it?
We could use part of this java code: https://github.com/g4rb4g3/ABRPTransmitter/blob/master/app/src/main/java...
Using the web plugin of OVMS web server, I am able in JavaScript to get vehicle data and send it to abrp.
I will test it tomorrow with a real travel to see how it works.
Unfortunately, it is not through the OVMS embedded script functionality.
I just pushed the first implementation of a HTTP API:
https://docs.openvehicles.com/en/latest/userguide/scripting.html#http
Included in edge build version 3.2.008-147-g73ae2d19 on my server (dexters-web.de), will be in edge on openvehicles.com within 24 hours.
Testing & feedback is welcome.
Regards,
Michael
wonderfull :-) something new to test now.
I'll keep you informed, thank you
Hello dar63, thank you for your great work. I installed the script as descripted. Only i get the error indentifier 'abrp' undefined. Any idea how to resolve this?
Hi, when your follow the instruction in the doc. https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/tree/ma...
And copy past the
add to /store/scripts/ovmsmain.js:
abrp = require("sendlivedata2arbp");
there is a typo, it should be:
abrp = require("sendlivedata2abrp");
Yes, i deed find the typo too. When i fixed the typo. The error was gone. Thanks
Hello. I followed the instruction on plugins side... created files, enter my_token, change car_model.
In OVMS I type Message: script eval abrp.info() and it turn me just OK.
Any idea? Anybody manage to conect OVMS to ABRP?
Best regards, Joze
Hi,
I am very sorry it doesn't work yet for you; of course I tried, but not since they changed the look and feel.
Let me try again and make it work, I will try this week and come back with answers I hope ;-)
kindly regards
David
Hi @instrukcije,
You're right, I tried to run my utility with abrp, using 'script eval abrp.onetime()', and I have as a reply a message '401 unauthorised'.
I am discussing now with the api developer, Jason, and we'll try to understand what is happening now.
I'll keep you informed.
David
Hello again,
You were right, there was a bug, following a change in the abrp server. JAson had fixed it.
So please find more explanations and screen copies to see how it works.
To install the plugin ABRP (https://docs.openvehicles.com/en/latest/plugin/abrp/README.html), you can simply use the editor of the embedded web server of the OVMS module. This editor will allow you to paste the plugin code from the documentation, and also to configure your own token and car model that you will find in th abrp website (in classic mode, https://abetterrouteplanner.com/classic ).
Don’t forget also to create/modify the ovmsmain module as described in the OVMS documentation.
Finally reboot your OVMS module.
You’re now ready. Test it with the shell page in the embedded web server using the command script eval abrp.info() and then with the command script eval abrp.onetime(). You can also do it with the mobile app. https://pasteboard.co/J47BzNs.jpg
This was a one-time configuration. Done
Now your journey will start ; you want to launch this plugin and send live data to abrp, you can simply launch it from the mobile app, in the ‘Messages’ window: write the command in the text box: script eval abrp.send(1)
start sending data: https://pasteboard.co/J47CXys.jpg
abrp live data: https://pasteboard.co/J47zyvG.tiff
shell in embedded web server: https://pasteboard.co/J47Cmvh.tiff
To stop sending data when you arrived: write the command in the text box: script eval abrp.send(0)
stop sending data : https://pasteboard.co/J47AbZ1.jpg
Ok I hope it could help you
/David
Thanks, but I still got message:
when I start script eval abrp.info().
What am I doing wrong?
https://pasteboard.co/J4yGL7C4.jpg
https://pasteboard.co/J4yH4Fk.jpg
https://pasteboard.co/J4yHihW.jpg
https://pasteboard.co/J4yHuOX.jpg
https://pasteboard.co/J4yHGRd.jpg
Try to change the quota char in omvmain.js
Thanks , working now.
I have finally got around to setting this up and to put it simply, it's great. I've wanted to have abrp integration from before I even discovered Ovms and my inital efforts with Torque Pro and a bluetooth OBD dongle were less than reliable.
As a part of getting this set up I have spotted and corrected a couple of minor bugs in the script and have also created some additional API methods for manipulating the stored configuration.
@dar63 I was intending to submit a PR for my updates. I'm a professional software developer by day but I've never actually contributed any code to an open source project before so I would be grateful of any advice.
I've also submitted a request to join the developer mailing list.
Regards,
Mike.
I have finally got around to setting this up and to put it simply, it's great. I've wanted to have abrp integration from before I even discovered Ovms and my inital efforts with Torque Pro and a bluetooth OBD dongle were less than reliable.
As a part of getting this set up I have spotted and corrected a couple of minor bugs in the script and have also created some additional API methods for manipulating the stored configuration.
@dar63 I was intending to submit a PR for my updates. I'm a professional software developer by day but I've never actually contributed any code to an open source project before so I would be grateful of any advice.
I've also submitted a request to join the developer mailing list.
Regards,
Mike.
Welcome Mike :-)
I assume this is your fork: https://github.com/inf0mike/Open-Vehicle-Monitoring-System-3
General contribution rules are outlined here: https://github.com/inf0mike/Open-Vehicle-Monitoring-System-3#development-and-contributions
To create a pull request for a single change:
We will then check your PR, tell you in case anything needs to be changed, or merge your changes.
If you continue pushing commits they will be added to the open PR. Close the PR if you want to do a larger rework. If you want to separate the PR from other work in progress, create it on a dedicated branch.
Regards,
Michael
I went onto the webpage for the ABRP plugin and noticed that the "Edit on GitHub" link is broken. Could that be fixed? Also, I'm assuming that the script linked on that page won't automatically update as the code is changed on GitHub correct?
You are correct that the "edit on github" link is broken, I am not sure where that is defined but I'm sure someone will pick that up and fix it
I can confirm however, that the code that is shown on the documentation page has updated and is the latest version. (1.3)
Mike
Hi,
I have got OVMS delivered last week, and have installed the ABRP plugin today.
The plugin seems to be working...I think
I have set the following config parametres:
config set usr abrp.url "api.iternio.com/1/tlm/leaf24" ***edit, I have set the url to https://api.iternio.com/1/tlm/leaf24
config set usr abrp.user_token "MY UUID"
config set usr abrp.car_model "nissan:leaf:12:24:other"
I have left the CONST values default in the sendlivedata2abrp.js file
I have issued the "script eval abrp.info(), script eval abrp.onetime() & script eval abrp.send(1) commands, without error
However, I created a plan in ABRP, and started driving. 25km out & back starting at 100% SOC
The SOC would not update in the app, when I got to the turnabout point, ABRP recalculated, and said that I would arrive with -300% SOC.
Not sure what I am doing wrong. The car that I have is a 2015 leaf 24 SV. I have unplugged the TCU
Hi,
Following from my previous post, have been scratcing my head a bit...
Running the script commands while connected to the OVMS wifi AP, rather than the android app, I do seem to be getting errors
Sometimes, I get ABRP::"Too many open files in system"
Not sure what is causing that, but a reboot seems to resolve
But mostly I get: ABRP::"SSL error"
I (173313) script: [sendlivedata2abrp.js:256:OnRequestFail] error="SSL error"
I (173323) ovms-server-v2: Send MP-0 PIABRP::"SSL error"
I (173383) script: [sendlivedata2abrp.js:256:OnRequestFail] error="SSL error"
I (173403) ovms-server-v2: Send MP-0 PIABRP::"SSL error"
Not sure what that means, I have searched the forum, and the OVMS webinterface, and cannot see anything that might help.
ok, I got this sorted!!!
config set usr abrp.url http://api.iternio.com/1/tlm/send
I think I was thinking about this too hard
Thaks for all the hard work, getting this setup
I need some help please.
I'm trying to save script sendlivedata2abrp.js to /store/scripts/sendlivedata2abrp.js
The script is c/p from https://docs.openvehicles.com/en/latest/plugin/abrp/README.html, I changed lines:
The rest (timer, url and cr) was already there...
If I check "EvaluateJS" I get following error:
Any suggestions how to correct this?
The second error is when I try to save the script to file on this location (or any other in /store) the system hangs and it doesn't save the file and then I get "timeout" and have to login again. Looks like it resets itself.***EDIT: I deleted some files and then managed to save it into the scripts folder.***
BLE data transfer directly to ABRP on phone ?
Would it not be great to send the collected OBD2 data directly over BLE to phone ABRP app rather than push those info out on LTE...
ABRP now supports this mode out of the box ?
https://www.iternio.com/abrp-obd
So if LTE coverage is bad, the ABRP navigation solution would still be correct.
GPS accuracy of the OVMS might also be better than using the phone GPS in ABRP.
Not too sure what it would take to enable the BLE radio of the ESP32 to act as one of those OBD2 BLE Dongles...
Here is an ESP32 based open source project that presents itself as an els327-protocol OBD dongle over BLE:
https://github.com/meatpiHQ/wican-fw