This adapter integrates BMW vehicles into ioBroker using the new BMW CarData API with OAuth2 authentication and real-time MQTT streaming. It provides comprehensive vehicle data monitoring for all BMW models linked to your BMW account.
While charging it can happens that the battery level is not updated via stream because the car is sleeping/standby when turn on the car the data will be updated. You can trigger an update via API bmw.0.vin.remote.fetchViaAPI
A detailed datapoint description you can find here telematic.json
- Visit the BMW ConnectedDrive portal: https://www.bmw.de/de-de/mybmw/vehicle-overview
- Navigate to the BMW CarData section (you'll see various service categories)
- Click on "CarData Client erstellen" (Create CarData Client) button
- Copy the client_id
- Wait 30 seconds
- Click on CarData API
- Wait 30 seconds
- Click CarData Streaming
CRITICAL: Click one service and wait 30 seconds if you see an error message, then click again. Don't press on "Gerät Authentifizieren/Devict authentication" Enter the client_id in iobroker settings.
YOU MUST CONFIGURE CARDATA STREAMING AND SELECT ALL 244 DATA POINTS
After creating your Client ID, configure streaming:
- In the CarData section, look for "CARDATA STREAMING"
- You should see the configuration status as "ready"
- Note the "Letztes Konfigurationsupdate" (Last Configuration Update) timestamp
- Click "Datenauswahl ändern" (Change Data Selection) button
- Select ALL categories (Vehicle Status, Charging, Trip Data, etc.)
- Manually check ALL 244 individual data points
- Or enter this in Google Developer Console press F12
document.querySelectorAll('label.chakra-checkbox:not([data-checked])').forEach(l => l.click());
- Save your configuration by clicking "Stream löschen" if needed to reset, then reconfigure
Without selecting all data points, MQTT streaming will not provide complete data!
- Enter your Client ID in the adapter settings
- Enter your CarData Streaming Username (found in BMW portal under CarData > Streaming section)
- Select your vehicle brand (BMW, Mini, Toyota Supra)
- Set update interval (minimum 10 minutes due to API quota)
- Configure VIN ignore list if needed
- Start the adapter
- Check the logs for the OAuth2 authorization URL
- Visit the URL and login with your BMW account
- Authorize the application
- The adapter will automatically continue after authorization
Vehicle data is organized under bmw.0.VIN.*
where VIN
represents your Vehicle Identification Number:
-
bmw.0.VIN.api.*
- API Data (Periodic Updates)- Data fetched via BMW CarData REST API via .remote.
- Uses API quota (50 calls per 24 hours)
-
bmw.0.VIN.stream.*
- Stream Data (Real-time MQTT)- Data received via real-time MQTT streaming or remote.fetchViaAPI
- Instant updates when vehicle data changes
- Includes all 244 configured data points
You can enable/disable these endpoints in adapter settings (BMW CarData API v1):
bmw.0.VIN.api.basicData.*
- Vehicle information, model, brand, series ✅ (Default: Enabled)bmw.0.VIN.api.chargingHistory.*
- Charging sessions and history ✅ (Default: Enabled)bmw.0.VIN.api.image.*
- Vehicle image for display purposesbmw.0.VIN.api.locationBasedChargingSettings.*
- Location-specific charging preferences and settingsbmw.0.VIN.api.smartMaintenanceTyreDiagnosis.*
- Smart maintenance system tyre condition and diagnosis
bmw.0.VIN.lastStreamViaAPIUpdate
- Timestamp of last data update (API)bmw.0.VIN.lastStreamUpdate
- Timestamp of last MQTT stream update
The adapter receives real-time updates via MQTT streaming when:
- The car is not in sleep/standby
- Vehicle status changes (doors, windows, lights)
- Charging status updates
- Location changes during driving
- Climate control activation
- Service notifications
Available Remote Controls:
The BMW CarData API is read-only, so this adapter does not provide vehicle command functionality. For remote control capabilities, use:
Official BMW Solutions:
- MyBMW Mobile App - Full remote control functionality
- BMW ConnectedDrive Portal - Web-based vehicle management
- BMW Alexa Skill - Voice control integration with Amazon Alexa for commands like:
- "Alexa, ask BMW to lock my car"
- "Alexa, ask BMW to start climate control"
- "Alexa, ask BMW to flash my lights"
Remote Controls Available in This Adapter:
fetchViaAPI
- Fetch latest telematic data via container APIbasicData
- Refresh vehicle basic information (model, brand, series)chargingHistory
- Fetch charging sessions from last 30 daysimage
- Retrieve current vehicle imagelocationBasedChargingSettings
- Get location-based charging preferencessmartMaintenanceTyreDiagnosis
- Fetch tyre diagnosis data
Note: These are data retrieval commands only - no vehicle control commands are supported by the BMW CarData API.
If you encounter authentication errors:
- Verify CarData API is activated for your Client ID
- Ensure CarData Streaming is enabled
- Check that all 244 data points are selected
- Consider regenerating your Client ID
If you're not receiving real-time updates:
- Verify CarData Streaming is subscribed and active
- Ensure all data descriptors (244 points) are selected
- Check that your vehicle supports CarData streaming
- Restart the adapter after descriptor configuration changes
The adapter manages the 50 API calls per 24-hour limit automatically:
- Disable unnecessary API endpoints in adapter settings to reduce quota usage
- Increase update interval if you hit quota limits frequently
- MQTT streaming doesn't count against API quota and provides real-time data
- Each enabled API endpoint uses one quota call per update interval
If you're not seeing expected data in VIN.api.*
:
- Check if the corresponding endpoint is enabled in adapter settings
- Verify you haven't exceeded API quota (check adapter logs)
- Some endpoints may not be available for all vehicle types
- Check adapter logs for specific endpoint errors (404, 403, etc.)
VIN.api.*
- Updated periodically based on interval and enabled endpointsVIN.stream.*
- Updated in real-time via MQTT when vehicle data changesVIN.lastUpdate
- Timestamp of most recent data update (API or MQTT)VIN.lastStreamUpdate
- Timestamp of most recent MQTT stream update
This adapter is available at: https://github.com/TA2k/ioBroker.bmw
- improve logs
- add autocast
- add descriptions
- improve token refresh
- fix image fetching
- Add API fetching via Container and move other apis to manually fetching
- BREAKING: Complete migration to BMW CarData API with OAuth2 Device Flow authentication
- BREAKING: Removed username/password authentication (deprecated by BMW)
- BREAKING: Removed all remote control functionality (CarData API is read-only)
- BREAKING: Removed second user support and CAPTCHA requirements
- NEW: Real-time MQTT streaming for instant vehicle data updates
- NEW: OAuth2 Device Code Flow authentication with PKCE
- NEW: API quota management system (50 calls per 24 hours)
- NEW: Configurable API endpoint selection to manage quota usage
- NEW: Organized folder structure: api/ for periodic updates, stream/ for real-time data
- NEW: Enhanced state management with proper object creation
- NEW: Modern JSON-based configuration interface (jsonConfig.json)
- NEW: Comprehensive setup documentation with BMW portal integration
- FIXED: MQTT message processing logic for correct data validation
- FIXED: State creation issues preventing "no existing object" errors
- IMPROVED: Removed unused dependencies (cookie handling, legacy auth)
- IMPROVED: Enhanced error handling with specific guidance for common issues
- (hombach) change to recommended stable admin 7.6.17 (#159)
- (hombach) migrate to iobroker/eslint-config (#146)
- (hombach) fix form-data vulnerability
- (hombach) code cleanups
- (hombach) update axios
- (hombach) bump adapter-core
- (hombach) fix issues detected by repository checker (#170)
- (hombach) bump dependencies
- BREAKING: Dropped support for Node.js 18 (#88)
- (hombach) BREAKING: Dropped support for js-controller 5 (#111)
- (hombach) BREAKING: change to admin 7.4.10 as recommended by ioBroker (#111)
- (hombach) encrypt and protect second user password - has to be reentered (#111)
- (hombach) bump dependencies
- (hombach) update axios
- (hombach) fixing issues detected by repository checker (#88)
- (hombach) some small code cleanups/modernisations
- (hombach) add/translate description
- (hombach) update logo
- fix for Mitbenutzer Feature
- fix remote controls
- add Mitbenutzer Login for remote controls
- added new remotes as switch and updated values
- added retry logic for remotes
- improved charging session parsing
- added remote to fetch charging session from a specific month
- added raw JSON of charging session for export
- login fixed
- fix error getvehicles v2 failed
- fix remote commands
- Bugfixes
- Fix login
- Fix login
- Add support for MINI and force refresh remote
- Disable v1 Endpoints
- Upgrade to statusV2 and remoteV2
- (TA2k) initial release
MIT License
Copyright (c) 2021-2025 TA2k tombox2020@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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.