Tesla hardware module

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

Moderator: leecollings

Post Reply
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Tesla hardware module

Post by MrHobbes74 »

Hi all,

A new hardware module is introduced in the latest stable release (2020.1): the Tesla hardware.
For more information about how to use the module, see the wiki: https://www.domoticz.com/wiki/EVehicles

The module connects to your Tesla electronic vehicle, and provides you with:
- a battery level indicator
- an alert indicator giving you the status of the car
- a temperature meter indicating the temperature inside the Tesla
- a temperature meter indicating the temperature outside the Tesla
- an alert indicator giving you an alert for open windows/doors/unlocked Tesla [2012.2 beta build 12004]
- an odometer indicating the total driven mileage of the Tesla [2012.2 beta build 12004]
- a switch to turn on / off charging
- a switch to turn on / off climate control
- a switch to turn on / off defrost mode
- a switch to switch between maximum (on) and default (off) charge level [2012.2 beta build 12004]

Update 21/02/2020: The first version is now integrated in domoticz beta!
Update 25/03/2020: The latest version is now integrated in the new stable release [2020.1] and a WIKI is created.
Update 29/04/2020: A new version with new devices is now present in the next beta [2012.2 beta build 12004]
Last edited by MrHobbes74 on Friday 01 May 2020 21:16, edited 8 times in total.
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: New: Tesla hardware module

Post by meel4chris »

great work!
I'd love to test it. just got my first succesfull API request working via postman but via domoticz is much better!
But how do I start? I have domoticz already running for years but from the link I cant figure out the next step..
thanks!
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: New: Tesla hardware module

Post by HvdW »

I'd love to test.
Missing a Tesla ;-))
Bugs bug me.
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

meel4chris wrote: Monday 17 February 2020 17:32 great work!
I'd love to test it. just got my first succesfull API request working via postman but via domoticz is much better!
But how do I start? I have domoticz already running for years but from the link I cant figure out the next step..
thanks!
Thanks! For now, you will have to clone my GitHub and compile domoticz yourself.

In the mean time, I have improved the module a lot, it runs in a separate thread (so not blocking domoticz at any moment) and added climate control: from domoticz you can turn on and off the climate in the car, or set it to defrost mode.This way you can schedule your car to be warm and defrozen when you leave the house in the morning (besides a scheduled charge). For safety, all these controls can only be used when the car is at home and not driving.
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: New: Tesla hardware module

Post by meel4chris »

Ok, never compiled domoticz before but I'll look into that. Since I'm running a "live" system I have to prepare a few things in order to keep the family happy ;)
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

What version of Domoticz are you running? Are you running the beta? And on Raspberry PI?
I may be able to create a patch that you can download, if you run the latest beta, so you don't need to get into the trouble of compiling.
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: New: Tesla hardware module

Post by meel4chris »

that would be great!
I'm currently running version 4.11605 but it's no problem to updat to the latest beta.
Running on Raspberry PI indeed.
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

I have created a patch for the Tesla hardware in domoticz.
See:
https://github.com/MrHobbes74/domoticz_tesla_patch

Note that this patch only works on a Raspberry Pi (Buster) and domoticz version 4.11696.

Disclaimer: use at your own risk :-)
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: New: Tesla hardware module

Post by meel4chris »

Great! I don’t run on buster but I’ll give it a try. After making a backup of my current image..


Verzonden vanaf mijn iPhone met Tapatalk
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

Buster is needed because unfortunately the latest versions of domoticz require Buster...
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: New: Tesla hardware module

Post by meel4chris »

just found out indeed :o
after performing the steps, domoticz didnt start anymore. got the message:
---
Feb 18 19:34:44 raspberrypi domoticz.sh[1732]: /home/pi/domoticz/domoticz: error while loading shared libraries: libssl.so.1.1: cannot open shared object f... directory
Feb 18 19:34:44 raspberrypi systemd[1]: Started LSB: Home Automation System.
Hint: Some lines were ellipsized, use -l to show in full.
---

So I have to upgrade my OS. challenge accepted.
I have to perform two upgrades as I just read, from Jessie to stretch to Buster..
nice :)
Last edited by meel4chris on Tuesday 18 February 2020 19:56, edited 1 time in total.
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

I went for a clean install and restore the database. Do you also get that message without my patch?
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: New: Tesla hardware module

Post by meel4chris »

Just tried to upgrade without your patch. also then it doesnt start anymore.
the beta I was running did run on Jessie. but an upgrade now seems unavoidable.

after a new installation and restore of the domoticz.db file (and lua directory), domoticz will run with all hw and device configuration again?
in that case it might be the best option after those years. I just have to reinstall homekit and mydomoathome as well..
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

Yes, if you restore the database it will work fine.
Just make sure that, just in case, you can always revert to the situation before today 😉
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: New: Tesla hardware module

Post by meel4chris »

Thanks, I will use another SD card. Just to be sure.
Coming days I'm a bit busy so I dont expect to have buster running before the weekend.
I'll keep you posted. Thanks for the help so far!
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

Take your time! In the mean time, I'm just making it better!
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: New: Tesla hardware module

Post by meel4chris »

Reinstallation was easier as expected. I now have a sd card running on the latest beta from today, 4.11706. Can you create a new patch for this release?

On buster I don’t get mydomoathome up and running anymore (issue in combination of npm, nodejs and buster). Mydomoathome is required for the imperihome app on my iPhone. Imperihome was the app I used to check and control the house. Do you have any nice suggestions / alternatives? I’m not fan of the standard webapp of domoticz. Now testing to switch to the home / woning app of apple...


Verzonden vanaf mijn iPhone met Tapatalk
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

It’s possible to use Apple home in combination with homebridge and donoticz, but it’s not ideal. Have you tried Pilot? That is a good alternative, it works great with domoticz.

I will make a new patch, I’ll let you know.
patoo77
Posts: 296
Joined: Thursday 17 July 2014 18:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Paris, France
Contact:

Re: New: Tesla hardware module

Post by patoo77 »

MrHobbes74 wrote: Thursday 20 February 2020 7:38 It’s possible to use Apple home in combination with homebridge and donoticz, but it’s not ideal. Have you tried Pilot? That is a good alternative, it works great with domoticz.
What a great advice :mrgreen:
MrHobbes74
Posts: 115
Joined: Sunday 19 January 2020 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Netherlands
Contact:

Re: New: Tesla hardware module

Post by MrHobbes74 »

A new version of the patch is available!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests