Page 13 of 15
Re: Tesla hardware module
Posted: Tuesday 15 March 2022 23:52
by kruszylo
Hi folks, recently I got interested in writing some scripts to send commands to Tesla via API, I was searching on the internet and found this forum. Now I don't owe Tesla (ugh I wish I had one), but I have a dream and in the day when I'll have one I want to have a set of tools ready to customize it. What can I do? I've found this repo:
https://github.com/domoticz/domoticz and this wiki page:
https://www.domoticz.com/wiki/EVehicles. What is a good way to start?
Also, I see there are some commands already implemented, I would love to contribute to extending it and implementing some simple functionality like start engine, play music, change volume, etc. Is it possible?
Re: Tesla hardware module
Posted: Friday 22 April 2022 16:03
by JPSke
Apparantly now the Tesla access token stays valid only for one day (8 hours), meaning that you have to manualy update the token in the hardware module to keep being connected to your car. Has anyone found a solution for this nuissance?
Re: Tesla hardware module
Posted: Tuesday 20 September 2022 19:16
by marcus54
Bonjour
J'aimerais bien pouvoir piloter l'intensité de charge de ma Tesla en fonction de l'intensité produite par mes panneaux photovoltaïques qui sont monitorés dans Domoticz.
J'ai vu que dans Wiki du plugin Tesla il y avait un projet d'ajouter une partie de cette fonctionnalité : changer l'intensité de charge
Est-ce qu'elle verra le jour bientôt ?
Merci
Hello
I would like to be able to control the charging intensity of my Tesla according to the intensity produced by my photovoltaic panels which are monitored in Domoticz.
I saw that in the Wiki of the Tesla plugin there was a project to add a part of this functionality: change the intensity of charge
Will it see the light of day soon?
Thanks
Re: Tesla hardware module
Posted: Tuesday 20 December 2022 11:04
by David42fr
JPSke wrote: ↑Friday 22 April 2022 16:03
Apparantly now the Tesla access token stays valid only for one day (8 hours), meaning that you have to manualy update the token in the hardware module to keep being connected to your car. Has anyone found a solution for this nuissance?
Hello,
IS there any news? it's unusable as for now
Re: Tesla hardware module
Posted: Sunday 13 August 2023 11:07
by rgroothuis
I'm investigating the use of the EVehicles hw module to start building scripts around my Tesla. I've been browsing through this post and read about the API changing very X hours issue. Has that been resolved? And is so, how? Can I use this EVehicles module without any problems? Who is able to confirm this?
Thanks I want to achieve:
- Charing the car when the solar panels are generating enough power for certain amount of time to charge the car,
- When starting the car at home (in the garage) the garage door (already Domoticz controlled) to be automatically opened.
- When the car is getting home, to automatically open the garage door again.
Feedback is appreciated. Thanks.
Re: Tesla hardware module
Posted: Monday 14 August 2023 12:45
by rgroothuis
I would love to get a confirmation that the module is working to connect to the Tesla and there are no authentication problems anymore. Looking forward to any feedback on this subject. Who is able to provide an update?
Re: Tesla hardware module
Posted: Sunday 24 September 2023 18:33
by waltervl
Tesla hardware is currently not working, see also github issue
https://github.com/domoticz/domoticz/issues/5469
Re: Tesla hardware module
Posted: Saturday 25 November 2023 11:52
by JanJaap
Hey all. Just received my new Tesla yesterday and looking forward to connecting it to Domoticz (like I've done with my Hyundai Kona). Is there any maintenance on the C++ hardware plugin ongoing? Or should I give it a go with the mentioned python library and build a Python based plugin around that? This one looks very promising:
https://github.com/tdorssers/TeslaPy
Re: Tesla hardware module
Posted: Saturday 25 November 2023 17:00
by waltervl
Knowing your python skills I think a plugin will do perfectly fine.
I did not see any progress on Tesla C++ code.
Re: Tesla hardware module
Posted: Tuesday 28 November 2023 11:09
by JPSke
@ JanJaap:
if you have programmed something useable, would you care to share?
Re: Tesla hardware module
Posted: Tuesday 28 November 2023 14:16
by JanJaap
When I've done that, I'll post an update. But there are many good idea's I'd like to work on plus some other hobbies that also cost some time....... If anyone wants to help out, it's welcome
Re: Tesla hardware module
Posted: Wednesday 20 December 2023 22:36
by JanJaap
Allrighty, the first version is there:
https://github.com/JanJaapKo/TeslaDomoticz
Be aware it is completely beta, and only retrieves the battery state. Works with my Model Y, should also work with the other models. I should also work should you own more than 1 Tesla (and are registered to your account).
Let me know if it works fine or there's any problem. I'll continue to add more sensors. At this moment, the underlying TeslaPy library is not updated to send commands (Tesla changed some things on their API).
Re: Tesla hardware module
Posted: Friday 29 December 2023 11:07
by oeildefeu
Hello,
I tried your plugin but I faced a fatal error. FYI, I'm a owner of a TM3 SR+ 2022.
Something that was not clear for me is what do you expect as email and password in settings of the plugin? Tesla or ABRP? ==> You mixed both in description so in the fields to fill I was a little bit lost !
Anyway, I tried to launch the plugin and I got this (I replaced my real VIN by "
MyVIN"
Code: Select all
2023-12-29 11:04:04.450 Error: Tesla: Call to function 'onStart' failed, exception details:
2023-12-29 11:04:04.451 Error: Tesla: Traceback (most recent call last):
2023-12-29 11:04:04.451 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 285, in onStart
2023-12-29 11:04:04.451 Error: Tesla: _plugin.onStart()
2023-12-29 11:04:04.451 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 159, in onStart
2023-12-29 11:04:04.451 Error: Tesla: self.createVehicleDevices(self.vehicle_dict[vehicle['vin']])
2023-12-29 11:04:04.451 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 231, in createVehicleDevices
2023-12-29 11:04:04.452 Error: Tesla: if (1 not in Devices[deviceId].Units):
2023-12-29 11:04:04.452 Error: Tesla: KeyError: '[b]MyVIN[/b]'
Re: Tesla hardware module
Posted: Friday 29 December 2023 11:46
by JanJaap
Hey,
I'll have a look tonight. The email and password are for the tesla account (although password actually not even used....). Might need to come back for more detailed logging but I'll let you know.
Which password did you enter? Make sure to use the tesla one...
Re: Tesla hardware module
Posted: Friday 29 December 2023 12:35
by oeildefeu
I forgot to mention: I'm on python 3.9.2
Is it an issue ?
yes I entered the Tesla password
Re: Tesla hardware module
Posted: Saturday 30 December 2023 13:18
by JanJaap
OK, I'm getting different errors on wrong password here, so I'm gonna need some more detailed logging. Can you switch the plugin to log level '1. debug' and then copy the contents of the log file (called 'tesla_<name of HW module>.log, located in the domoticz directory). You can send it as PM directly if you want.
Btw please make sure to first pull version 0.5.3 (or later) first as it will produce some more debug logging.
Re: Tesla hardware module
Posted: Saturday 30 December 2023 14:01
by oeildefeu
Done by PM !
with 0.5.3 freshly pulled from main
Re: Tesla hardware module
Posted: Saturday 30 December 2023 14:31
by oeildefeu
0.5.5 works well
Re: Tesla hardware module
Posted: Wednesday 03 January 2024 16:49
by JPSke
Car authetication ok, tesla_prepare.py returned the car name. 5 devices created and one time data retrieved. But since then no communication with car and I am getting this in the log file:
2024-01-03 16:41:06.315 Error: Tesla: Call to function 'onHeartbeat' failed, exception details:
2024-01-03 16:41:06.316 Error: Tesla: Traceback (most recent call last):
2024-01-03 16:41:06.316 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 377, in onHeartbeat
2024-01-03 16:41:06.316 Error: Tesla: _plugin.onHeartbeat()
2024-01-03 16:41:06.316 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 224, in onHeartbeat
2024-01-03 16:41:06.316 Error: Tesla: self.updateDevices(vehicle)
2024-01-03 16:41:06.316 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 291, in updateDevices
2024-01-03 16:41:06.316 Error: Tesla: location_url = '<a target="_blank" rel="noopener noreferrer" ' + vehicle.get_google_url + deviceName + " - location</a> "
2024-01-03 16:41:06.316 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/TeslaVehicle.py", line 54, in get_google_url
2024-01-03 16:41:06.316 Error: Tesla: return 'href="
http://www.google.com/maps/search/?api=1&query=' + str(self.__local_data["drive_state"]["active_route_latitude"]) + ',' + str(self.__local_data["drive_state"]["active_route_longitude"]) + '">'
2024-01-03 16:41:06.316 Error: Tesla: KeyError: 'active_route_latitude'
Re: Tesla hardware module
Posted: Wednesday 03 January 2024 17:21
by JanJaap
OK, as mentioned, there was basically no error handling yet
. Implemented now checking for latitude, should fix this problem. Solved in v 0.5.9