Git Product home page Git Product logo

iremote-php's Introduction

iRemote-PHP

alt text

This is a totally unofficial and not supported interface for BMWs iRemote private API.

Your use of these API calls is entirely at your own risk. They are neither officially provided nor sanctioned.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This is simply a bunch of curl calls that I wrapped up using PHP, all the credit and hard work was done by others and https://github.com/edent/BMW-i-Remote was my main source of information. Currently this sends the status of an i3 (or i8) to slack whenever it's status changes.

About

This currently posts the status of your car whenever anything changes or whenever the status script is called. I have designed it to be run as a cron process. I would suggest not hammering the private API and make a call once every 5 minutes. Once your config setting are correct the code will take care of authentication and expired tokens etc.

Everything here has been copied from here, Which was the original and fantastic python implementation of API calls to ConnectedDrive.

Requirements

  • A BMW connected to BMWs ConnectedDrive service
  • A PHP server (5.3 or later) (A raspberry PI would be perfectly fine for this)
  • PHP Composer
  • The ability to setup a cronjob
  • Write access to configs directory

How To Setup

Saving Access Tokens and previous statuses

Once a token has been requested it's good for 8 hours, so rather that making multiple unnecessary requests the token gets written into the configs directory for future use. This will automatically get refreshed when needed. The timestamp and event information is also written to a json file in the configs directory, this is so you don't get a slack message every time the script has run and nothing has changed.

Unknowns etc

I have only tried this with my i3, I assume you will get much the same results if you have an i8. Currently to date BEV i3's will want to make a little change so they don't get REX specific info, this will probably be a config setting or even an API call to sort out at some point.

It is possible to send requests to your vehicle such as unlock the doors etc. I purposely haven't coded these request because it's not something I honestly think is a good idea to do yourself. The calls are all documented here if you decided you want to use them. But I'm happy for this to just be a readonly set of functions at the moment.

This is my first 'proper' open source code, so it is without doubt rough around the edges. Please feel free to submit pull requests with changes/improvements etc.

iremote-php's People

Contributors

thickey256 avatar

Watchers

James Cloos avatar XiaoGai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.