Hauptmenü

JSON hash data

Begonnen von Bjoernar, 06 März 2022, 13:38:42

Vorheriges Thema - Nächstes Thema

Bjoernar

Hallo,
da meine (und für alle anderen auch) Anbindung an BMW Connect nicht mehr funktioniert versuche ich nun über bimmerconnected die Daten zu bekommen.

Die Abfrage der Daten und rückgabe in json ist kein Problem.
Jedoch das übergeben der Daten an FHEM.

Ich bekomme es einfach nicht hin die aus dem JSON String die ich benötige zu extrahieren um sie dann an FHEM zu übergeben.

Vielleicht kann mir jemand ein Beispiel liefern wie ich einen Wert übergeben kann, alternativ alle, wenns einfacher ist.

Bsp.: "rangeValue" oder "levelValue"
Weitere bekomme ich dann sicher hin.

Bisher wurden alle benötigen Werte in ein Array geschrieben und die Daten mit einer while Schleife durchlaufen um die benötigen werte zu übergeben.

Danke für eure Hilfe.
Gruß Björnar

Hier der JSON String:

{"attributes": {"vin": "12345678901234", "model": "i3s 120", "year": 2020, "brand": "BMW", "headUnit": "ID5", "isLscSupported": true, "driveTrain": "ELECTRIC", "puStep": "0321", "iStep": "I001-21-03-530", "telematicsUnit": "ATM", "hmiVersion": "ID5", "bodyType": "I01", "a4aType": "BLUETOOTH", "capabilities": {"isRemoteServicesBookingRequired": false, "isRemoteServicesActivationRequired": false, "lock": {"isEnabled": true, "isPinAuthenticationRequired": false, "executionMessage": "Lock your vehicle now? Remote functions may take a few seconds."}, "unlock": {"isEnabled": true, "isPinAuthenticationRequired": true, "executionMessage": "Unlock your vehicle now? Remote functions may take a few seconds."}, "lights": {"isEnabled": true, "isPinAuthenticationRequired": false, "executionMessage": "Flash headlights now? Remote functions may take a few seconds."}, "horn": {"isEnabled": true, "isPinAuthenticationRequired": false, "executionMessage": "Using your horn is only allowed in certain situations in many countries. Responsibility for the use and adherence to the respective regulations lies solely with you as the user. \n\nDo you want to use the horn now? Remote functions may take a few seconds."}, "vehicleFinder": {"isEnabled": true, "isPinAuthenticationRequired": false, "executionMessage": "Find your vehicle now? Remote functions may take a few seconds."}, "speechThirdPartyAlexa": {"isEnabled": true, "isPinAuthenticationRequired": false, "executionMessage": "Activate Alexa now? Remote functions may take a few seconds."}, "sendPoi": {"isEnabled": true, "isPinAuthenticationRequired": false, "executionMessage": "Send POI now? Remote functions may take a few seconds."}, "lastStateCall": {"isNonLscFeatureEnabled": false, "lscState": "ACTIVATED"}, "climateNow": {"isEnabled": true, "isPinAuthenticationRequired": false, "executionMessage": "Do you want to ventilate now? Remote functions may take a few seconds.", "executionPopup": {"executionMessage": "Turn pre-conditioning on now? Remote functions may take a few seconds.", "popupType": "DIALOG", "title": "Start Climatization", "primaryButtonText": "Start", "secondaryButtonText": "Cancel", "iconId": 59733}, "executionStopPopup": {"executionMessage": "Stop climate control in your vehicle now? Remote functions may take a few seconds.", "title": "Climate control is running"}}, "isRemoteHistorySupported": true, "canRemoteHistoryBeDeleted": false, "isChargingHistorySupported": true, "isScanAndChargeSupported": true, "isDCSContractManagementSupported": true, "isBmwChargingSupported": true, "isMiniChargingSupported": false, "isChargeNowForBusinessSupported": true, "isDataPrivacyEnabled": false, "isChargingPlanSupported": true, "isChargingPowerLimitEnable": false, "isChargingTargetSocEnable": false, "isChargingLoudnessEnable": false, "isChargingSettingsEnabled": false, "isChargingHospitalityEnabled": false, "isEvGoChargingSupported": false, "isFindChargingEnabled": true, "isCustomerEsimSupported": false, "isCarSharingSupported": false, "isEasyChargeSupported": false, "isSustainabilitySupported": false, "specialThemeSupport": []}, "connectedDriveServices": ["WIFI_HOTSPOT_SERVICE"], "isMappingPending": false, "isMappingUnconfirmed": false, "driverGuideInfo": {"title": "BMW\nDriver's Guide", "androidAppScheme": "com.bmwgroup.driversguide.row", "iosAppScheme": "bmwdriversguide:///open", "androidStoreUrl": "https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row", "iosStoreUrl": "https://apps.apple.com/de/app/id714042749?mt=8"}, "themeSpecs": {"vehicleStatusBackgroundColor": {"red": 69, "green": 75, "blue": 109}}, "exFactoryPUStep": "0720", "exFactoryILevel": "I001-20-07-510"}, "status": {"status": {"lastUpdatedAt": "2022-03-05T15:49:37Z", "currentMileage": {"mileage": 7720, "units": "km", "formattedMileage": "7720"}, "issues": {"doorsAndWindows": {"title": "Vehicle open", "iconId": 59726}}, "doorsGeneralState": "Unlocked", "checkControlMessagesGeneralState": "No Issues", "doorsAndWindows": [{"iconId": 59737, "title": "Lock status", "state": "Unlocked", "criticalness": "nonCritical"}, {"iconId": 59722, "title": "All doors", "state": "Closed", "criticalness": "nonCritical"}, {"iconId": 59701, "title": "Left front window", "state": "Open", "criticalness": "nonCritical"}, {"iconId": 59700, "title": "Right front window", "state": "Open", "criticalness": "nonCritical"}, {"iconId": 59706, "title": "Hood", "state": "Open", "criticalness": "critical"}, {"iconId": 59704, "title": "Trunk", "state": "Closed", "criticalness": "nonCritical"}], "checkControlMessages": [], "requiredServices": [{"id": "BrakeFluid", "title": "Brake fluid", "iconId": 60223, "longDescription": "Next service due by the specified date.", "subtitle": "Due in September 2022", "criticalness": "nonCritical"}, {"id": "VehicleCheck", "title": "Vehicle check", "iconId": 60215, "longDescription": "Next vehicle check due after the specified distance or date.", "subtitle": "Due in September 2022", "criticalness": "nonCritical"}], "recallMessages": [], "recallExternalUrl": null, "fuelIndicators": [{"mainBarValue": 61, "secondaryBarValue": 0, "infoIconId": 59689, "rangeIconId": 59683, "rangeUnits": "km", "rangeValue": "143", "levelIconId": 59689, "showsBar": true, "levelUnits": "%", "levelValue": "61", "showBarGoal": false, "barType": null, "infoLabel": "Not Charging", "isInaccurate": false, "isCircleIcon": true, "iconOpacity": "low", "chargingType": null, "chargingStatusType": "NOT_CHARGING", "chargingStatusIndicatorType": "STOPPED"}], "timestampMessage": "Updated from vehicle 3/5/2022 04:49 PM", "chargingProfile": {"reductionOfChargeCurrent": {"start": {"hour": 0, "minute": 0}, "end": {"hour": 0, "minute": 0}}, "chargingMode": "immediateCharging", "chargingPreference": "chargingWindow", "chargingControlType": "weeklyPlanner", "departureTimes": [{"id": 1, "action": "deactivate", "timerWeekDays": [], "timeStamp": {"hour": 0, "minute": 0}}, {"id": 2, "action": "deactivate", "timerWeekDays": [], "timeStamp": {"hour": 0, "minute": 0}}, {"id": 3, "action": "deactivate", "timerWeekDays": [], "timeStamp": {"hour": 0, "minute": 0}}, {"id": 4, "action": "deactivate", "timerWeekDays": []}], "climatisationOn": true, "chargingSettings": {"targetSoc": 100, "isAcCurrentLimitActive": false, "hospitality": "NO_ACTION", "idcc": "NO_ACTION"}}}, "properties": {"lastUpdatedAt": "2022-03-05T15:49:37Z", "inMotion": false, "areDoorsLocked": false, "originCountryISO": "DE", "areDoorsClosed": true, "areDoorsOpen": false, "areWindowsClosed": false, "doorsAndWindows": {"doors": {"driverFront": "CLOSED", "driverRear": "CLOSED", "passengerFront": "CLOSED", "passengerRear": "CLOSED"}, "windows": {"driverFront": "OPEN", "passengerFront": "OPEN"}, "trunk": "CLOSED", "hood": "OPEN"}, "isServiceRequired": false, "fuelLevel": {"value": 0, "units": "LITERS"}, "chargingState": {"chargePercentage": 61, "state": "NOT_CHARGING", "type": "NOT_AVAILABLE", "isChargerConnected": true}, "combustionRange": {"distance": {"value": 0, "units": "KILOMETERS"}}, "electricRange": {"distance": {"value": 143, "units": "KILOMETERS"}}, "electricRangeAndStatus": {"chargePercentage": 61, "distance": {"value": 143, "units": "KILOMETERS"}}, "checkControlMessages": [], "serviceRequired": [{"type": "BRAKE_FLUID", "status": "OK", "dateTime": "2022-09-01T00:00:00.000Z"}, {"type": "VEHICLE_CHECK", "status": "OK", "dateTime": "2022-09-01T00:00:00.000Z"}], "vehicleLocation": {"coordinates": {"latitude": 12.123456, "longitude": 1.123456}, "address": {"formatted": "da 123, 11111 hier"}, "heading": 266}, "climateControl": {}}, "all_lids_closed": false, "all_windows_closed": false, "are_all_cbs_ok": true, "are_parking_lights_on": null, "charging_end_time": null, "charging_level_hv": 61, "charging_start_time": null, "charging_status": "NOT_CHARGING", "charging_time_label": "Not Charging", "charging_time_remaining": 0.0, "check_control_messages": [], "condition_based_services": [{"due_date": "2022-09-01 00:00:00+00:00", "state": "OK", "service_type": "BRAKE_FLUID", "due_distance": null, "description": null}, {"due_date": "2022-09-01 00:00:00+00:00", "state": "OK", "service_type": "VEHICLE_CHECK", "due_distance": null, "description": null}], "connection_status": "CONNECTED", "door_lock_state": "UNLOCKED", "fuel_indicator_count": 1, "fuel_percent": null, "gps_heading": 266, "gps_position": [12.123456, 1.123456], "has_check_control_messages": false, "has_parking_light_state": false, "is_vehicle_active": false, "last_charging_end_result": null, "last_update_reason": "Updated from vehicle 3/5/2022 04:49 PM", "lids": [{"name": "trunk", "state": "CLOSED"}, {"name": "hood", "state": "OPEN"}, {"name": "driverFront", "state": "CLOSED"}, {"name": "driverRear", "state": "CLOSED"}, {"name": "passengerFront", "state": "CLOSED"}, {"name": "passengerRear", "state": "CLOSED"}], "max_range_electric": null, "mileage": [7720, "km"], "open_lids": [{"name": "hood", "state": "OPEN"}], "open_windows": [{"name": "driverFront", "state": "OPEN"}, {"name": "passengerFront", "state": "OPEN"}], "parking_lights": null, "remaining_fuel": [0, "LITERS"], "remaining_range_electric": [143, "km"], "remaining_range_fuel": [null, null], "remaining_range_total": [143, "km"], "timestamp": "2022-03-05 15:49:37+00:00", "windows": [{"name": "driverFront", "state": "OPEN"}, {"name": "passengerFront", "state": "OPEN"}]}, "observer_latitude": null, "observer_longitude": null, "available_attributes": ["gps_position", "vin", "remaining_range_total", "mileage", "charging_time_remaining", "charging_start_time", "charging_end_time", "charging_time_label", "charging_status", "charging_level_hv", "connection_status", "remaining_range_electric", "last_charging_end_result", "condition_based_services", "check_control_messages", "door_lock_state", "timestamp", "last_update_reason", "lids", "windows"], "available_state_services": ["status"], "brand": "bmw", "charging_profile": {"charging_profile": {"reductionOfChargeCurrent": {"start": {"hour": 0, "minute": 0}, "end": {"hour": 0, "minute": 0}}, "chargingMode": "immediateCharging", "chargingPreference": "chargingWindow", "chargingControlType": "weeklyPlanner", "departureTimes": [{"id": 1, "action": "deactivate", "timerWeekDays": [], "timeStamp": {"hour": 0, "minute": 0}}, {"id": 2, "action": "deactivate", "timerWeekDays": [], "timeStamp": {"hour": 0, "minute": 0}}, {"id": 3, "action": "deactivate", "timerWeekDays": [], "timeStamp": {"hour": 0, "minute": 0}}, {"id": 4, "action": "deactivate", "timerWeekDays": []}], "climatisationOn": true, "chargingSettings": {"targetSoc": 100, "isAcCurrentLimitActive": false, "hospitality": "NO_ACTION", "idcc": "NO_ACTION"}}, "charging_mode": "immediateCharging", "charging_preferences": "chargingWindow", "is_pre_entry_climatization_enabled": true, "preferred_charging_window": {"end_time": "00:00", "start_time": "00:00"}, "timer": {"1": {"action": "deactivate", "start_time": "00:00", "timer_id": 1, "weekdays": []}, "2": {"action": "deactivate", "start_time": "00:00", "timer_id": 2, "weekdays": []}, "3": {"action": "deactivate", "start_time": "00:00", "timer_id": 3, "weekdays": []}, "4": {"action": "deactivate", "start_time": null, "timer_id": 4, "weekdays": []}}}, "drive_train": "ELECTRIC", "drive_train_attributes": ["remaining_range_total", "mileage", "charging_time_remaining", "charging_start_time", "charging_end_time", "charging_time_label", "charging_status", "charging_level_hv", "connection_status", "remaining_range_electric", "last_charging_end_result"], "has_hv_battery": true, "has_internal_combustion_engine": false, "has_range_extender": false, "has_weekly_planner_service": true, "is_vehicle_tracking_enabled": true, "lsc_type": "ACTIVATED", "name": "i3s 120"}]

Beta-User

Wie üblich gibt es mehrere Varianten, ich gehe mal davon aus, dass du das innerhalb eines Moduls nutzen willst? (sonst kommt eventuell expandJSON als Hilfsmodul in Frage, oder eben direkt JSONMOD)

In fhem.pl ist für "flache" Reading-Ausgabe eine Funktion json2reading() drin, das ist vermutlich der schnellste Weg. Da wird intern json2nameValue() aufgerufen, das gäbe eine Referenz auf einen (flachen) Hash zurück.

Letzteres ist evtl. eine Variante, um auf bestimmte Elemente in dem "abgeflachten" JSON zuzugreifen.

Wenn man die JSON-Struktur kennt, ist es m.E. besser, das mit Funktionen aus "use JSON;" zu machen. Ein Beispiel dazu wäre z.B. in msgDialog zu finden.

Hoffe, das hilft erst mal (teilsweise) weiter?

Sonst wäre ggf. etwas mehr Code drumrum hilfreich.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

betateilchen

Dafür gibt es das Modul JsonMod (analog zu HTTPMOD) das genau dafür gedacht ist, solche Aufgaben zu lösen. Das Modul kann auch Dateien als input verarbeiten.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Bjoernar

...danke versuche ich mal zu lesen...

viel code gibt es noch nicht wirklich:
Soll gerne in ein Modul, ist sicher auch für andere interessant, zumindest will ich den code veröffentlichen wenn es läuft.

Bisher rufe ich nur die Daten ab und sende das json ergebnis dann an fhem.
Wie oben angegeben.

Das muss halt vorher laufen:
https://github.com/bimmerconnected/bimmer_connected


#!/usr/bin/perl
package main;

use strict;
use warnings;
no warnings 'uninitialized';
use JSON;
use Data::Dumper;

my $User = 'my@mail.com';
my $Pass = "pass1234";
 
my $DEBUG = 3;
my @Werte = ('chargingHVStatus', 'updateTime_converted_timestamp', 'vehicle_tracking', 'updateTime_converted_time', 'trunk_state', 'overall_energy_consumption', 'mileage', 'Segment_LastTrip_time_segment_end_formatted_date', 'heading', 'door_passenger_rear', 'chargingLevelHv', 'beEnergyLevelHv', 'battery_size_max', 'remaining_charging_time_minutes', 'connectorStatus', 'Segment_LastTrip_ratio_electric_driven_distance', 'lights_parking', 'door_passenger_front', 'updateTime_converted_date', 'unitOfEnergy', 'soc_hv_percent', 'window_driver_front', 'beChargingLevelHv', 'hood_state', 'unitOfCombustionConsumption', 'lsc_trigger', 'Segment_LastTrip_time_segment_end_formatted_time', 'gps_lng', 'beRemainingRangeElectric', 'gps_lat', 'lastUpdateReason', 'charging_status', 'charging_connection_type', 'lastChargingEndReason', 'Segment_LastTrip_time_segment_end_formatted', 'door_lock_state', 'single_immediate_charging', 'beMaxRangeElectric', 'unitOfLength', 'door_driver_front', 'updateTime_converted', 'window_passenger_front', 'door_driver_rear', 'unitOfElectricConsumption', 'Segment_LastTrip_time_segment_end');

bimmerconnected_getData();

sub bimmerconnected_getData
{
print "bimmerconnected getdata start \n" if $DEBUG  > 0 ;

my $json = `bimmerconnected status $User $Pass rest_of_world -j`;

my $decoded = decode_json($json);
print "Decoded Result: ".Dumper($decoded). "\n" if $DEBUG  > 0 ;

system("perl", "/opt/fhem/fhem.pl", "7072", "setreading d json ".$json );

print "\n" if $DEBUG > 0 ;
print "bimmerconnected getdata ende \n" if $DEBUG > 0 ;
}



Bjoernar

Zitat von: betateilchen am 06 März 2022, 14:22:03
Dafür gibt es das Modul JsonMod (analog zu HTTPMOD) das genau dafür gedacht ist, solche Aufgaben zu lösen. Das Modul kann auch Dateien als input verarbeiten.

Hast du dafür evtl. ein Beispiel das ich entsprechend einbinden könnte.

betateilchen

Nein, aber das Modul hat eine umfangreiche Dokumentation, in der das alles drinsteht.

https://commandref.fhem.de/#JsonMod
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

betateilchen

Dein JSON String im ersten Beitrag ist nicht vollständig.

Kannst Du das komplett JSON mal als Textdatei hier im Thread anhängen, dann baue ich Dir ein Beisipel.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Bjoernar

Zitat von: betateilchen am 06 März 2022, 14:43:52
Dein JSON String im ersten Beitrag ist nicht vollständig.

Kannst Du das komplett JSON mal als Textdatei hier im Thread anhängen, dann baue ich Dir ein Beisipel.

am ende ist eine ] die gehört da nicht hin, steht aber so im string ... komisch.


betateilchen

#8

defmod jsonTest JsonMod file://opt/fhem/log/json.test
attr jsonTest readingList complete()


liefert folgende readings:


setstate jsonTest 2022-03-06 14:55:15 attributes.a4aType BLUETOOTH
setstate jsonTest 2022-03-06 14:55:15 attributes.bodyType I01
setstate jsonTest 2022-03-06 14:55:15 attributes.brand BMW
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.canRemoteHistoryBeDeleted 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionMessage Do you want to ventilate now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionPopup.executionMessage Turn pre-conditioning on now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionPopup.iconId 59733
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionPopup.popupType DIALOG
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionPopup.primaryButtonText Start
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionPopup.secondaryButtonText Cancel
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionPopup.title Start Climatization
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionStopPopup.executionMessage Stop climate control in your vehicle now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.executionStopPopup.title Climate control is running
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.isEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.climateNow.isPinAuthenticationRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.horn.executionMessage Using your horn is only allowed in certain situations in many countries. Responsibility for the use and adherence to the respective regulations lies solely with you as the user. \
\
Do you want to use the horn now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.horn.isEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.horn.isPinAuthenticationRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isBmwChargingSupported 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isCarSharingSupported 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isChargeNowForBusinessSupported 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isChargingHistorySupported 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isChargingHospitalityEnabled 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isChargingLoudnessEnable 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isChargingPlanSupported 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isChargingPowerLimitEnable 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isChargingSettingsEnabled 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isChargingTargetSocEnable 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isCustomerEsimSupported 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isDCSContractManagementSupported 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isDataPrivacyEnabled 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isEasyChargeSupported 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isEvGoChargingSupported 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isFindChargingEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isMiniChargingSupported 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isRemoteHistorySupported 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isRemoteServicesActivationRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isRemoteServicesBookingRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isScanAndChargeSupported 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.isSustainabilitySupported 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.lastStateCall.isNonLscFeatureEnabled 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.lastStateCall.lscState ACTIVATED
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.lights.executionMessage Flash headlights now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.lights.isEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.lights.isPinAuthenticationRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.lock.executionMessage Lock your vehicle now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.lock.isEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.lock.isPinAuthenticationRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.sendPoi.executionMessage Send POI now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.sendPoi.isEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.sendPoi.isPinAuthenticationRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.speechThirdPartyAlexa.executionMessage Activate Alexa now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.speechThirdPartyAlexa.isEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.speechThirdPartyAlexa.isPinAuthenticationRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.unlock.executionMessage Unlock your vehicle now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.unlock.isEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.unlock.isPinAuthenticationRequired 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.vehicleFinder.executionMessage Find your vehicle now? Remote functions may take a few seconds.
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.vehicleFinder.isEnabled 1
setstate jsonTest 2022-03-06 14:55:15 attributes.capabilities.vehicleFinder.isPinAuthenticationRequired 0
setstate jsonTest 2022-03-06 14:55:15 attributes.connectedDriveServices.0 WIFI_HOTSPOT_SERVICE
setstate jsonTest 2022-03-06 14:55:15 attributes.driveTrain ELECTRIC
setstate jsonTest 2022-03-06 14:55:15 attributes.driverGuideInfo.androidAppScheme com.bmwgroup.driversguide.row
setstate jsonTest 2022-03-06 14:55:15 attributes.driverGuideInfo.androidStoreUrl https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row
setstate jsonTest 2022-03-06 14:55:15 attributes.driverGuideInfo.iosAppScheme bmwdriversguide:///open
setstate jsonTest 2022-03-06 14:55:15 attributes.driverGuideInfo.iosStoreUrl https://apps.apple.com/de/app/id714042749?mt=8
setstate jsonTest 2022-03-06 14:55:15 attributes.driverGuideInfo.title BMW\
Driver's Guide
setstate jsonTest 2022-03-06 14:55:15 attributes.exFactoryILevel I001-20-07-510
setstate jsonTest 2022-03-06 14:55:15 attributes.exFactoryPUStep 0720
setstate jsonTest 2022-03-06 14:55:15 attributes.headUnit ID5
setstate jsonTest 2022-03-06 14:55:15 attributes.hmiVersion ID5
setstate jsonTest 2022-03-06 14:55:15 attributes.iStep I001-21-03-530
setstate jsonTest 2022-03-06 14:55:15 attributes.isLscSupported 1
setstate jsonTest 2022-03-06 14:55:15 attributes.isMappingPending 0
setstate jsonTest 2022-03-06 14:55:15 attributes.isMappingUnconfirmed 0
setstate jsonTest 2022-03-06 14:55:15 attributes.model i3s 120
setstate jsonTest 2022-03-06 14:55:15 attributes.puStep 0321
setstate jsonTest 2022-03-06 14:55:15 attributes.telematicsUnit ATM
setstate jsonTest 2022-03-06 14:55:15 attributes.themeSpecs.vehicleStatusBackgroundColor.blue 109
setstate jsonTest 2022-03-06 14:55:15 attributes.themeSpecs.vehicleStatusBackgroundColor.green 75
setstate jsonTest 2022-03-06 14:55:15 attributes.themeSpecs.vehicleStatusBackgroundColor.red 69
setstate jsonTest 2022-03-06 14:55:15 attributes.vin 12345678901234
setstate jsonTest 2022-03-06 14:55:15 attributes.year 2020
setstate jsonTest 2022-03-06 14:55:15 available_attributes.0 gps_position
setstate jsonTest 2022-03-06 14:55:15 available_attributes.1 vin
setstate jsonTest 2022-03-06 14:55:15 available_attributes.10 connection_status
setstate jsonTest 2022-03-06 14:55:15 available_attributes.11 remaining_range_electric
setstate jsonTest 2022-03-06 14:55:15 available_attributes.12 last_charging_end_result
setstate jsonTest 2022-03-06 14:55:15 available_attributes.13 condition_based_services
setstate jsonTest 2022-03-06 14:55:15 available_attributes.14 check_control_messages
setstate jsonTest 2022-03-06 14:55:15 available_attributes.15 door_lock_state
setstate jsonTest 2022-03-06 14:55:15 available_attributes.16 timestamp
setstate jsonTest 2022-03-06 14:55:15 available_attributes.17 last_update_reason
setstate jsonTest 2022-03-06 14:55:15 available_attributes.18 lids
setstate jsonTest 2022-03-06 14:55:15 available_attributes.19 windows
setstate jsonTest 2022-03-06 14:55:15 available_attributes.2 remaining_range_total
setstate jsonTest 2022-03-06 14:55:15 available_attributes.3 mileage
setstate jsonTest 2022-03-06 14:55:15 available_attributes.4 charging_time_remaining
setstate jsonTest 2022-03-06 14:55:15 available_attributes.5 charging_start_time
setstate jsonTest 2022-03-06 14:55:15 available_attributes.6 charging_end_time
setstate jsonTest 2022-03-06 14:55:15 available_attributes.7 charging_time_label
setstate jsonTest 2022-03-06 14:55:15 available_attributes.8 charging_status
setstate jsonTest 2022-03-06 14:55:15 available_attributes.9 charging_level_hv
setstate jsonTest 2022-03-06 14:55:15 available_state_services.0 status
setstate jsonTest 2022-03-06 14:55:15 brand bmw
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_mode immediateCharging
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_preferences chargingWindow
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.chargingControlType weeklyPlanner
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.chargingMode immediateCharging
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.chargingPreference chargingWindow
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.chargingSettings.hospitality NO_ACTION
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.chargingSettings.idcc NO_ACTION
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.chargingSettings.isAcCurrentLimitActive 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.chargingSettings.targetSoc 100
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.climatisationOn 1
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.0.action deactivate
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.0.id 1
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.0.timeStamp.hour 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.0.timeStamp.minute 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.1.action deactivate
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.1.id 2
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.1.timeStamp.hour 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.1.timeStamp.minute 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.2.action deactivate
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.2.id 3
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.2.timeStamp.hour 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.2.timeStamp.minute 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.3.action deactivate
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.departureTimes.3.id 4
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.reductionOfChargeCurrent.end.hour 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.reductionOfChargeCurrent.end.minute 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.reductionOfChargeCurrent.start.hour 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.charging_profile.reductionOfChargeCurrent.start.minute 0
setstate jsonTest 2022-03-06 14:55:15 charging_profile.is_pre_entry_climatization_enabled 1
setstate jsonTest 2022-03-06 14:55:15 charging_profile.preferred_charging_window.end_time 00:00
setstate jsonTest 2022-03-06 14:55:15 charging_profile.preferred_charging_window.start_time 00:00
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.1.action deactivate
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.1.start_time 00:00
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.1.timer_id 1
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.2.action deactivate
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.2.start_time 00:00
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.2.timer_id 2
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.3.action deactivate
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.3.start_time 00:00
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.3.timer_id 3
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.4.action deactivate
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.4.start_time
setstate jsonTest 2022-03-06 14:55:15 charging_profile.timer.4.timer_id 4
setstate jsonTest 2022-03-06 14:55:15 drive_train ELECTRIC
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.0 remaining_range_total
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.1 mileage
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.10 last_charging_end_result
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.2 charging_time_remaining
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.3 charging_start_time
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.4 charging_end_time
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.5 charging_time_label
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.6 charging_status
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.7 charging_level_hv
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.8 connection_status
setstate jsonTest 2022-03-06 14:55:15 drive_train_attributes.9 remaining_range_electric
setstate jsonTest 2022-03-06 14:55:15 has_hv_battery 1
setstate jsonTest 2022-03-06 14:55:15 has_internal_combustion_engine 0
setstate jsonTest 2022-03-06 14:55:15 has_range_extender 0
setstate jsonTest 2022-03-06 14:55:15 has_weekly_planner_service 1
setstate jsonTest 2022-03-06 14:55:15 is_vehicle_tracking_enabled 1
setstate jsonTest 2022-03-06 14:55:15 lsc_type ACTIVATED
setstate jsonTest 2022-03-06 14:55:15 name i3s 120
setstate jsonTest 2022-03-06 14:55:15 observer_latitude
setstate jsonTest 2022-03-06 14:55:15 observer_longitude
setstate jsonTest 2022-03-06 14:55:15 status.all_lids_closed 0
setstate jsonTest 2022-03-06 14:55:15 status.all_windows_closed 0
setstate jsonTest 2022-03-06 14:55:15 status.are_all_cbs_ok 1
setstate jsonTest 2022-03-06 14:55:15 status.are_parking_lights_on
setstate jsonTest 2022-03-06 14:55:15 status.charging_end_time
setstate jsonTest 2022-03-06 14:55:15 status.charging_level_hv 61
setstate jsonTest 2022-03-06 14:55:15 status.charging_start_time
setstate jsonTest 2022-03-06 14:55:15 status.charging_status NOT_CHARGING
setstate jsonTest 2022-03-06 14:55:15 status.charging_time_label Not Charging
setstate jsonTest 2022-03-06 14:55:15 status.charging_time_remaining 0
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.0.description
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.0.due_date 2022-09-01 00:00:00+00:00
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.0.due_distance
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.0.service_type BRAKE_FLUID
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.0.state OK
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.1.description
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.1.due_date 2022-09-01 00:00:00+00:00
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.1.due_distance
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.1.service_type VEHICLE_CHECK
setstate jsonTest 2022-03-06 14:55:15 status.condition_based_services.1.state OK
setstate jsonTest 2022-03-06 14:55:15 status.connection_status CONNECTED
setstate jsonTest 2022-03-06 14:55:15 status.door_lock_state UNLOCKED
setstate jsonTest 2022-03-06 14:55:15 status.fuel_indicator_count 1
setstate jsonTest 2022-03-06 14:55:15 status.fuel_percent
setstate jsonTest 2022-03-06 14:55:15 status.gps_heading 266
setstate jsonTest 2022-03-06 14:55:15 status.gps_position.0 12.123456
setstate jsonTest 2022-03-06 14:55:15 status.gps_position.1 1.123456
setstate jsonTest 2022-03-06 14:55:15 status.has_check_control_messages 0
setstate jsonTest 2022-03-06 14:55:15 status.has_parking_light_state 0
setstate jsonTest 2022-03-06 14:55:15 status.is_vehicle_active 0
setstate jsonTest 2022-03-06 14:55:15 status.last_charging_end_result
setstate jsonTest 2022-03-06 14:55:15 status.last_update_reason Updated from vehicle 3/5/2022 04:49 PM
setstate jsonTest 2022-03-06 14:55:15 status.lids.0.name trunk
setstate jsonTest 2022-03-06 14:55:15 status.lids.0.state CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.lids.1.name hood
setstate jsonTest 2022-03-06 14:55:15 status.lids.1.state OPEN
setstate jsonTest 2022-03-06 14:55:15 status.lids.2.name driverFront
setstate jsonTest 2022-03-06 14:55:15 status.lids.2.state CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.lids.3.name driverRear
setstate jsonTest 2022-03-06 14:55:15 status.lids.3.state CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.lids.4.name passengerFront
setstate jsonTest 2022-03-06 14:55:15 status.lids.4.state CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.lids.5.name passengerRear
setstate jsonTest 2022-03-06 14:55:15 status.lids.5.state CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.max_range_electric
setstate jsonTest 2022-03-06 14:55:15 status.mileage.0 7720
setstate jsonTest 2022-03-06 14:55:15 status.mileage.1 km
setstate jsonTest 2022-03-06 14:55:15 status.open_lids.0.name hood
setstate jsonTest 2022-03-06 14:55:15 status.open_lids.0.state OPEN
setstate jsonTest 2022-03-06 14:55:15 status.open_windows.0.name driverFront
setstate jsonTest 2022-03-06 14:55:15 status.open_windows.0.state OPEN
setstate jsonTest 2022-03-06 14:55:15 status.open_windows.1.name passengerFront
setstate jsonTest 2022-03-06 14:55:15 status.open_windows.1.state OPEN
setstate jsonTest 2022-03-06 14:55:15 status.parking_lights
setstate jsonTest 2022-03-06 14:55:15 status.properties.areDoorsClosed 1
setstate jsonTest 2022-03-06 14:55:15 status.properties.areDoorsLocked 0
setstate jsonTest 2022-03-06 14:55:15 status.properties.areDoorsOpen 0
setstate jsonTest 2022-03-06 14:55:15 status.properties.areWindowsClosed 0
setstate jsonTest 2022-03-06 14:55:15 status.properties.chargingState.chargePercentage 61
setstate jsonTest 2022-03-06 14:55:15 status.properties.chargingState.isChargerConnected 1
setstate jsonTest 2022-03-06 14:55:15 status.properties.chargingState.state NOT_CHARGING
setstate jsonTest 2022-03-06 14:55:15 status.properties.chargingState.type NOT_AVAILABLE
setstate jsonTest 2022-03-06 14:55:15 status.properties.combustionRange.distance.units KILOMETERS
setstate jsonTest 2022-03-06 14:55:15 status.properties.combustionRange.distance.value 0
setstate jsonTest 2022-03-06 14:55:15 status.properties.doorsAndWindows.doors.driverFront CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.properties.doorsAndWindows.doors.driverRear CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.properties.doorsAndWindows.doors.passengerFront CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.properties.doorsAndWindows.doors.passengerRear CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.properties.doorsAndWindows.hood OPEN
setstate jsonTest 2022-03-06 14:55:15 status.properties.doorsAndWindows.trunk CLOSED
setstate jsonTest 2022-03-06 14:55:15 status.properties.doorsAndWindows.windows.driverFront OPEN
setstate jsonTest 2022-03-06 14:55:15 status.properties.doorsAndWindows.windows.passengerFront OPEN
setstate jsonTest 2022-03-06 14:55:15 status.properties.electricRange.distance.units KILOMETERS
setstate jsonTest 2022-03-06 14:55:15 status.properties.electricRange.distance.value 143
setstate jsonTest 2022-03-06 14:55:15 status.properties.electricRangeAndStatus.chargePercentage 61
setstate jsonTest 2022-03-06 14:55:15 status.properties.electricRangeAndStatus.distance.units KILOMETERS
setstate jsonTest 2022-03-06 14:55:15 status.properties.electricRangeAndStatus.distance.value 143
setstate jsonTest 2022-03-06 14:55:15 status.properties.fuelLevel.units LITERS
setstate jsonTest 2022-03-06 14:55:15 status.properties.fuelLevel.value 0
setstate jsonTest 2022-03-06 14:55:15 status.properties.inMotion 0
setstate jsonTest 2022-03-06 14:55:15 status.properties.isServiceRequired 0
setstate jsonTest 2022-03-06 14:55:15 status.properties.lastUpdatedAt 2022-03-05T15:49:37Z
setstate jsonTest 2022-03-06 14:55:15 status.properties.originCountryISO DE
setstate jsonTest 2022-03-06 14:55:15 status.properties.serviceRequired.0.dateTime 2022-09-01T00:00:00.000Z
setstate jsonTest 2022-03-06 14:55:15 status.properties.serviceRequired.0.status OK
setstate jsonTest 2022-03-06 14:55:15 status.properties.serviceRequired.0.type BRAKE_FLUID
setstate jsonTest 2022-03-06 14:55:15 status.properties.serviceRequired.1.dateTime 2022-09-01T00:00:00.000Z
setstate jsonTest 2022-03-06 14:55:15 status.properties.serviceRequired.1.status OK
setstate jsonTest 2022-03-06 14:55:15 status.properties.serviceRequired.1.type VEHICLE_CHECK
setstate jsonTest 2022-03-06 14:55:15 status.properties.vehicleLocation.address.formatted da 123, 11111 hier
setstate jsonTest 2022-03-06 14:55:15 status.properties.vehicleLocation.coordinates.latitude 12.123456
setstate jsonTest 2022-03-06 14:55:15 status.properties.vehicleLocation.coordinates.longitude 1.123456
setstate jsonTest 2022-03-06 14:55:15 status.properties.vehicleLocation.heading 266
setstate jsonTest 2022-03-06 14:55:15 status.remaining_fuel.0 0
setstate jsonTest 2022-03-06 14:55:15 status.remaining_fuel.1 LITERS
setstate jsonTest 2022-03-06 14:55:15 status.remaining_range_electric.0 143
setstate jsonTest 2022-03-06 14:55:15 status.remaining_range_electric.1 km
setstate jsonTest 2022-03-06 14:55:15 status.remaining_range_fuel.0
setstate jsonTest 2022-03-06 14:55:15 status.remaining_range_fuel.1
setstate jsonTest 2022-03-06 14:55:15 status.remaining_range_total.0 143
setstate jsonTest 2022-03-06 14:55:15 status.remaining_range_total.1 km
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.chargingControlType weeklyPlanner
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.chargingMode immediateCharging
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.chargingPreference chargingWindow
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.chargingSettings.hospitality NO_ACTION
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.chargingSettings.idcc NO_ACTION
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.chargingSettings.isAcCurrentLimitActive 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.chargingSettings.targetSoc 100
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.climatisationOn 1
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.0.action deactivate
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.0.id 1
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.0.timeStamp.hour 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.0.timeStamp.minute 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.1.action deactivate
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.1.id 2
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.1.timeStamp.hour 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.1.timeStamp.minute 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.2.action deactivate
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.2.id 3
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.2.timeStamp.hour 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.2.timeStamp.minute 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.3.action deactivate
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.departureTimes.3.id 4
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.reductionOfChargeCurrent.end.hour 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.reductionOfChargeCurrent.end.minute 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.reductionOfChargeCurrent.start.hour 0
setstate jsonTest 2022-03-06 14:55:15 status.status.chargingProfile.reductionOfChargeCurrent.start.minute 0
setstate jsonTest 2022-03-06 14:55:15 status.status.checkControlMessagesGeneralState No Issues
setstate jsonTest 2022-03-06 14:55:15 status.status.currentMileage.formattedMileage 7720
setstate jsonTest 2022-03-06 14:55:15 status.status.currentMileage.mileage 7720
setstate jsonTest 2022-03-06 14:55:15 status.status.currentMileage.units km
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.0.criticalness nonCritical
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.0.iconId 59737
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.0.state Unlocked
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.0.title Lock status
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.1.criticalness nonCritical
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.1.iconId 59722
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.1.state Closed
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.1.title All doors
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.2.criticalness nonCritical
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.2.iconId 59701
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.2.state Open
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.2.title Left front window
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.3.criticalness nonCritical
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.3.iconId 59700
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.3.state Open
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.3.title Right front window
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.4.criticalness critical
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.4.iconId 59706
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.4.state Open
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.4.title Hood
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.5.criticalness nonCritical
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.5.iconId 59704
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.5.state Closed
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsAndWindows.5.title Trunk
setstate jsonTest 2022-03-06 14:55:15 status.status.doorsGeneralState Unlocked
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.barType
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.chargingStatusIndicatorType STOPPED
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.chargingStatusType NOT_CHARGING
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.chargingType
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.iconOpacity low
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.infoIconId 59689
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.infoLabel Not Charging
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.isCircleIcon 1
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.isInaccurate 0
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.levelIconId 59689
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.levelUnits %
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.levelValue 61
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.mainBarValue 61
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.rangeIconId 59683
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.rangeUnits km
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.rangeValue 143
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.secondaryBarValue 0
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.showBarGoal 0
setstate jsonTest 2022-03-06 14:55:15 status.status.fuelIndicators.0.showsBar 1
setstate jsonTest 2022-03-06 14:55:15 status.status.issues.doorsAndWindows.iconId 59726
setstate jsonTest 2022-03-06 14:55:15 status.status.issues.doorsAndWindows.title Vehicle open
setstate jsonTest 2022-03-06 14:55:15 status.status.lastUpdatedAt 2022-03-05T15:49:37Z
setstate jsonTest 2022-03-06 14:55:15 status.status.recallExternalUrl
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.0.criticalness nonCritical
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.0.iconId 60223
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.0.id BrakeFluid
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.0.longDescription Next service due by the specified date.
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.0.subtitle Due in September 2022
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.0.title Brake fluid
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.1.criticalness nonCritical
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.1.iconId 60215
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.1.id VehicleCheck
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.1.longDescription Next vehicle check due after the specified distance or date.
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.1.subtitle Due in September 2022
setstate jsonTest 2022-03-06 14:55:15 status.status.requiredServices.1.title Vehicle check
setstate jsonTest 2022-03-06 14:55:15 status.status.timestampMessage Updated from vehicle 3/5/2022 04:49 PM
setstate jsonTest 2022-03-06 14:55:15 status.timestamp 2022-03-05 15:49:37+00:00
setstate jsonTest 2022-03-06 14:55:15 status.windows.0.name driverFront
setstate jsonTest 2022-03-06 14:55:15 status.windows.0.state OPEN
setstate jsonTest 2022-03-06 14:55:15 status.windows.1.name passengerFront
setstate jsonTest 2022-03-06 14:55:15 status.windows.1.state OPEN
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

TomLee

#9
Hier ein Beispiel mit dem o.g. json2reading Readings zu erhalten:

defmod bla3 at +*00:00:30 {json2reading($defs{bla3},q(<deinJSON>),undef,undef,undef,'rangeValue|levelValue')}

Bjoernar

..bei mir werden leider keine readings erzeugt.
Nur warum nicht.


API_LAST_MSG
200
API_LAST_RES
1646575858.52623
CFGFN
DEF
file://opt/fhem/bimmerconnected.json
FUUID
6224bfe2-f33f-f406-80b1-04ad8539f96d0fdf
NAME
jsonTest
NEXT
2022-03-06 16:00:00
NR
90592
SOURCE
/opt/fhem/bimmerconnected.json (11737)
STATE
???
SVN
24783 2021-07-21 22:37:12 UTC
TYPE
JsonMod



defmod jsonTest JsonMod file://opt/fhem/bimmerconnected.json
attr jsonTest readingList complete()
attr jsonTest room BMW2

betateilchen

Zitat von: Bjoernar am 06 März 2022, 15:14:56
..bei mir werden leider keine readings erzeugt.
Nur warum nicht.

zwei Gründe...


  • weil Du die Doku zum Modul noch nicht gelesen hast
  • weil Du das "set jsonTest reread" noch nicht ausgeführt hast

Wie man dem von Dir geposteten device entnehmen kann

NEXT 2022-03-06 16:00:00

findet die nächste automatische Ausführung um 16 Uhr statt.
Einmal pro Stunde, immer zur Minute 0, ist das standardmäßige Verarbeitungsintervall, falls der Benutzer nichts anderes per Attribut definiert hat.

Standardmäßig findet die Verarbeitung NICHT nach der Definition des Gerätes start (z.B. auch nicht nach einem FHEM-Neustart). Will man das ändern, gibt es auch dafür ein Attribut.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Bjoernar

habe ich gelesen, ob ich das richtige verstanden habe ist eine andere Frage.
Natürlich habe ich ein reread gemacht ;-)

betateilchen

#13
Liegt das file wirklich dort, wo Du es im define angegeben hast? (ok, es gäbe eine Fehlermeldung, wenn dem nicht so wäre)

Hat FHEM Leserechte auf die Datei?
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

TomLee

Es gibt diese Meldung im Log mit der oben angehängten Datei:

2022.03.06 15:27:29 1: PERL WARNING: Argument "" isn't numeric in addition (+) at ./FHEM/98_JsonMod.pm line 960.