Using the BMW Connecteddrive API from OVMS
Hi, One way to "command" the BMW/Mini cars is with the BMW ConnectedDrive app. This talks to REST APIs on BMW servers around the place. This API has been sniffed by others and seems simple to use. The actual delivery of the command to the car is deathly slow - at least here in South Africa. I think it actually sends the car an SMS to kick things off. And it doesn't always work. Still, it does allow things like unlock / lock / climatise and what have you. I expect I can come up with some sort of "noop" operation that boils down to "wake up the car" which would be helpful to get fresh state from the car from time to time. Would you be OK with taking a PR for the bmwi3 vehicle module that uses this? Are there any available frameworks for calling HTTP/JSON/REST APIs from the C++ code? Thanks, Steve -- https://www.telviva.co.za/legal/email-disclaimer <https://www.telviva.co.za/legal/email-disclaimer>
Hi Steve, great job you are doing on the i3 :-) I would like to suggest to keep a feature using BMW's REST API optional in your module. Ideally as "OPT-IN" from the WebUI. OVMS users like me use OVMS as a complete replacement for any "calling home" functionallities by the manufacturer. For privacy reasons I don't want to be forced to set up an account at the manufacturer. I think OVMS should best be useable without forcing the user to have to register with the manufacturer (and therefor will be tracked by the manufacturer). If a user decides to do so, no problem. But the module should be able to work without connection to the manufacturer, I believe. Again, great job you are doing. My neighbor owns an i3. He is thinking about using OVMS now too :-) Greetinx from Bavaria (50km away from Munich) Chris Am Freitag, den 19.02.2021, 10:29 +0200 schrieb Steve Davies:
Hi, One way to "command" the BMW/Mini cars is with the BMW ConnectedDrive app. This talks to REST APIs on BMW servers around the place.
This API has been sniffed by others and seems simple to use.
The actual delivery of the command to the car is deathly slow - at least here in South Africa. I think it actually sends the car an SMS to kick things off. And it doesn't always work. Still, it does allow things like unlock / lock / climatise and what have you.
I expect I can come up with some sort of "noop" operation that boils down to "wake up the car" which would be helpful to get fresh state from the car from time to time.
Would you be OK with taking a PR for the bmwi3 vehicle module that uses this?
Are there any available frameworks for calling HTTP/JSON/REST APIs from the C++ code?
Thanks, Steve
https://www.telviva.co.za/legal/email-disclaimer_____________________ __________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
Hi Chris, Thanks for the reply. I agree that such a thing should be opt-in and respect the preference of users like you. For me the biggest annoyance is that I can't find a way to wake up the car from the OBD2. So this seems like a way to do it Perhaps there is a way and I need to go back to experiments. If I can find the number of the SIM somewhere perhaps it would be sufficient to send it an SMS in the right structure directly and that would be enough to kick the car to life. My car indeed is a long way from home but it does love the mild climate of Cape Town - never snow, frost and rarely single digit temperatures. I have been in Munich, Berlin, Frankfurt, Dortmund - and Germany is a very interesting place. Steve On Fri, 19 Feb 2021 at 10:54, Chris van der Meijden <chris@arachnon.de> wrote:
Hi Steve,
great job you are doing on the i3 :-)
I would like to suggest to keep a feature using BMW's REST API optional in your module. Ideally as "OPT-IN" from the WebUI.
OVMS users like me use OVMS as a complete replacement for any "calling home" functionallities by the manufacturer. For privacy reasons I don't want to be forced to set up an account at the manufacturer. I think OVMS should best be useable without forcing the user to have to register with the manufacturer (and therefor will be tracked by the manufacturer). If a user decides to do so, no problem. But the module should be able to work without connection to the manufacturer, I believe.
Again, great job you are doing. My neighbor owns an i3. He is thinking about using OVMS now too :-)
Greetinx from Bavaria (50km away from Munich)
-- https://www.telviva.co.za/legal/email-disclaimer <https://www.telviva.co.za/legal/email-disclaimer>
Hi Steve, I've never been to South Africa, but I always enjoy speaking to South Africans Dutch to Afrikaans. Always fun, the similarities but mostly the differences garanty smiles :-) We had the same awake problem on the VW e-Up. That was the reason why I decided to go the way directly over the CAN Messages on the Komfort- CAN. Later we start developing the OBD part too and now we brought both worlds together in one vehicle module. This approach has the advantage, that we can manipulate the car directly on the CAN bus (climate remote control, wake up), but also get the goodies from the system via OBD. Disadvantage is that we need a more complex wiring and we had to find access to the Komfort-CAN and had to reverse engineer the Komfort-CAN Message-IDs. But we can wake up the car. Some cars do also have extra "wake up" lines for OBD that can be used to trigger a wake up. I'm afraid you'll need loads of time of digging the internet to find the right solution. But it is worth it. Greetinx Chris Am Freitag, den 19.02.2021, 11:58 +0200 schrieb Steve Davies:
Hi Chris,
Thanks for the reply. I agree that such a thing should be opt-in and respect the preference of users like you.
For me the biggest annoyance is that I can't find a way to wake up the car from the OBD2. So this seems like a way to do it Perhaps there is a way and I need to go back to experiments.
If I can find the number of the SIM somewhere perhaps it would be sufficient to send it an SMS in the right structure directly and that would be enough to kick the car to life.
My car indeed is a long way from home but it does love the mild climate of Cape Town - never snow, frost and rarely single digit temperatures. I have been in Munich, Berlin, Frankfurt, Dortmund - and Germany is a very interesting place.
Steve
On Fri, 19 Feb 2021 at 10:54, Chris van der Meijden <chris@arachnon.d e> wrote:
Hi Steve,
great job you are doing on the i3 :-)
I would like to suggest to keep a feature using BMW's REST API optional in your module. Ideally as "OPT-IN" from the WebUI.
OVMS users like me use OVMS as a complete replacement for any "calling home" functionallities by the manufacturer. For privacy reasons I don't want to be forced to set up an account at the manufacturer. I think OVMS should best be useable without forcing the user to have to register with the manufacturer (and therefor will be tracked by the manufacturer). If a user decides to do so, no problem. But the module should be able to work without connection to the manufacturer, I believe.
Again, great job you are doing. My neighbor owns an i3. He is thinking about using OVMS now too :-)
Greetinx from Bavaria (50km away from Munich)
https://www.telviva.co.za/legal/email-disclaimer_____________________ __________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
On Fri, 19 Feb 2021 at 12:58, Chris van der Meijden <chris@arachnon.de> wrote:
I've never been to South Africa, but I always enjoy speaking to South Africans Dutch to Afrikaans. Always fun, the similarities but mostly the differences garanty smiles :-)
We''re going off-topic, but I know "volstruis" and "struisvogel". -- https://www.telviva.co.za/legal/email-disclaimer <https://www.telviva.co.za/legal/email-disclaimer>
Or verkleurmannetjie - kameleon :-) But you're right we're going off topic ... Am Freitag, den 19.02.2021, 13:10 +0200 schrieb Steve Davies:
On Fri, 19 Feb 2021 at 12:58, Chris van der Meijden <chris@arachnon.d e> wrote:
I've never been to South Africa, but I always enjoy speaking to South Africans Dutch to Afrikaans. Always fun, the similarities but mostly the differences garanty smiles :-)
We''re going off-topic, but I know "volstruis" and "struisvogel".
https://www.telviva.co.za/legal/email-disclaimer_____________________ __________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
Steve, as Chris already said, if it's an opt-in feature the user needs to actively confirm, I don't see an issue with including it. Regarding HTTP requests, the current approach would be either using the new OvmsNetHttpAsyncClient class (components/ovms_netlib/ovms_nethttp), or using Mongoose directly. OvmsNetHttpAsyncClient is meant as a replacement for the old http-only OvmsHttpClient (main/ovms_http), but hasn't been used in the master branch yet. There is some new work on this in the for-v3.3 branch by Chris regarding timeout handling, but the class should work in master as well. An example on using the Mongoose TCP API is in the Pushover class, and another one in the DuktapeHTTPRequest class using the Mongoose HTTP API. Mark has included a JSON parser in the for-v3.3 branch, if you need one, have a look at that first. Regards, Michael Am 19.02.21 um 09:29 schrieb Steve Davies:
Hi,
One way to "command" the BMW/Mini cars is with the BMW ConnectedDrive app. This talks to REST APIs on BMW servers around the place.
This API has been sniffed by others and seems simple to use.
The actual delivery of the command to the car is deathly slow - at least here in South Africa. I think it actually sends the car an SMS to kick things off. And it doesn't always work. Still, it does allow things like unlock / lock / climatise and what have you.
I expect I can come up with some sort of "noop" operation that boils down to "wake up the car" which would be helpful to get fresh state from the car from time to time.
Would you be OK with taking a PR for the bmwi3 vehicle module that uses this?
Are there any available frameworks for calling HTTP/JSON/REST APIs from the C++ code?
Thanks, Steve
https://www.telviva.co.za/legal/email-disclaimer <https://www.telviva.co.za/legal/email-disclaimer>
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
participants (3)
-
Chris van der Meijden -
Michael Balzer -
Steve Davies