Connected Cars

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

Filip
Posts: 110
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Connected Cars

Post by Filip »

All the info will perhaps be a lot... Could you tell me in which information you would be interested?
Vondee
Posts: 30
Joined: Sunday 12 January 2020 19:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Connected Cars

Post by Vondee »

Filip,

I was thinking about:

doors closed
remainingRangeFuel
remainingRangeElectric
ChargingStatus
ChargingTimeRemaining
Position

Wim
Filip
Posts: 110
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Connected Cars

Post by Filip »

FYI. I added recently the possibility to execute remote services (LIGHT, HORN, HEATING/ARICO).
This allows me starting my AIRCO/HEATING from any script. I have a script that reads my calendar... So I can book my airco/heating in advance :-).
Filip
flenaers
Posts: 2
Joined: Thursday 22 October 2020 23:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Connected Cars

Post by flenaers »

FireWizard wrote: Friday 23 October 2020 19:26 Hi, @flenaers

Thanks for you post, however I was already aware of this.

See my posted issue at: https://github.com/molobrakos/volvooncall/issues/52 and also
https://github.com/molobrakos/volvoonca ... -392582296

I have already tried several combinations and values, but it did not work

The issue is in the VoC script of molobrakos. However he does not respond, so if you know how to solve it, would be fine.
It is not really an issue, but something nice to have.

Regards
Hi,

Sorry for the late answer. I don't follow this forum actively since I have a working solution that suits my needs.
I don't use the molobrakus tools, but just poll the VoC API directly with a LUA time_script to read a few sensors (odometer, locked, fuel level, ...)
The script is configurable for multiple (Volvo) cars, API endpoints and sensors. Can probably also be adapted for other car brands if the API is documented.
To be clear, I don't SET car parameters like the horn-and-blink this way. Would not be very useful in my timed_lua_script. :-).
I did test however the API with PostMan as described above, and this works. Only issue was my car was in 'Corona-mode" (asleep due to not used for some time) and I had to wake the car up first by starting it.

Regards
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

Hello @flenaers

Thanks for your response, even if it is late, but what is late?

For information:

Volvo has made available for the first time in history an Extended Vehicle API, which is Public accessible : https://developer.volvocars.com/volvo-api/

@MrHobbes74

About a year ago you posted in this thread the following question:
Hi! In the latest stable of Domoticz I have created a (c++) hardware module as native support for EV's (see https://www.domoticz.com/wiki/EVehicles). The module communicates with a car through a standard API interface, and this API can be implemented for various cars. Currently only the Tesla API is implemented, but we could also add Volvo here. It does not provide all sensors you like to have, as i see from the dashboard above, but everything can be extended of course. Is this an idea?
As this API is now available and it is expected, that it will be extended in the future, as all car brands will move towards electrical vehicles. I wonder if this new API fits in the framework of your Tesla plugin.
As I have seen, it offers currently the same functionality as "Molobrakos'" Python script and some extra data as well. What I miss, compared to the Python script, is to activate certain controls remotely through the API.

Would it be an idea to create a Hardware device in the style of the Tesla hardware, or to create a plug-in?
I'm not a C++ programmer, so it will not be me, but I can test.

Regards
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Connected Cars

Post by kiddigital »

FireWizard wrote: Tuesday 09 March 2021 11:46 Hello @flenaers

Thanks for your response, even if it is late, but what is late?

For information:

Volvo has made available for the first time in history an Extended Vehicle API, which is Public accessible : https://developer.volvocars.com/volvo-api/

@MrHobbes74

About a year ago you posted in this thread the following question:
Hi! In the latest stable of Domoticz I have created a (c++) hardware module as native support for EV's (see https://www.domoticz.com/wiki/EVehicles). The module communicates with a car through a standard API interface, and this API can be implemented for various cars. Currently only the Tesla API is implemented, but we could also add Volvo here. It does not provide all sensors you like to have, as i see from the dashboard above, but everything can be extended of course. Is this an idea?
As this API is now available and it is expected, that it will be extended in the future, as all car brands will move towards electrical vehicles. I wonder if this new API fits in the framework of your Tesla plugin.
As I have seen, it offers currently the same functionality as "Molobrakos'" Python script and some extra data as well. What I miss, compared to the Python script, is to activate certain controls remotely through the API.

Would it be an idea to create a Hardware device in the style of the Tesla hardware, or to create a plug-in?
I'm not a C++ programmer, so it will not be me, but I can test.

Regards
Based on the initial work of @MrHobbes74 I have implemented the 'MercedesMe' module in Domoticz (available in the Beta releases) that uses the ConnectedVehicle framework as used by the Tesla module as well.

I wouldn't mind to give the Volvo API a try as it seems nicely documented and following a simular structure as the Mercedes API, but I don't own a Volvo :) So that would be hard for me to test it unless someone lends me their Volvo... or at least read access to the API and data of their car...
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

Hello @kiddigital

That is a nice offer but I do not lend you my Volvo.

You don't need it, as the development will use a Demo.
5. Build your application

By using your credentials, you can build and test your application with real data.
If you have finished it, I can test against a real Volvo,

Regards
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Connected Cars

Post by kiddigital »

Not? Was worth a try ;) Good to read that Volvo provides a virtual Demo car. I will take a look and see if I can give it a try.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Connected Cars

Post by kiddigital »

kiddigital wrote: Thursday 11 March 2021 7:08 Not? Was worth a try ;) Good to read that Volvo provides a virtual Demo car. I will take a look and see if I can give it a try.
After looking at the API documentation it seems that a basic implementation should be doable without to many hurdles (reality will show if I was correct or not).

But first 'hurdle' is that Volvo does not allow just any application to be created and does not (yet) provide the needed details to perform the OAuth steps. I had to 'create an application' (filling in a form after creating an account) and request the application to get 'published'. Did the request and the answer was that it could take 10-14 days before someone (a person) has handled the request and has decided if or if not the application is allowed. So I have to wait for this proces to complete.

Not sure yet if/how I can develop in the meantime. Will look at the details and post more info here once I know more.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

Hello @kiddigital
But first 'hurdle' is that Volvo does not allow just any application to be created and does not (yet) provide the needed details to perform the OAuth steps. I had to 'create an application' (filling in a form after creating an account) and request the application to get 'published'. Did the request and the answer was that it could take 10-14 days before someone (a person) has handled the request and has decided if or if not the application is allowed. So I have to wait for this process to complete.
Is this true, as I understood that you are able to create your application and when it is finished, then you request the application to be published.
This could indeed take 10-14 days, as they do it manually currently.

If you register (I did it with the gmail account), you can start.
Give your project a name. That is up to you, but I think it should be a useful name in Domoticz afterwards too.
Then you get a screen with 2 API keys, for 2 different applications. I think for this project 1 is enough. And you have the "Demo User Access Token".

Screenshot_Volvo_API.png
Screenshot_Volvo_API.png (24.71 KiB) Viewed 3946 times
So I think you can already start with those information.

Regards
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Connected Cars

Post by kiddigital »

Yes, that is what I did as well. And I can get a (temporary) access token to try the API of a demo vehicle.

So I think I can do some initial work.

Did submit the publish request also, so I will also just wait and see
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

Hello @kiddigital,

I have been playing around with the new Volvo Extended Vehicle API together with Node Red.
In order, to be able to compare the results against the currently used Python script from Molobrakos, together with MQTT and Node Red, I did not use the DEMO car, but I used my own car (with the Volvo on Call credentials).

I have to say, it is really one of the easiest API's I ever implemented. Very straight forward. The only confusing and disturbing factor is the way, they do the authentication. The generated key values time out and you have to insert a new value after some time of inactivity.

(E.g. if you go for dinner or another break and you return afterwards, your flow has stopped and requires a new key).

It works in 3 steps.

1. Request your Vehicle Identification Number (VIN). You can find this number also in your app, license papers or windscreen.
2. Request the resources for this car with the VIN number.
3. Request for every available resource the value.

The result is shown below.
Screenshot_Volvo_Extended_API_1.png
Screenshot_Volvo_Extended_API_1.png (38.76 KiB) Viewed 3933 times
The flow starts with a simple "Inject" node, which triggers a "Function" node.

The contents is:

Code: Select all

msg.url = 'https://api.volvocars.com/extended-vehicle/v1/vehicles';
return msg;
This is the first URL to query and it will return the vehicle ID (VIN)
I created a subflow, containing a "Function" node, with the msg.headers and the "HTTP request" node.
This subflow can be used on multiple places (in my case 3) and saves me the hassle of inserting keys in multiple places.

Screenshot_Volvo_Extended_API_4.png
Screenshot_Volvo_Extended_API_4.png (6.3 KiB) Viewed 3933 times
The result you can see in the first returned message in the picture below.

If you have more Volvo cars registered, you will get returned more than 1 ID in an array. However I own only 1 Volvo, so there is only 1 element in the array.

The output is connected to the input of another "Function" node and the vehicle ID is inserted in the next URL to call.

Code: Select all

for (var i = 0; i < msg.payload.vehicles.length; i++) {
var newMsg = {};
newMsg.url = 'https://api.volvocars.com/extended-vehicle/v1/vehicles/' + msg.payload.vehicles[i].id + '/resources';
node.send(newMsg);
}
return null;
This will result in an array of all available resources for this type of car. See the second message in the picture below.
The main contents of each element is the URL to query for the available data.
The output is connected to the input of another "Function" node and the URL found in the previous result is used to get the data for the available resources. In my case it are 36 resources.

The contents of the "Function" node is as follows:

Code: Select all

for (var i = 0; i < msg.payload.resources.length; i++) {
var newMsg = {};
newMsg.url = msg.payload.resources[i].href;
node.send(newMsg);
}
return null;
Next step is to convert to the required Domoticz format for each resource and push the data to a MQTT Output node and to Domoticz.
That is quite simple to do.

See the picture below for the messages (The VIN has been obscured):

Screenshot_Volvo_Extended_API_2.png
Screenshot_Volvo_Extended_API_2.png (42.95 KiB) Viewed 3933 times
This gives you a small overview of what to expect from the API.

Best regards
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Connected Cars

Post by kiddigital »

@FireWizard , just played a little again with the Volvo API but somehow the console does not generate a usable new access token. It generates as new one, but the expire time of the new token remains at the initial time in the past (in my case 2 days ago). So with this new, but expired, accesstoken I cannot access the API :(

Makes it hard (almost impossible) to continue at this moment. Hopefully this problem gets resolved soon.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

@kiddigital

I'm also playing, but I have difficulties to get the DEMO "car" running. I'm able to get an authorization with my own car (as you could see).
The hassle, I meet is that the authorization times out after a hour. Then I have to generate a new token and then I have another hour.

I will try to get the DEMO running and I will let you know what I meet.

Regards
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

Hi @kiddigital,
I will try to get the DEMO running and I will let you know what I meet.
I tried it as well, but same result.

I have sent an email to the Swedes. Let's wait on their reaction.
Dear Sir/Lady,

Since 3/11/2021, 7:59:01 PM the Volvo Extended Vehicle API has stopped
updating its Demo User Access Token.

So it is no longer possible to test applications with the DEMO "car".

With the own car it works correct, but a timeout of 1 hour is rather limited.

--
With Kind regards,
Regards
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

Hello @kiddigital

I noticed, after that I saw some activities yesterday evening, that the Volvo Demo site is working again and that you can get a "Demo User Access Token", which will expire after 1 hour. This is the same as for "My Volvo Car Access Token", also a hour.

I have tested my working application, with both the DEMO "car" and my own car.
Both "cars" are working fine and I have implemented all available sensors as documented.

The DEMO "car" supports 35 out 39 available sensors, while my car support 36 out of 39.

In order to support people to decide, whether they go for the new Volvo Extended Vehicle API, the Python script (https://github.com/molobrakos/volvooncall) or the standard Android app or IOS app, I have created an Excel sheet to compare the three different applications.

For myself, it will probably be a combination of the first and the second.

In my opinion the Extended Vehicle API is missing an important piece of data, the co-ordinates (lat/lon) of the car, which I use to put the car on a (Openstreet) map, and so track the car. In general trip information is missing, such as "Last trip".

It works and later this evening I will post the flow with some explanation.

The excel sheet is attached.

Regards
Attachments
Comparison between Volvo on Call Android App, Molobrakos Python script and Volvo Extended Vehicle API (V40).xlsx
(7.01 KiB) Downloaded 90 times
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

HI all,

I have finished the Node Red flow for the new Volvo Extended Vehicle API and I'm waiting for the Volvo approval.
According to their website, this has to be done currently manually and will take between 10 and 14 days. Working days?

The complete flow can handle all 39 sensors available. However it has been tested with 36 sensors of my private car and the 35 sensors of the "Demo car", offered by Volvo.

The complete flow looks as follows:

Screenshot_Volvo_Extended_API_5.png
Screenshot_Volvo_Extended_API_5.png (69.5 KiB) Viewed 3906 times
The complete flow, you will find below:

Code: Select all

[{"id":"74aed579.228d04","type":"subflow","name":"Volvo Extended API","info":"Subflow to provide Headers to HTTP request.\nRequires msg.url as input.","category":"","in":[{"x":120,"y":80,"wires":[{"id":"969e3345.457bf8"}]}],"out":[{"x":600,"y":80,"wires":[{"id":"11de1bbe.5ff6d4","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"11de1bbe.5ff6d4","type":"http request","z":"74aed579.228d04","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":450,"y":80,"wires":[[]]},{"id":"969e3345.457bf8","type":"function","z":"74aed579.228d04","name":"","func":"msg.headers = {};\nmsg.headers['accept'] = 'application/json';\nmsg.headers['vcc-api-key'] = global.get(\"vcc-api-key\");\nmsg.headers['authorization'] = global.get(\"authorization\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":80,"wires":[["11de1bbe.5ff6d4"]]},{"id":"fc2c4745.3d9bb8","type":"tab","label":"Volvo","disabled":false,"info":""},{"id":"61a810cc.ef33d","type":"inject","z":"fc2c4745.3d9bb8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":160,"wires":[["f9d10275.84991"]]},{"id":"4e2ecc27.ba8874","type":"debug","z":"fc2c4745.3d9bb8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":810,"y":160,"wires":[]},{"id":"f9d10275.84991","type":"function","z":"fc2c4745.3d9bb8","name":"Set URL (Vehicles)","func":"msg.url = 'https://api.volvocars.com/extended-vehicle/v1/vehicles';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":350,"y":160,"wires":[["2480aadf.fe5f76"]]},{"id":"95d66788.ef6778","type":"comment","z":"fc2c4745.3d9bb8","name":"Get vehicle list","info":"","x":340,"y":120,"wires":[]},{"id":"7c468a1d.85bcb4","type":"comment","z":"fc2c4745.3d9bb8","name":"Get vehicle resources","info":"","x":360,"y":220,"wires":[]},{"id":"ad82eac8.3e8238","type":"debug","z":"fc2c4745.3d9bb8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":260,"wires":[]},{"id":"2fd99f41.6339c8","type":"function","z":"fc2c4745.3d9bb8","name":"Set URL (Resources)","func":"for (var i = 0; i < msg.payload.vehicles.length; i++) {\nvar newMsg = {};\nnewMsg.url = 'https://api.volvocars.com/extended-vehicle/v1/vehicles/' + msg.payload.vehicles[i].id + '/resources';\nnode.send(newMsg);\nnode.done();\n}\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":260,"wires":[["bd630a81.6df9d"]]},{"id":"bd630a81.6df9d","type":"subflow:74aed579.228d04","z":"fc2c4745.3d9bb8","name":"Vehicle Resources","env":[],"x":590,"y":260,"wires":[["ad82eac8.3e8238","bc7718ad.62a178"]]},{"id":"bc7718ad.62a178","type":"function","z":"fc2c4745.3d9bb8","name":"Set URL (Values)","func":"for (var i = 0; i < msg.payload.resources.length; i++) {\nvar newMsg = {};\nnewMsg.topic = msg.payload.resources[i].name;\nnewMsg.url = msg.payload.resources[i].href;\nnode.send(newMsg);\nnode.done();\n}\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":350,"y":360,"wires":[["19b196f5.08c2d1"]]},{"id":"9c5ab621.5498d8","type":"debug","z":"fc2c4745.3d9bb8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":460,"wires":[]},{"id":"19b196f5.08c2d1","type":"subflow:74aed579.228d04","z":"fc2c4745.3d9bb8","name":"Resource Values","env":[],"x":590,"y":360,"wires":[["9c5ab621.5498d8","10b207ce.d086e8"]]},{"id":"2480aadf.fe5f76","type":"subflow:74aed579.228d04","z":"fc2c4745.3d9bb8","name":"Vehicle List","env":[],"x":570,"y":160,"wires":[["4e2ecc27.ba8874","2fd99f41.6339c8"]]},{"id":"abe0e8f9.d4fd2","type":"comment","z":"fc2c4745.3d9bb8","name":"Get resources values","info":"","x":360,"y":320,"wires":[]},{"id":"e1458998.134a1","type":"config","z":"fc2c4745.3d9bb8","name":"Config Domoticz IDX voor Volvo Extended VehicleAPI","properties":[{"p":"IDXaverageFuelConsumption","pt":"flow","to":"1","tot":"num"},{"p":"IDXaverageSpeed","pt":"flow","to":"2","tot":"num"},{"p":"IDXbackupBatteryRemaining","pt":"flow","to":"3","tot":"num"},{"p":"IDXbrakeFluid","pt":"flow","to":"4","tot":"num"},{"p":"IDXcarLocked","pt":"flow","to":"5","tot":"num"},{"p":"IDXdistanceToEmpty","pt":"flow","to":"6","tot":"num"},{"p":"IDXengineCoolantLevel","pt":"flow","to":"7","tot":"num"},{"p":"IDXengineCoolantTemp","pt":"flow","to":"8","tot":"num"},{"p":"IDXengineHoursToService","pt":"flow","to":"9","tot":"num"},{"p":"IDXengineRunning","pt":"flow","to":"10","tot":"num"},{"p":"IDXexternalTemp","pt":"flow","to":"11","tot":"num"},{"p":"IDXfrontLeftDoorOpen","pt":"flow","to":"12","tot":"num"},{"p":"IDXfrontLeftTyrePressure","pt":"flow","to":"13","tot":"num"},{"p":"IDXfrontLeftWindowOpen","pt":"flow","to":"14","tot":"num"},{"p":"IDXfrontRightDoorOpen","pt":"flow","to":"15","tot":"num"},{"p":"IDXfrontRightTyrePressure","pt":"flow","to":"16","tot":"num"},{"p":"IDXfrontRightWindowOpen","pt":"flow","to":"17","tot":"num"},{"p":"IDXfuelAmount","pt":"flow","to":"18","tot":"num"},{"p":"IDXhoodOpen","pt":"flow","to":"19","tot":"num"},{"p":"IDXkmToService","pt":"flow","to":"20","tot":"num"},{"p":"IDXmainBatteryStatus","pt":"flow","to":"21","tot":"num"},{"p":"IDXmonthsToService","pt":"flow","to":"22","tot":"num"},{"p":"IDXodometer","pt":"flow","to":"23","tot":"num"},{"p":"IDXoilLevel","pt":"flow","to":"24","tot":"num"},{"p":"IDXrearLeftDoorOpen","pt":"flow","to":"25","tot":"num"},{"p":"IDXrearLeftTyrePressure","pt":"flow","to":"26","tot":"num"},{"p":"IDXrearLeftWindowOpen","pt":"flow","to":"27","tot":"num"},{"p":"IDXrearRightDoorOpen","pt":"flow","to":"28","tot":"num"},{"p":"IDXrearRightTyrePressure","pt":"flow","to":"29","tot":"num"},{"p":"IDXrearRightWindowOpen","pt":"flow","to":"30","tot":"num"},{"p":"IDXserviceWarningStatus","pt":"flow","to":"31","tot":"num"},{"p":"IDXserviceWarningTrigger","pt":"flow","to":"32","tot":"num"},{"p":"IDXtailGateOpen","pt":"flow","to":"33","tot":"num"},{"p":"IDXtripMeter1","pt":"flow","to":"34","tot":"num"},{"p":"IDXtripMeter2","pt":"flow","to":"35","tot":"num"},{"p":"IDXwasherFluidLevel","pt":"flow","to":"36","tot":"num"},{"p":"IDXoilPressure","pt":"flow","to":"37","tot":"num"},{"p":"IDXbulbFailure","pt":"flow","to":"38","tot":"num"},{"p":"IDXcabOpen","pt":"flow","to":"39","tot":"num"}],"active":true,"x":720,"y":40,"wires":[]},{"id":"10b207ce.d086e8","type":"function","z":"fc2c4745.3d9bb8","name":"Prepare to Domoticz","func":"switch (msg.topic) {\n\n    case \"averageSpeed\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.averageSpeed.value};\n    break;\n\n    case \"averageFuelConsumption\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.averageFuelConsumption.value};\n    break;\n\n    case \"brakeFluid\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.brakeFluid.value};\n    break;\n\n    case \"backupBatteryRemaining\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.backupBatteryRemaining.value};\n    break;\n\n    case \"carLocked\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.carLocked.value};\n    break;\n\n    case \"distanceToEmpty\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.distanceToEmpty.value};\n    break;\n\n    case \"engineCoolantLevel\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.engineCoolantLevel.value};\n    break;\n\n    case \"engineHoursToService\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.engineHoursToService.value};\n    break;\n\n    case \"engineCoolantTemp\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.engineCoolantTemp.value};\n    break;\n\n    case \"engineRunning\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.engineRunning.value};\n    break;\n\n    case \"externalTemp\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.externalTemp.value};\n    break;\n\n    case \"frontLeftDoorOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.frontLeftDoorOpen.value};\n    break;\n\n    case \"frontLeftTyrePressure\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.frontLeftTyrePressure.value};\n    break;\n\n    case \"frontLeftWindowOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.frontLeftWindowOpen.value};\n    break;\n\n    case \"frontRightDoorOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.frontRightDoorOpen.value};\n    break;\n\n    case \"frontRightTyrePressure\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.frontRightTyrePressure.value};\n    break;\n\n    case \"frontRightWindowOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.frontRightWindowOpen.value};\n    break;\n\n    case \"fuelAmount\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.fuelAmount.value};\n    break;\n\n    case \"hoodOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.hoodOpen.value};\n    break;\n\n    case \"kmToService\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.kmToService.value};\n    break;\n\n    case \"mainBatteryStatus\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.mainBatteryStatus.value};\n    break;\n\n    case \"monthsToService\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.monthsToService.value};\n    break;\n\n    case \"odometer\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.odometer.value};\n    break;\n\n    case \"oilLevel\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.oilLevel.value};\n    break;\n\n    case \"oilPressure\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.oilPressure.value};\n    break;\n\n    case \"rearLeftWindowOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.rearLeftWindowOpen.value};\n    break;\n\n    case \"rearRightDoorOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.rearRightDoorOpen.value};\n    break;\n\n    case \"rearRightTyrePressure\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.rearRightTyrePressure.value};\n    break;\n\n    case \"rearLeftDoorOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.rearLeftDoorOpen.value};\n    break;\n\n    case \"rearLeftTyrePressure\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.rearLeftTyrePressure.value};\n    break;\n\n    case \"washerFluidLevel\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.washerFluidLevel.value};\n    break;\n\n    case \"serviceWarningTrigger\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.serviceWarningTrigger.value};\n    break;\n\n    case \"tripMeter1\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.tripMeter1.value};\n    break;\n\n    case \"tripMeter2\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.tripMeter2.value};\n    break;\n\n    case \"serviceWarningStatus\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.serviceWarningStatus.value};\n    break;\n\n    case \"tailGateOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.tailGateOpen.value};\n    break;\n\n    case \"rearRightWindowOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.rearRightWindowOpen.value};\n    break;\n\n    case \"bulbFailure\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.bulbFailure.value};\n    break;\n\n    case \"cabOpen\":\n    msg.payload = {\"command\":\"udevice\",\"idx\":flow.get(\"IDX\" + msg.topic),\"nvalue\":0,\"svalue\":msg.payload.cabOpen.value};\n    break;\n\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":360,"wires":[["abf0ba6a.04619"]]},{"id":"abf0ba6a.04619","type":"debug","z":"fc2c4745.3d9bb8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1070,"y":420,"wires":[]},{"id":"40715bb7.f232dc","type":"config","z":"fc2c4745.3d9bb8","name":"Config VCC API Key and Volvo Car Access Token","properties":[{"p":"vcc-api-key","pt":"global","to":"","tot":"str"},{"p":"authorization","pt":"global","to":"","tot":"str"}],"active":true,"x":270,"y":40,"wires":[]},{"id":"95d6631b.f1db7","type":"mqtt out","z":"fc2c4745.3d9bb8","name":"To Domoticz","topic":"domoticz/in","qos":"2","retain":"false","broker":"f9f13036.e28b58","x":1070,"y":360,"wires":[]},{"id":"8b47d185.2d8ad","type":"comment","z":"fc2c4745.3d9bb8","name":"Enable to read VIN","info":"","x":830,"y":120,"wires":[]},{"id":"13e36eda.378481","type":"comment","z":"fc2c4745.3d9bb8","name":"Enable to read Resources","info":"","x":850,"y":220,"wires":[]},{"id":"2601a3ab.cc1514","type":"comment","z":"fc2c4745.3d9bb8","name":"Enable to read Values","info":"","x":840,"y":420,"wires":[]},{"id":"f9f13036.e28b58","type":"mqtt-broker","name":"localhost","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
You will also need a subflow, which is called "Volvo Extended API",

You will find this flow below:

Code: Select all

[{"id":"74aed579.228d04","type":"subflow","name":"Volvo Extended API","info":"Subflow to provide Headers to HTTP request.\nRequires msg.url as input.","category":"","in":[{"x":120,"y":80,"wires":[{"id":"969e3345.457bf8"}]}],"out":[{"x":600,"y":80,"wires":[{"id":"11de1bbe.5ff6d4","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"11de1bbe.5ff6d4","type":"http request","z":"74aed579.228d04","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":450,"y":80,"wires":[[]]},{"id":"969e3345.457bf8","type":"function","z":"74aed579.228d04","name":"","func":"msg.headers = {};\nmsg.headers['accept'] = 'application/json';\nmsg.headers['vcc-api-key'] = global.get(\"vcc-api-key\");\nmsg.headers['authorization'] = global.get(\"authorization\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":80,"wires":[["11de1bbe.5ff6d4"]]}]
This subflow consists of two nodes.

Screenshot_Volvo_Extended_API_6.png
Screenshot_Volvo_Extended_API_6.png (6.29 KiB) Viewed 3906 times
The "Function" node contains the Headers, that has to be sent with every request.

The contents is:

Code: Select all

msg.headers = {};
msg.headers['accept'] = 'application/json';
msg.headers['vcc-api-key'] = global.get("vcc-api-key");
msg.headers['authorization'] = global.get("authorization");
return msg;
The variables for vcc-api-key and authorization are stored in a environment variable.
The "http request" node does not need any further configuration. The method is "Get" and it returns "a parsed JSON object"

The flow itself has already been explained in my post, dated 12 Mar 2021, 22:22

New are two "Configuration" nodes, which you have to install from the Palette.
You can find this node under: node-red-contrib-config
More info at: https://flows.nodered.org/node/node-red-contrib-config

The left "Configuration" node is used for the configuration of the variables for vcc-api-key and authorization.
This is more convenient than to look for a "Function" node in a Subflow.

The right "Configuration" node is used to configure the Domoticz IDX numbers.
All 39 possible sensors are pre-configured. If someone want to reduce the number of received sensors, that will be sent to Domoticz, you can simple delete the environment variable. Delete also the corresponding block of code in the last "Function" node.

The Confiuration node sets an environment variable composed by IDX and the topic (so example: IDXaverageFuelConsumption)
The topic is set in the last Function node that parses the array, received from Volvo.

Code: Select all

for (var i = 0; i < msg.payload.resources.length; i++) {
var newMsg = {};
newMsg.topic = msg.payload.resources[i].name;
newMsg.url = msg.payload.resources[i].href;
node.send(newMsg);
node.done();
}
return null;
The last "Function" node is a large "switch/case" statement and works default with any Domoticz sensor, which expects its value as "svalue", such as Temperature Sensors, Custom Sensors and Text Sensors.

Every Volvo user can test this flow by creating an account at: https://developer.volvocars.com/volvo-api/ (Sign up or Log in)
Next step: CREATE APPLICATION and give your application a name.

Let me know in case of problems.

Regards
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Connected Cars

Post by kiddigital »

@FireWizard, thx for letting me know. I will give it a run sometime this week hopefully.

Maybe create a separate ‘Volvo on Call API’ forum thread to continue?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
FireWizard
Posts: 1889
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Connected Cars

Post by FireWizard »

Hello @kiddigital,

You wondered:
Maybe create a separate ‘Volvo on Call API’ forum thread to continue?
I have been starting this thread more than 2 years ago, as, at that, time there was nothing about "connected" cars.
Most posts discuss mainly Volvo with the Python script of Molobrakos, although a number of post also discusses issues about BMW and Mercedes.
I even made a detailed description, how to do this, together with MQTT and Node Red.

If the Volvo Extended Vehicle API is extended in the future and the Domoticz hardware is implemented, people will stop focusing on the Python script for Volvo and will move to the Domoticz hardware. Sooner or later this thread will be obsolete.

In spite of the fact that I already posted some posts in this thread, describing the extended Volvo vehicle API, together with Node Red and MQTT, I am in favor to start a new thread, specifically for the use of this API. Also the use of other cars (Tesla and Mercedes) has already got their own thread.

So I suggest to open a new thread for the Volvo extended vehicle API, as soon as the Domoticz "hardware" component is ready.
Perhaps, also to ask a moderator to move all the posts, starting March 9, to this new thread if this is possible.

Regards
WvdM78
Posts: 9
Joined: Wednesday 01 April 2020 14:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: The Netherlands
Contact:

Re: Connected Cars

Post by WvdM78 »

Filip wrote: Sunday 28 February 2021 16:21 FYI. I added recently the possibility to execute remote services (LIGHT, HORN, HEATING/ARICO).
This allows me starting my AIRCO/HEATING from any script. I have a script that reads my calendar... So I can book my airco/heating in advance :-).
Filip
Hi Filip,

I recently found out that you have made the Domoticz-BMW plugin, which is great news! I am trying to install it to read the values of a BMW i3, but I get some errors in the log of domotics. I am not sure I have the right libraries installed; i have installed:
urllib3_1_26_2 1.26.2.0
datetime3
json-python3

So far I managed to install the script, and with debuggin on it initialises quite well, but cannot get any values. It seems it is stuck on a readevent.
Authentication is without errors, at the second or third readevent it gives the following log:
---
2021-03-20 21:20:18.981 (BMW Connected) Processing 'ReadEvent' message
2021-03-20 21:20:18.981 (BMW Connected) Received 1508 bytes of data
2021-03-20 21:20:18.982 (BMW Connected) 48 54 54 50 2f 31 2e 31 20 34 30 30 20 42 61 64 20 52 65 71 HTTP/1.1.400.Bad.Req
2021-03-20 21:20:18.982 (BMW Connected) 75 65 73 74 0d 0a 44 61 74 65 3a 20 53 61 74 2c 20 32 30 20 uest..Date:.Sat,.20.
2021-03-20 21:20:18.982 (BMW Connected) 4d 61 72 20 32 30 32 31 20 32 30 3a 32 30 3a 31 38 20 47 4d Mar.2021.20:20:18.GM
2021-03-20 21:20:18.982 (BMW Connected) 54 0d 0a 53 65 72 76 65 72 3a 20 41 70 61 63 68 65 0d 0a 4d T..Server:.Apache..M
2021-03-20 21:20:18.982 (BMW Connected) 61 78 2d 46 6f 72 77 61 72 64 73 3a 20 32 30 0d 0a 56 69 61 ax-Forwards:.20..Via
2021-03-20 21:20:18.982 (BMW Connected) 3a 20 31 2e 30 20 6c 70 63 64 61 70 69 67 61 70 70 30 35 20 :.1.0.lpcdapigapp05.
2021-03-20 21:20:18.982 (BMW Connected) 28 29 0d 0a 58 2d 43 6f 72 72 65 6c 61 74 69 6f 6e 49 44 3a ()..X-CorrelationID:
2021-03-20 21:20:18.982 (BMW Connected) 20 49 64 2d 30 32 35 39 35 36 36 30 30 35 62 38 39 63 64 35 .Id-0259566005b89cd5
2021-03-20 21:20:18.983 (BMW Connected) 30 33 64 36 36 62 34 36 20 30 0d 0a 58 2d 46 72 61 6d 65 2d 03d66b46.0..X-Frame-
2021-03-20 21:20:18.983 (BMW Connected) 4f 70 74 69 6f 6e 73 3a 20 53 41 4d 45 4f 52 49 47 49 4e 0d Options:.SAMEORIGIN.
2021-03-20 21:20:18.983 (BMW Connected) 0a 43 6f 6e 74 65 6e 74 2d 4c 61 6e 67 75 61 67 65 3a 20 0d .Content-Language:..
2021-03-20 21:20:18.983 (BMW Connected) 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f .Content-Type:.text/
2021-03-20 21:20:18.983 (BMW Connected) 68 74 6d 6c 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 35 38 html..Set-Cookie:.58
2021-03-20 21:20:18.983 (BMW Connected) 35 65 64 64 39 37 63 61 30 64 39 34 36 37 66 63 30 35 35 63 5edd97ca0d9467fc055c
2021-03-20 21:20:18.983 (BMW Connected) 62 35 63 31 65 31 34 35 65 64 3d 36 30 37 35 33 36 33 32 37 b5c1e145ed=607536327
2021-03-20 21:20:18.984 (BMW Connected) 62 35 36 62 66 37 32 62 62 36 36 36 36 61 62 66 32 61 32 64 b56bf72bb6666abf2a2d
2021-03-20 21:20:18.984 (BMW Connected) 36 63 30 3b 20 70 61 74 68 3d 2f 3b 20 48 74 74 70 4f 6e 6c 6c0;.path=/;.HttpOnl
2021-03-20 21:20:18.984 (BMW Connected) 79 3b 20 53 65 63 75 72 65 0d 0a 53 65 74 2d 43 6f 6f 6b 69 y;.Secure..Set-Cooki
2021-03-20 21:20:18.984 (BMW Connected) 65 3a 20 52 4f 55 54 45 49 44 3d 2e 30 3b 20 70 61 74 68 3d e:.ROUTEID=.0;.path=
2021-03-20 21:20:18.984 (BMW Connected) 2f 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 /..Connection:.close
2021-03-20 21:20:18.984 (BMW Connected) 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 69 6e 67 3a ..Transfer-Encoding:
2021-03-20 21:20:18.984 (BMW Connected) 20 63 68 75 6e 6b 65 64 0d 0a 0d 0a 34 32 64 0d 0a 3c 21 44 .chunked....42d..<!D
2021-03-20 21:20:18.985 (BMW Connected) 4f 43 54 59 50 45 20 68 74 6d 6c 20 50 55 42 4c 49 43 20 22 OCTYPE.html.PUBLIC."
2021-03-20 21:20:18.985 (BMW Connected) 2d 2f 2f 57 33 43 2f 2f 44 54 44 20 58 48 54 4d 4c 20 31 2e -//W3C//DTD.XHTML.1.
2021-03-20 21:20:18.985 (BMW Connected) 30 20 53 74 72 69 63 74 2f 2f 45 4e 22 20 22 68 74 74 70 3a 0.Strict//EN"."http:
2021-03-20 21:20:18.985 (BMW Connected) 2f 2f 77 77 77 2e 77 33 2e 6f 72 67 2f 54 52 2f 78 68 74 6d //www.w3.org/TR/xhtm
2021-03-20 21:20:18.985 (BMW Connected) 6c 31 2f 44 54 44 2f 78 68 74 6d 6c 31 2d 73 74 72 69 63 74 l1/DTD/xhtml1-strict
2021-03-20 21:20:18.985 (BMW Connected) 2e 64 74 64 22 3e 3c 68 74 6d 6c 20 78 6d 6c 6e 73 3d 22 68 .dtd"><html.xmlns="h
2021-03-20 21:20:18.985 (BMW Connected) 74 74 70 3a 2f 2f 77 77 77 2e 77 33 2e 6f 72 67 2f 31 39 39 ttp://www.w3.org/199
2021-03-20 21:20:18.985 (BMW Connected) 39 2f 78 68 74 6d 6c 22 3e 3c 68 65 61 64 3e 3c 74 69 74 6c 9/xhtml"><head><titl
2021-03-20 21:20:18.986 (BMW Connected) 65 3e 50 61 79 61 72 61 20 4d 69 63 72 6f 20 23 62 61 64 61 e>Payara.Micro.#bada
2021-03-20 21:20:18.986 (BMW Connected) 73 73 66 69 73 68 20 2d 20 45 72 72 6f 72 20 72 65 70 6f 72 ssfish.-.Error.repor
2021-03-20 21:20:18.986 (BMW Connected) 74 3c 2f 74 69 74 6c 65 3e 3c 73 74 79 6c 65 20 74 79 70 65 t</title><style.type
2021-03-20 21:20:18.986 (BMW Connected) 3d 22 74 65 78 74 2f 63 73 73 22 3e 3c 21 2d 2d 48 31 20 7b ="text/css"><!--H1.{
2021-03-20 21:20:18.986 (BMW Connected) 66 6f 6e 74 2d 66 61 6d 69 6c 79 3a 54 61 68 6f 6d 61 2c 41 font-family:Tahoma,A
2021-03-20 21:20:18.986 (BMW Connected) 72 69 61 6c 2c 73 61 6e 73 2d 73 65 72 69 66 3b 63 6f 6c 6f rial,sans-serif;colo
2021-03-20 21:20:18.986 (BMW Connected) 72 3a 77 68 69 74 65 3b 62 61 63 6b 67 72 6f 75 6e 64 2d 63 r:white;background-c
2021-03-20 21:20:18.986 (BMW Connected) 6f 6c 6f 72 3a 23 35 32 35 44 37 36 3b 66 6f 6e 74 2d 73 69 olor:#525D76;font-si
2021-03-20 21:20:18.987 (BMW Connected) 7a 65 3a 32 32 70 78 3b 7d 20 48 32 20 7b 66 6f 6e 74 2d 66 ze:22px;}.H2.{font-f
2021-03-20 21:20:18.987 (BMW Connected) 61 6d 69 6c 79 3a 54 61 68 6f 6d 61 2c 41 72 69 61 6c 2c 73 amily:Tahoma,Arial,s
2021-03-20 21:20:18.987 (BMW Connected) 61 6e 73 2d 73 65 72 69 66 3b 63 6f 6c 6f 72 3a 77 68 69 74 ans-serif;color:whit
2021-03-20 21:20:18.987 (BMW Connected) 65 3b 62 61 63 6b 67 72 6f 75 6e 64 2d 63 6f 6c 6f 72 3a 23 e;background-color:#
2021-03-20 21:20:18.987 (BMW Connected) 35 32 35 44 37 36 3b 66 6f 6e 74 2d 73 69 7a 65 3a 31 36 70 525D76;font-size:16p
2021-03-20 21:20:18.987 (BMW Connected) 78 3b 7d 20 48 33 20 7b 66 6f 6e 74 2d 66 61 6d 69 6c 79 3a x;}.H3.{font-family:
2021-03-20 21:20:18.987 (BMW Connected) 54 61 68 6f 6d 61 2c 41 72 69 61 6c 2c 73 61 6e 73 2d 73 65 Tahoma,Arial,sans-se
2021-03-20 21:20:18.987 (BMW Connected) 72 69 66 3b 63 6f 6c 6f 72 3a 77 68 69 74 65 3b 62 61 63 6b rif;color:white;back
2021-03-20 21:20:18.988 (BMW Connected) 67 72 6f 75 6e 64 2d 63 6f 6c 6f 72 3a 23 35 32 35 44 37 36 ground-color:#525D76
2021-03-20 21:20:18.988 (BMW Connected) 3b 66 6f 6e 74 2d 73 69 7a 65 3a 31 34 70 78 3b 7d 20 42 4f ;font-size:14px;}.BO
2021-03-20 21:20:18.988 (BMW Connected) 44 59 20 7b 66 6f 6e 74 2d 66 61 6d 69 6c 79 3a 54 61 68 6f DY.{font-family:Taho
2021-03-20 21:20:18.988 (BMW Connected) 6d 61 2c 41 72 69 61 6c 2c 73 61 6e 73 2d 73 65 72 69 66 3b ma,Arial,sans-serif;
2021-03-20 21:20:18.988 (BMW Connected) 63 6f 6c 6f 72 3a 62 6c 61 63 6b 3b 62 61 63 6b 67 72 6f 75 color:black;backgrou
2021-03-20 21:20:18.988 (BMW Connected) 6e 64 2d 63 6f 6c 6f 72 3a 77 68 69 74 65 3b 7d 20 42 20 7b nd-color:white;}.B.{
2021-03-20 21:20:18.988 (BMW Connected) 66 6f 6e 74 2d 66 61 6d 69 6c 79 3a 54 61 68 6f 6d 61 2c 41 font-family:Tahoma,A
2021-03-20 21:20:18.989 (BMW Connected) 72 69 61 6c 2c 73 61 6e 73 2d 73 65 72 69 66 3b 63 6f 6c 6f rial,sans-serif;colo
2021-03-20 21:20:18.989 (BMW Connected) 72 3a 77 68 69 74 65 3b 62 61 63 6b 67 72 6f 75 6e 64 2d 63 r:white;background-c
2021-03-20 21:20:18.989 (BMW Connected) 6f 6c 6f 72 3a 23 35 32 35 44 37 36 3b 7d 20 50 20 7b 66 6f olor:#525D76;}.P.{fo
2021-03-20 21:20:18.989 (BMW Connected) 6e 74 2d 66 61 6d 69 6c 79 3a 54 61 68 6f 6d 61 2c 41 72 69 nt-family:Tahoma,Ari
2021-03-20 21:20:18.989 (BMW Connected) 61 6c 2c 73 61 6e 73 2d 73 65 72 69 66 3b 62 61 63 6b 67 72 al,sans-serif;backgr
2021-03-20 21:20:18.989 (BMW Connected) 6f 75 6e 64 3a 77 68 69 74 65 3b 63 6f 6c 6f 72 3a 62 6c 61 ound:white;color:bla
2021-03-20 21:20:18.989 (BMW Connected) 63 6b 3b 66 6f 6e 74 2d 73 69 7a 65 3a 31 32 70 78 3b 7d 41 ck;font-size:12px;}A
2021-03-20 21:20:18.989 (BMW Connected) 20 7b 63 6f 6c 6f 72 20 3a 20 62 6c 61 63 6b 3b 7d 48 52 20 .{color.:.black;}HR.
2021-03-20 21:20:18.990 (BMW Connected) 7b 63 6f 6c 6f 72 20 3a 20 23 35 32 35 44 37 36 3b 7d 2d 2d {color.:.#525D76;}--
2021-03-20 21:20:18.990 (BMW Connected) 3e 3c 2f 73 74 79 6c 65 3e 20 3c 2f 68 65 61 64 3e 3c 62 6f ></style>.</head><bo
2021-03-20 21:20:18.990 (BMW Connected) 64 79 3e 3c 68 31 3e 48 54 54 50 20 53 74 61 74 75 73 20 34 dy><h1>HTTP.Status.4
2021-03-20 21:20:18.990 (BMW Connected) 30 30 20 2d 20 42 61 64 20 52 65 71 75 65 73 74 3c 2f 68 31 00.-.Bad.Request</h1
2021-03-20 21:20:18.990 (BMW Connected) 3e 3c 68 72 2f 3e 3c 70 3e 3c 62 3e 74 79 70 65 3c 2f 62 3e ><hr/><p><b>type</b>
2021-03-20 21:20:18.990 (BMW Connected) 20 53 74 61 74 75 73 20 72 65 70 6f 72 74 3c 2f 70 3e 3c 70 .Status.report</p><p
2021-03-20 21:20:18.990 (BMW Connected) 3e 3c 62 3e 6d 65 73 73 61 67 65 3c 2f 62 3e 42 61 64 20 52 ><b>message</b>Bad.R
2021-03-20 21:20:18.991 (BMW Connected) 65 71 75 65 73 74 3c 2f 70 3e 3c 70 3e 3c 62 3e 64 65 73 63 equest</p><p><b>desc
2021-03-20 21:20:18.991 (BMW Connected) 72 69 70 74 69 6f 6e 3c 2f 62 3e 54 68 65 20 72 65 71 75 65 ription</b>The.reque
2021-03-20 21:20:18.991 (BMW Connected) 73 74 20 73 65 6e 74 20 62 79 20 74 68 65 20 63 6c 69 65 6e st.sent.by.the.clien
2021-03-20 21:20:18.991 (BMW Connected) 74 20 77 61 73 20 73 79 6e 74 61 63 74 69 63 61 6c 6c 79 20 t.was.syntactically.
2021-03-20 21:20:18.991 (BMW Connected) 69 6e 63 6f 72 72 65 63 74 2e 3c 2f 70 3e 3c 68 72 2f 3e 3c incorrect.</p><hr/><
2021-03-20 21:20:18.991 (BMW Connected) 68 33 3e 50 61 79 61 72 61 20 4d 69 63 72 6f 20 23 62 61 64 h3>Payara.Micro.#bad
2021-03-20 21:20:18.991 (BMW Connected) 61 73 73 66 69 73 68 3c 2f 68 33 3e 3c 2f 62 6f 64 79 3e 3c assfish</h3></body><
2021-03-20 21:20:18.991 (BMW Connected) 2f 68 74 6d 6c 3e 0d 0a .. .. .. .. .. .. .. .. .. .. .. .. /html>..
2021-03-20 21:20:18.992 (BMW Connected) Processing 'ReadEvent' message
2021-03-20 21:20:18.992 (BMW Connected) Received 5 bytes of data
2021-03-20 21:20:18.992 (BMW Connected) 30 0d 0a 0d 0a .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 0....
2021-03-20 21:20:18.993 (BMW Connected) Pushing 'onMessageCallback' on to queue
2021-03-20 21:20:18.993 (BMW Connected) Processing 'DisconnectedEvent' message
2021-03-20 21:20:18.993 (BMW Connected) Disconnect event received for 'b2vapi.bmwgroup.com:443'.
---

The callback is Bad request / 'The request sent by client was syntactically incorrect.

Could you please indicate if i did anything wrong?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest