Git Product home page Git Product logo

bimmer2mqtt's Introduction

bimmer2mqtt

For BMW and Mini drivers, who want to integrate their vehicle in almost any smart home solution.

Mapps https://github.com/bimmerconnected/bimmer_connected states, messages and commands to MQTT and vice versa. It comes along within an optinal dockerized environment, translation of geographic coordinates to human readable addresses and more.

USAGE:

  • Replace the variables TOPIC, MQTT_SERVER, MQTT_PORT and REGION
  • If your MQTT broker requires credentials: Uncomment self.client.username_pw_set(username="USERNAME", password="PASSWORD") and replace the user name and password
  • Run the script as a service or in docker
  • Publish a MQTT message to

Mobility/CarName/cmd

with payload

COMMAND USERNAME PASSWORD VIN

  • COMMAND can either be state, light, lock, unlock, air, horn or charge.
  • USERNAME is your user name or mail address given in the connected drive portal.
  • PASSWORD is your password for the connected drive portal.
  • VIN is your vehicle identification number

Message Queuing Telemetry Transport (MQTT) is an open network communication protocol for Machine-to-Machine-Communication (M2M). It also acts as an widely accepted protocol for smart home systems and is therefore supported by many home automation servers. Bimmer_connected is a simple library for BMW and MINI ConnectedDrive compatible cars. For a detailed description of the capabilities this library offers, see https://github.com/bimmerconnected/bimmer_connected. Moreover, the capabilities depend on your manufacturer, vehicle and allowed car controls.

  • Update 22.2: New JSON readings according to the connected drive latest changes
  • Update 22.12: Compatibility with bimmer_connected 0.10.4

bimmer2mqtt's People

Contributors

mrjand avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

slampenny

bimmer2mqtt's Issues

ModuleNotFoundError

Hi,
installed latest bimmer_connected (0.10.4). when running bimmer2mqtt, I get "ModuleNotFoundError: No module named 'bimmer_connected.country_selector'"

'state' command does not work

I can use the 'horn' command properly, but when using 'state' the following error pops up:

2022-12-31` 09:14:13 INFO car_execute: Mobility/BMW530e/cmd b'state
Traceback (most recent call last):
File "/usr/src/app/./Bimmer2MQTT.py", line 149, in
mqtt_handler.run()
File "/usr/src/app/./Bimmer2MQTT.py", line 63, in run
self.client.loop_forever()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
return self._handle_publish()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
self._handle_on_message(message)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3556, in _handle_on_message
callback(self, self._userdata, message)
File "/usr/src/app/./Bimmer2MQTT.py", line 54, in car_execute
client.publish(TOPIC + key, returnData[key])
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1247, in publish
raise TypeError(
TypeError: payload must be a string, bytearray, int, float or None.

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.