Page 3 of 5

Re: Connected Cars

Posted: Monday 20 July 2020 20:30
by mojojojo490
sincze wrote: Wednesday 01 April 2020 15:33
WvdM78 wrote: Wednesday 01 April 2020 14:52 Well we could have a look at it as your i3 has BMW-Connected and the data is available.
Image
bmw.png
Hi sinze,
how do you get these nice pictures?
I am looking for my new Volvo V60.

Re: Connected Cars

Posted: Monday 20 July 2020 21:15
by FireWizard
@mojojojo490

Hi,

A lot of these pictures you can find on the Internet, especially in the online brochures of the car.
Perhaps, you have to be a little creative and combine multiple picture to one that fits you.

On page 42 of the Howto, you can find that I used a single picture of my V40 for all the sensors.
See: https://github.com/FireWizard52/Volvo-o ... 0Howto.pdf

Regards

Re: Connected Cars

Posted: Tuesday 21 July 2020 18:00
by kiddigital
MrHobbes74 wrote: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 a user of a connected (petrol) mercedes, I am looking at reading the data from the car into my Domoticz setup.

As there is no generic ‘connected car’ in Domoticz other than your EVehicles which support door/lid locks, odo meter, range left, etc. I am considering implementing a Mercedes Class.

But as your initial goal was EV’s, not sure if you want to go that direction? Maybe another abstraction is needed so both EV’s and petrol or others can be implemented?

Suggestions?

Re: Connected Cars

Posted: Thursday 23 July 2020 12:21
by mojojojo490
FireWizard wrote: Monday 20 July 2020 21:15 On page 42 of the Howto, you can find that I used a single picture of my V40 for all the sensors.
Yeah, i saw it. Thnx.
I am trying to get the MQTT server started on my Pi 3B+.
It is a kind of troubleshooting now, but i am focused to solve it :D

Re: Connected Cars

Posted: Thursday 23 July 2020 13:50
by FireWizard
Hi,

https://raspberrypi.tilburgs.com/mosquitto-mqtt/

If you have specific issues, do not hesitate to ask.

Regards

Re: Connected Cars

Posted: Thursday 23 July 2020 22:39
by JimmyH1969
kiddigital wrote: Tuesday 21 July 2020 18:00
MrHobbes74 wrote: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 a user of a connected (petrol) mercedes, I am looking at reading the data from the car into my Domoticz setup.

As there is no generic ‘connected car’ in Domoticz other than your EVehicles which support door/lid locks, odo meter, range left, etc. I am considering implementing a Mercedes Class.

But as your initial goal was EV’s, not sure if you want to go that direction? Maybe another abstraction is needed so both EV’s and petrol or others can be implemented?

Suggestions?
I'm all in for the Mercedes Class :D

Re: Connected Cars

Posted: Thursday 30 July 2020 18:57
by kiddigital
JimmyH1969 wrote: Thursday 23 July 2020 22:39
kiddigital wrote: Tuesday 21 July 2020 18:00
MrHobbes74 wrote: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 a user of a connected (petrol) mercedes, I am looking at reading the data from the car into my Domoticz setup.

As there is no generic ‘connected car’ in Domoticz other than your EVehicles which support door/lid locks, odo meter, range left, etc. I am considering implementing a Mercedes Class.

But as your initial goal was EV’s, not sure if you want to go that direction? Maybe another abstraction is needed so both EV’s and petrol or others can be implemented?

Suggestions?
I'm all in for the Mercedes Class :D
See Pull Request #4281 for a beta version. Testing is appreciated :)

Re: Connected Cars

Posted: Tuesday 18 August 2020 9:29
by JimmyH1969
kiddigital wrote: Thursday 30 July 2020 18:57
JimmyH1969 wrote: Thursday 23 July 2020 22:39
kiddigital wrote: Tuesday 21 July 2020 18:00
As a user of a connected (petrol) mercedes, I am looking at reading the data from the car into my Domoticz setup.

As there is no generic ‘connected car’ in Domoticz other than your EVehicles which support door/lid locks, odo meter, range left, etc. I am considering implementing a Mercedes Class.

But as your initial goal was EV’s, not sure if you want to go that direction? Maybe another abstraction is needed so both EV’s and petrol or others can be implemented?

Suggestions?
I'm all in for the Mercedes Class :D
See Pull Request #4281 for a beta version. Testing is appreciated :)
Hi, Thanks!, but I'm using Domoticz on Windows. How can i test this Pull Request?

Re: Connected Cars

Posted: Tuesday 18 August 2020 18:12
by kiddigital
JimmyH1969 wrote: Tuesday 18 August 2020 9:29
kiddigital wrote: Thursday 30 July 2020 18:57
JimmyH1969 wrote: Thursday 23 July 2020 22:39

I'm all in for the Mercedes Class :D
See Pull Request #4281 for a beta version. Testing is appreciated :)
Hi, Thanks!, but I'm using Domoticz on Windows. How can i test this Pull Request?
As this is still a PR and not yet part of the Beta, you need to build it yourself from the source repo of the Pull Request. Hopefully that is an option :)

Re: Connected Cars

Posted: Friday 21 August 2020 17:21
by JimmyH1969
kiddigital wrote: Tuesday 18 August 2020 18:12
JimmyH1969 wrote: Tuesday 18 August 2020 9:29
kiddigital wrote: Thursday 30 July 2020 18:57
See Pull Request #4281 for a beta version. Testing is appreciated :)
Hi, Thanks!, but I'm using Domoticz on Windows. How can i test this Pull Request?
As this is still a PR and not yet part of the Beta, you need to build it yourself from the source repo of the Pull Request. Hopefully that is an option :)
I really have no idea how to build the Windows executable from that :D I wish....
Think i have to wait until it is available in a beta version i guess...

I also don't understand this part, can you explain a bit more maybe?

To register you own Mercedes, you have to register with your existing Mercedes Me account at 'https://developer.mercedes-benz.com/' and request access for all 5 BYOCAR API's. Each of those API's has its own scope, so within the request for an access- and refresh token, all 5 scopes have to be supplied (space separated).

Thanks, i do hope to get this working on my Windows Domoticz some day ;)

Re: Connected Cars

Posted: Friday 21 August 2020 22:15
by kiddigital
JimmyH1969 wrote: Friday 21 August 2020 17:21
kiddigital wrote: Tuesday 18 August 2020 18:12
JimmyH1969 wrote: Tuesday 18 August 2020 9:29

Hi, Thanks!, but I'm using Domoticz on Windows. How can i test this Pull Request?
As this is still a PR and not yet part of the Beta, you need to build it yourself from the source repo of the Pull Request. Hopefully that is an option :)
I really have no idea how to build the Windows executable from that :D I wish....
Think i have to wait until it is available in a beta version i guess...

I also don't understand this part, can you explain a bit more maybe?

To register you own Mercedes, you have to register with your existing Mercedes Me account at 'https://developer.mercedes-benz.com/' and request access for all 5 BYOCAR API's. Each of those API's has its own scope, so within the request for an access- and refresh token, all 5 scopes have to be supplied (space separated).

Thanks, i do hope to get this working on my Windows Domoticz some day ;)
@JimmyH1969, to prevent hijacking this topic; I created a new topic to further talk about the (upcoming) Mercedes Me integration.

Re: Connected Cars

Posted: Wednesday 16 September 2020 13:43
by WvdM78
sincze wrote: Wednesday 15 April 2020 9:19
astrapowerrr wrote: Tuesday 14 April 2020 22:16 Hmmm bmw i3 owner... im interested!!
It could be based upon bimmer_connected:
https://github.com/bimmerconnected/bimmer_connected

Code: Select all

# get the latest version of the library
pip3 install --upgrade bimmer_connected

# run the fingerprint function
bimmerconnected fingerprint <username> <password> <region>
Now the trick would be to write a plugin that executes and retrieves the json for parsing.
Other Solution: My solution works with Pass2PHP. I could try to modify the module so you can work with that? Pass2PHP means PHP is required on your system.
I have managed to get bimmer connected (python) working on my Raspberry Pi. I can get an overview of all values. Now I am stuck how to parse these values into Domoticz. Could you give me a direction? If I have time I can share the output of bimmer connected.

Re: Connected Cars

Posted: Wednesday 16 September 2020 17:28
by sincze
Are you able to use PHP ???

Re: Connected Cars

Posted: Wednesday 16 September 2020 19:48
by FireWizard
@WvdM78

Hi,

As you might have read, I connected my Volvo to Domoticz.

The base was a Python script for Home Assistant, but also usable for Domoticz. The available values are published every 5 minutes to a MQTT topic.
Node Red MQTT input node has subscribed to these topics (and ignores the specific HA topics).
The various sensors, switches, etc. are converted to Domoticz Idx in Node Red and pushed to Domoticz.

This setup requires:

1, Working script.
2. Script, that pushes the output of the Python script to Domoticz, with a corresponding Cronjob
3. Working Node Red in your Local Lan
4. MQTT server in your local Lan

If you choose to follow that route, can you publish the output of your bimmer+connected sxript?

Regards

Re: Connected Cars

Posted: Wednesday 16 September 2020 20:46
by kiddigital
WvdM78 wrote:
sincze wrote: Wednesday 15 April 2020 9:19
astrapowerrr wrote: Tuesday 14 April 2020 22:16 Hmmm bmw i3 owner... im interested!!
It could be based upon bimmer_connected:
https://github.com/bimmerconnected/bimmer_connected
...
I have managed to get bimmer connected (python) working on my Raspberry Pi. I can get an overview of all values. Now I am stuck how to parse these values into Domoticz. Could you give me a direction? If I have time I can share the output of bimmer connected.
Domoticz supports python plugins in which you can read and write to (dummy) sensors.

If you ‘just’ adjust your python script to adhere to the Python plug-in structure, you should be able to get the values in Domoticz.

Other options is to code (C++) an implementation for the eVehicle framework in Domoticz, similar to the Tesla or Mercedes implementation to give Domoticz native support.

(I would not mind to give it a try, but as I do not own a BMW , I can not test it so that would make development a very cumbersome process Image)

Re: Connected Cars

Posted: Thursday 17 September 2020 9:24
by sincze
Multiple ways to your goal.

I just grab the values from the JSON and use Pass2PHP as writing a python plugin takes me quite some time.

Code: Select all

$door_lock_state 	= isset($data['attributesMap']['door_lock_state']) 		? $data['attributesMap']['door_lock_state'] : '';
$door_driver_front 	= isset($data['attributesMap']['door_passenger_front']) ? $data['attributesMap']['door_driver_front'] : '';
$door_passenger_front 	= isset($data['attributesMap']['door_passenger_front']) ? $data['attributesMap']['door_passenger_front'] : '';
$door_driver_rear 	= isset($data['attributesMap']['door_driver_rear']) 	? $data['attributesMap']['door_driver_rear'] : '';
$door_passenger_rear	= isset($data['attributesMap']['door_passenger_rear'])	? $data['attributesMap']['door_passenger_rear'] : '';

$window_driver_front	= isset($data['attributesMap']['window_driver_front'])	? $data['attributesMap']['window_driver_front'] : '';
$window_passenger_front	= isset($data['attributesMap']['window_passenger_front']) ? $data['attributesMap']['window_passenger_front'] : '';
$window_driver_rear	= isset($data['attributesMap']['window_driver_rear'])	? $data['attributesMap']['window_driver_rear'] : '';
$window_passenger_rear	= isset($data['attributesMap']['window_passenger_rear'])? $data['attributesMap']['window_passenger_rear'] : '';

$hood_state		= isset($data['attributesMap']['hood_state'])			? $data['attributesMap']['hood_state'] : '';
$trunk_state		= isset($data['attributesMap']['trunk_state'])			? $data['attributesMap']['trunk_state'] : '';
$sunroof_state		= isset($data['attributesMap']['sunroof_state'])		? $data['attributesMap']['sunroof_state'] : '';

$gps_lat            	= isset($data['attributesMap']['gps_lat']) 				? $data['attributesMap']['gps_lat'] : '';			// GPS Coordinates
$gps_lon		= isset($data['attributesMap']['gps_lng']) 				? $data['attributesMap']['gps_lng'] : '';

Re: Connected Cars

Posted: Sunday 18 October 2020 20:32
by Filip
I created an easy plugin to support the BMW Connected Drive. Currently only the mileage, but can easily be extended.
See https://github.com/FilipDem/Domoticz-BMW-plugin.

Re: Connected Cars

Posted: Thursday 22 October 2020 23:32
by flenaers
FireWizard wrote: Wednesday 27 March 2019 20:47 ...
The only command that does not work yet, is remote honk and blink. I don't use this functionality hardly, so it has very low priority for me.
I use only lock/unlock and heater on/off.
....
Hello,
Do you still have the honk-and-blink issue?
This feature requires the user to be close to the car. The API expects the clients location in the body of the POST:

{
"clientAccuracy":0,
"clientLatitude":xx.xxx,
"clientLongitude":yy.yyyy
}

Also applies to Blink Lights and Horn.
Tested and working with PostMan.

Regards

Re: Connected Cars

Posted: Friday 23 October 2020 19:26
by FireWizard
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

Re: Connected Cars

Posted: Friday 06 November 2020 15:21
by Vondee
Filip wrote: Sunday 18 October 2020 20:32 I created an easy plugin to support the BMW Connected Drive. Currently only the mileage, but can easily be extended.
See https://github.com/FilipDem/Domoticz-BMW-plugin.
Hi Filip,

I installed the plugin and works fine! I see all data from my car (BMW X-1 Hybrid) in the log files, so it would be nice to have that data also available in Domoticz!

Regards