Giter Club home page Giter Club logo

bmwcdapi's People

Contributors

jupe76 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bmwcdapi's Issues

Add LifeTimeList ?!

Hi, some quite useful information are stored here:
lifeTimeList []
scoreList [{'attrUnit': 'KWH_PER_100KM', 'attrName': 'AVERAGE_ELECTRIC_CONSUMPTION', 'lifeTime': 14.9, 'minValue': 0.0, 'maxValue': 40.0}, {'attrUnit': 'KWH_PER_100KM', 'attrName': 'AVERAGE_RECUPERATED_ENERGY_PER_100_KM', 'lifeTime': 4.9, 'minValue': 0.0, 'maxValue': 20.0}, {'attrUnit': 'KM', 'attrName': 'CUMULATED_ELECTRIC_DRIVEN_DISTANCE', 'lifeTime': 64.0, 'minValue': 0.0, 'maxValue': 65.0}, {'attrUnit': 'KM', 'attrName': 'LONGEST_DISTANCE_WITHOUT_CHARGING', 'lifeTime': 24.0, 'minValue': 0.0, 'maxValue': 170.0}]
execStatusCode=0

Could you explain how to add them in bmwcdapi.py or integrate them by yourself?

BTW: The LASTTRIP_DELTA_KM out of lastTripList was deactived? Why? I added it again - worked fine

Authorization issues

The website used does not work anymore, the script needs to be updated with the new login system.

BMW ConnectedDrive in the US is not able to work with the script

I am based in the US and using https://connecteddrive.bmwusa.com where I can login and see my car. As a test I figured I would look for a global ConnectedDrive site and found this one: https://www.bmw-connecteddrive.my

After I completed the register process I am no longer getting the UN & PW error. However, when I try to add my vehicle there it says it cannot validate this vehicle. So obviously this plugin was written for EU based cars but has issues with the US ConnectedDrive version.

Error msg preventing the script from working

This is the error message I am getting in the openhab log:

2019-01-04 15:16:03.513 [INFO ] [ipse.smarthome.model.script.bmwcdapi] - forced connectedDrive API call
2019-01-04 15:16:03.674 [INFO ] [ipse.smarthome.model.script.bmwcdapi] - Traceback (most recent call last):
  File "/etc/openhab2/scripts/bmwcdapi.py", line 23, in <module>
    import requests
ImportError: No module named 'requests'

Trying to run the command manually with '-p' I am getting the following:

[15:20:32] openhabian@openHAB:/etc/openhab2$ sudo python scripts/bmwcdapi.py -p
[sudo] password for openhabian: 
Traceback (most recent call last):
  File "scripts/bmwcdapi.py", line 25, in <module>
    import urllib.parse
ImportError: No module named parse

Any thoughts what may be the reason.

Sending a charging request to my i3?

I don't know if this is the right place to post this but here goes.....

Has anyone managed to send a request to their BMW to setup charging?
Ideally I would like to replicate the ConnectedDrive functionality with the off-peak charging option and a departure time.
I'm able to hack around with Python code but I can't find any examples of this to get me started.

Thanks
Jez

BMW M8 competition support

Hello, My name is Kenneth Whymns, I was testing this using a BMW I3 and works like a charm, is it possible to add the M8 competition support for this? thank you

Problem with Authentication

Hello,

Got a problem when i'm running the script.
It only shows the message: ...running bmwcdapi.py could not authenticate, user or password wrong?

The passwort is correct and i can login at https://www.bmw-connecteddrive.de/

Is there anything i have to change in the script to access the german API?

removed soc_hv_percent

Thank You for keeping this alive.

Can you tell why you removed soc_hv_percent from integration?

if('soc_hv_percent' in map): self.ohPutValue("Bmw_socHvPercent",map['soc_hv_percent'])

As far as i can see that value is still available on "-p" call:

mileage 52159 Segment_LastTrip_time_segment_end_formatted_time 18:00 beMaxRangeElectricMile 55.0 Segment_LastTrip_time_segment_end_formatted 08.01.2020 18:00 lastChargingEndResult UNKNOWN check_control_messages unitOfEnergy kWh beRemainingRangeElectric 89.0 soc_hv_percent 77.5 single_immediate_charging isUnused updateTime_converted_time 22:47

Thank You!

Does this still work?

Please can anyone say whether this still works or whether BMW has finally denied us access to our data?

Issue with calling API

Hi, I'm receiving this error in Europe (using default URL) when running the python script:

...running bmwcdapi.py
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 841, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 344, in connect
ssl_context=context)
File "/usr/lib/python3/dist-packages/urllib3/util/ssl
.py", line 344, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.7/ssl.py", line 412, in wrap_socket
session=session
File "/usr/lib/python3.7/ssl.py", line 853, in _create
self.do_handshake()
File "/usr/lib/python3.7/ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1056)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='b2vapi.bmwgroup.com', port=443): Max retries exceeded with url: /gcdm/oauth/token (Caused by SSLError(SSLError(1, '[SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1056)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "bmwcdapi.py", line 332, in
main()
File "bmwcdapi.py", line 296, in main
c = ConnectedDrive()
File "bmwcdapi.py", line 69, in init
self.generateCredentials()
File "bmwcdapi.py", line 100, in generateCredentials
r = requests.post(url, data=data, headers=headers,allow_redirects=False)
File "/usr/lib/python3/dist-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='b2vapi.bmwgroup.com', port=443): Max retries exceeded with url: /gcdm/oauth/token (Caused by SSLError(SSLError(1, '[SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1056)')))

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.