Page 2 of 15
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 21:12
by MrHobbes74
patoo77 wrote: ↑Thursday 20 February 2020 11:26
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
Nothing better than a free commercial

Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 22:08
by meel4chris
yes, I applied the patch
It doesnt seem to work completely:
I could add the hardware (had to add my VIN, user name and password).
after that 1 device was added:
Tesla 1 1 Tesla State General Alert (4) Not home
when I check the log from the device, the field user gives me the following:
"EventSystem//home/pi/domoticz/scripts/lua/script_time_irrigation.lua"
I now see that I'm running at 4.11708, is this the issue?

Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 22:10
by meel4chris
MrHobbes74 wrote: ↑Thursday 20 February 2020 21:12
patoo77 wrote: ↑Thursday 20 February 2020 11:26
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
Nothing better than a free commercial
I have been using Pilot several years already for the iBeacon support. In the last years the GUI has improved significatnly indeed! this looks better now as Imperihome

Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 22:23
by MrHobbes74
4.11708 is correct. The beta is 4.11707, and my build is one higher

Can you check the domoticz log for tesla events? Do you get errors?
The fact that you only get one device probably means you are getting connection errors when retrieving data.
Or you didn't wait long enough before checking....the tesla API is very slow and when the car is in deep sleep, it may take a while before the first results appear.
The 'weird' user I do not know where that comes from, but I don't think it is relevant. Although you may have an old lua scripts that wants to access the tesla IDX that was created...
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 22:47
by meel4chris
The second time I tried it I get more switches: temperature, battery level, tesla state, climate switch, charge switch and defrost.
They dont seem to work. If I click on the switch, it switches back after a few seconds and I dont see a change in the Tesla app.
in the log I see the following. (Location, ID, and VIN I replaced with xxxx)
It seems to think I'm not at home, but I am at home.
---
2020-02-20 22:42:54.614 Status: Tesla: Executing command: Stop charging
2020-02-20 22:42:54.614 Error: Tesla: Car not home. No commands allowed.
2020-02-20 22:43:07.615 Status: Tesla: Executing command: Get Drive status
----
2020-02-20 22:33:20.023 Status: Tesla: Worker started...
2020-02-20 22:33:21.023 TeslaApi: Attempting login.
2020-02-20 22:33:23.214 TeslaApi: Car found in account: ID xxxxxxxxxxx VIN xxxxxxxxxxxxxx NAME xxxxxxxxx
2020-02-20 22:33:23.214 TeslaApi: Login successful.
2020-02-20 22:33:31.215 Status: Tesla: Waking up car.
2020-02-20 22:33:37.574 Status: Tesla: Executing command: Get Drive status
2020-02-20 22:33:39.107 Tesla: Location:xxxxxxxxxxxxxx xxxxxxxx Speed: 0 Home: false
2020-02-20 22:33:39.110 (Tesla) General/Alert (Tesla State)
2020-02-20 22:33:44.107 Status: Tesla: Executing command: Get Charge status
2020-02-20 22:33:45.663 (Tesla) General/Percentage (Tesla Battery Level)
2020-02-20 22:33:45.670 (Tesla) Lighting 2 (Tesla Charge switch)
2020-02-20 22:33:50.661 Status: Tesla: Executing command: Get Climate status
2020-02-20 22:33:52.221 (Tesla) Temp (Tesla Temperature)
2020-02-20 22:33:52.229 (Tesla) Lighting 2 (Tesla Climate switch)
2020-02-20 22:33:52.236 (Tesla) Lighting 2 (Tesla Defrost switch)
--
2020-02-20 22:34:53.223 Status: Tesla: Waking up car.
2020-02-20 22:34:59.499 Status: Tesla: Executing command: Get Drive status
2020-02-20 22:35:01.023 Tesla: Location: xxxxxxxxxx xxxxxxxx Speed: 0 Home: false
2020-02-20 22:35:01.025 (Tesla) General/Alert (Tesla State)
2020-02-20 22:35:06.024 Status: Tesla: Executing command: Get Charge status
2020-02-20 22:35:07.580 (Tesla) General/Percentage (Tesla Battery Level)
2020-02-20 22:36:09.585 Status: Tesla: Waking up car.
2020-02-20 22:36:15.820 Status: Tesla: Executing command: Get Drive status
2020-02-20 22:36:17.208 Tesla: Location:xxxxxxxxxxxxxx xxxxxxxxxxx Speed: 0 Home: false
2020-02-20 22:36:17.209 (Tesla) General/Alert (Tesla State)
2020-02-20 22:36:22.208 Status: Tesla: Executing command: Get Charge status -
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 22:50
by meel4chris
after applying the patch I cant control my house anymore, in the hardware section, my aeotec stick is now displayed as "???? Unknown (NA/Not supported)"
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 22:55
by MrHobbes74
It seems the connection is working well. Note that the switches can only be used when the tesla is detected as 'at home'. This is for safety reasons. This depends on your location settings in domoticz. To test, you could change the location in domoticz settings to the location that your tesla is found. Is your car parked far away or beside your house? And do you get the correct values for the other devices (temperature, battery)?
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:00
by MrHobbes74
meel4chris wrote: ↑Thursday 20 February 2020 22:50
after applying the patch I cant control my house anymore, in the hardware section, my aeotec stick is now displayed as "???? Unknown (NA/Not supported)"
This may be related to the fact I don't compile with ZWAVE options (I don't have ZWAVE devices). So I can understand the patch will cause that. But it can also be a problem with the beta (without my patch).
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:01
by meel4chris
it works! I aligned the gps settings in domoticz!
I can switch the charging and the heating. great!
It is still a bit slow indeed. are you using the userid/pwd every time or are you logging in with the acces token / bearer code?
Do you know the impact on the battery when the car is constantly being polled by domoticz?
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:03
by MrHobbes74
Great! And battery/temp values are also OK?
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:05
by meel4chris
the temp in domoticz is 2 degrees higher as in the app.
battery i cant see in % in the app but seems about right.
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:07
by meel4chris
but unfortunately I have to remove the patch for now since the other hardware is affected and not working anymore.
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:07
by MrHobbes74
I use the token/bearer code. The tesla falls asleep quite fast. And even when not asleep, it is slow. In the app this is also the case.
If all switches are off (you are not heating/charging) the polling is once per 10 minutes. I think that doesn't cost much battery.
If you are charging, every minute the values are requested.
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:08
by MrHobbes74
Well, this was a test for me to see if it works with other tesla's as well. So I'm happy you took the effort!
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:09
by meel4chris
MrHobbes74 wrote: ↑Thursday 20 February 2020 23:00
meel4chris wrote: ↑Thursday 20 February 2020 22:50
after applying the patch I cant control my house anymore, in the hardware section, my aeotec stick is now displayed as "???? Unknown (NA/Not supported)"
This may be related to the fact I don't compile with ZWAVE options (I don't have ZWAVE devices). So I can understand the patch will cause that. But it can also be a problem with the beta (without my patch).
without the patch it works with the zwave devices on the latest beta.
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:10
by meel4chris
MrHobbes74 wrote: ↑Thursday 20 February 2020 23:07
I use the token/bearer code. The tesla falls asleep quite fast. And even when not asleep, it is slow. In the app this is also the case.
If all switches are off (you are not heating/charging) the polling is once per 10 minutes. I think that doesn't cost much battery.
If you are charging, every minute the values are requested.
ok. any particular reason why it only works when the car is at home?
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:11
by meel4chris
MrHobbes74 wrote: ↑Thursday 20 February 2020 23:08
Well, this was a test for me to see if it works with other tesla's as well. So I'm happy you took the effort!
no problem, was happy to do so!
planning to add this to the "normal beta"?
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:12
by MrHobbes74
meel4chris wrote: ↑Thursday 20 February 2020 23:09
MrHobbes74 wrote: ↑Thursday 20 February 2020 23:00
meel4chris wrote: ↑Thursday 20 February 2020 22:50
after applying the patch I cant control my house anymore, in the hardware section, my aeotec stick is now displayed as "???? Unknown (NA/Not supported)"
This may be related to the fact I don't compile with ZWAVE options (I don't have ZWAVE devices). So I can understand the patch will cause that. But it can also be a problem with the beta (without my patch).
without the patch it works with the zwave devices on the latest beta.
OK, then it is related to my compiler options (non-zwave compilation).
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:12
by MrHobbes74
meel4chris wrote: ↑Thursday 20 February 2020 23:11
MrHobbes74 wrote: ↑Thursday 20 February 2020 23:08
Well, this was a test for me to see if it works with other tesla's as well. So I'm happy you took the effort!
no problem, was happy to do so!
planning to add this to the "normal beta"?
Yep! Soon I hope

Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:16
by MrHobbes74
meel4chris wrote: ↑Thursday 20 February 2020 23:10
MrHobbes74 wrote: ↑Thursday 20 February 2020 23:07
I use the token/bearer code. The tesla falls asleep quite fast. And even when not asleep, it is slow. In the app this is also the case.
If all switches are off (you are not heating/charging) the polling is once per 10 minutes. I think that doesn't cost much battery.
If you are charging, every minute the values are requested.
ok. any particular reason why it only works when the car is at home?
Because I don't feel safe if domoticz is accidentally sending commands to my car when I'm driving....but I could replace it with 'speed is 0'
