Page 1 of 2

BMW ConnectedDrive Integration

PostPosted: Tue Oct 02, 2018 3:41 pm
by ryanbuckner
My 2019 540ix has SmartThings support. Is there a way to integrate Indigo through an existing plugin or fooling BMW ConectedDrive into thinking Indigo is a SmartThings product?

Re: BMW ConnectedDrive Integration

PostPosted: Wed Oct 03, 2018 3:59 pm
by durosity
I’m gonna guess no, not directly.. but if you buy a SmartThings hub there’s a plug-in to integrate that into indigo so that’d quite possibly work.

What can you do with this integration between the car and indigo?


Sent from my iPhone using Tapatalk

Re: BMW ConnectedDrive Integration

PostPosted: Wed Dec 05, 2018 2:13 am
by juntta
ConnectedDrive data contains similar data as other brands online services: door/hood lock status, location, car charge (EVs, PHEVs), fuel amount, mileage, service information etc. Its also possible to start cooling/heating remotely, lock/unlock doors, flash lights, set charging times (EVs, PHEVs).

I have slightly different approach with BMW ConnectedDrive and integrating Indigo: direct connection to ConnectedDrive with python scripts and use HomeKit devices to control car. I have modified python scripts found from web which can pull car(s) data from ConnectedDrive servers and execute some services (etc. pre cool/heat) with car. Then use variables & virtual devices published to HomeKit with HomeKit Bridge. For example, I get pushover notification if I have arrived home and haven't plugged car in or locked the doors. Unfortunately car cannot plug itself to charger but Indigo can lock it or I can do it manually with HomeKit.

I'm planning to turn these into plugin but lack of time and not-so-great coding skills have been postponing this for a while...

Re: BMW ConnectedDrive Integration

PostPosted: Tue Feb 26, 2019 1:15 pm
by ryanbuckner
@
juntta wrote:
ConnectedDrive data contains similar data as other brands online services: door/hood lock status, location, car charge (EVs, PHEVs), fuel amount, mileage, service information etc. Its also possible to start cooling/heating remotely, lock/unlock doors, flash lights, set charging times (EVs, PHEVs).

I have slightly different approach with BMW ConnectedDrive and integrating Indigo: direct connection to ConnectedDrive with python scripts and use HomeKit devices to control car. I have modified python scripts found from web which can pull car(s) data from ConnectedDrive servers and execute some services (etc. pre cool/heat) with car. Then use variables & virtual devices published to HomeKit with HomeKit Bridge. For example, I get pushover notification if I have arrived home and haven't plugged car in or locked the doors. Unfortunately car cannot plug itself to charger but Indigo can lock it or I can do it manually with HomeKit.

I'm planning to turn these into plugin but lack of time and not-so-great coding skills have been postponing this for a while...


juntta, I was able to do the same thing for my last BMW (probably similar .py scripts pulled from web). But it requires you to reverse engineer the header information.

Do you have a reliable way of getting the right IDs for your ConnectedDrive account?

Re: BMW ConnectedDrive Integration

PostPosted: Wed Feb 27, 2019 12:48 am
by juntta
Actually the old method (intercept traffic between Android app & BMW servers) to get access keys is no longer needed.

BMW has released new version of api sometime last summer and I had to fix my scripts then. New api needs only ConnectedDrive credentials (email & passwd) to login and if I remember right it uses OAuth authentication.

New scripts were done by jupe76 in GitHub where I found them. I can dig them out if needed but should be found with authorname or keyword Bmwcdapi

Re: BMW ConnectedDrive Integration

PostPosted: Wed Feb 27, 2019 9:26 am
by ryanbuckner
Thank you @juntta. This is extremely helpful.

I have the scripts. Do you have any tips on the changes you needed to make to have it work with Indigo?

Re: BMW ConnectedDrive Integration

PostPosted: Fri Mar 08, 2019 12:28 am
by Turribeach
Hi, I’m interest in this too. I have downloaded the script and it looks pretty easy to make into a plugin. I will give it a go as my first plugin as I have looking for something like this to jump into. I will let you know.

BMW ConnectedDrive Integration

PostPosted: Fri Mar 08, 2019 12:40 am
by juntta
Turribeach wrote:
Hi, I’m interest in this too. I have downloaded the script and it looks pretty easy to make into a plugin. I will give it a go as my first plugin as I have looking for something like this to jump into. I will let you know.


If you want, I can send my versions of those scripts which already contain basic integration to Indigo but not in form of plugin.

Just PM your email to me and I’ll share

Re: BMW ConnectedDrive Integration

PostPosted: Fri Mar 08, 2019 2:00 am
by Turribeach
juntta wrote:
Turribeach wrote:
Hi, I’m interest in this too. I have downloaded the script and it looks pretty easy to make into a plugin. I will give it a go as my first plugin as I have looking for something like this to jump into. I will let you know.


If you want, I can send my versions of those scripts which already contain basic integration to Indigo but not in form of plugin.

Just PM your email to me and I’ll share


Great thanks!

Re: BMW ConnectedDrive Integration

PostPosted: Fri Mar 08, 2019 2:38 am
by juntta
Email with scripts sent. :wink:

It would be great if you know plugin structure and have time to turn those scripts to plugin. Basically those scripts and bunch of variables, triggers, action groups & scheduled actions work now but bit hard to setup and my setup has few hardcoded things to fit my needs which wont suit for everyone.

I'm willing to help and consult at least, my coding skills are somewhat limited so they wont offer so much help :oops:

Re: BMW ConnectedDrive Integration

PostPosted: Fri Mar 08, 2019 11:15 am
by loafbread
I am also interested in seeing a plugin for connected drive. Your work will be greatly appreciated.

Re: BMW ConnectedDrive Integration

PostPosted: Tue Mar 12, 2019 6:35 pm
by loafbread
I just found this set of python libraries for BMW ConnectedDrive. I have not tried them but they look pretty complete.
https://bimmer-connected.readthedocs.io ... index.html
https://github.com/m1n3rva/bimmer_connected

Re: BMW ConnectedDrive Integration

PostPosted: Wed Mar 13, 2019 12:29 am
by Turribeach
I already have the script from jupe76 working in the command line. I need to look at what juntta sent me and create the plugin but it should be easy. I just haven’t been able to get time for this.

Re: BMW ConnectedDrive Integration

PostPosted: Wed Mar 13, 2019 1:20 am
by juntta
Turribeach wrote:
I already have the script from jupe76 working in the command line. I need to look at what juntta sent me and create the plugin but it should be easy. I just haven’t been able to get time for this.


Yep, same issue here - free time for this has been biggest issue to me as well to get this forward.

And those home assistant scripts needs rewrite anyway to get Indigo side running AND if I remember right they were Python 3 so little extra work there as well. I've already replaced Python 3 functions on my scripts.

Re: BMW ConnectedDrive Integration

PostPosted: Wed Oct 02, 2019 11:32 am
by ryanbuckner
Was there any more progress made here towards a plugin? I still have a standalone script getting API info.